Browse Source

Maintenant que iframe supporte le lazy loading (https://web.dev/iframe-lazy-loading/), autant l'utiliser

master
Jacques Pyrat 8 months ago
parent
commit
3f3319a4a0
  1. 2
      base/soyezcreateurs.php
  2. 2
      inc/sc_article.php
  3. 2
      modeles/emb_pdf.html
  4. 2
      noisettes/sommaire_modeportailcognac_zoomsur.html

2
base/soyezcreateurs.php

@ -1065,7 +1065,7 @@ function soyezcreateurs_config_motsclefs() {
<p><a class=\"button triadeC texte-blanc float-center avec-margin\" href=\"/$id_article\"><span class=\"icon-envelope icon-lg avec-padding-right05\"></span>Nous écrire</a></p>
</div>
<div id=\"carte\" class=\"avec-padding\">
<html><!-- Begin Exclude NewsLetter --></html><iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d365312.326488903!2d-1.5056982671874777!3d44.33045219999999!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0xd5380bbec6fa8d3%3A0x2cd88d7991f88ca4!2sPerdu..!5e0!3m2!1sfr!2sfr!4v1508413717844\" width=\"600\" height=\"450\" frameborder=\"0\" style=\"border:0\" allowfullscreen=\"true\"></iframe><html><!-- End Exclude NewsLetter --></html>
<html><!-- Begin Exclude NewsLetter --></html><iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d365312.326488903!2d-1.5056982671874777!3d44.33045219999999!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0xd5380bbec6fa8d3%3A0x2cd88d7991f88ca4!2sPerdu..!5e0!3m2!1sfr!2sfr!4v1508413717844\" width=\"600\" height=\"450\" frameborder=\"0\" style=\"border:0\" allowfullscreen=\"true\" loading=\"lazy\"></iframe><html><!-- End Exclude NewsLetter --></html>
</div>
</div>");
}

2
inc/sc_article.php

@ -690,7 +690,7 @@ EOF;
if ($article == "Un sourire peut changer une vie") {
$contenu['titre'] = "Un sourire peut changer une vie";
$contenu['chapo'] = <<<EOF
<iframe width="344" height="260" src="//www.youtube-nocookie.com/embed/Cbk980jV7Ao?rel=0" allowfullscreen></iframe>
<iframe width="344" height="260" src="//www.youtube-nocookie.com/embed/Cbk980jV7Ao?rel=0" allowfullscreen="true" loading="lazy"></iframe>
EOF;
}

2
modeles/emb_pdf.html

@ -7,7 +7,7 @@
#SET{hauteur,#ENV{hauteur,600px}}
<div class='spip_document_#ID_DOCUMENT spip_document_video spip_documents[ spip_documents_(#ENV{align})]'
style='[(#ENV{align}|match{^(left|right)$}|oui)float:#ENV{align};][width:(#GET{largeur})]'>
<iframe title="[(#TITRE|sinon{[(#FICHIER|basename)]}|texte_backend)]" src="#FICHIER" width="#GET{largeur}" height="#GET{hauteur}" allowfullscreen="true">
<iframe title="[(#TITRE|sinon{[(#FICHIER|basename)]}|texte_backend)]" src="#FICHIER" width="#GET{largeur}" height="#GET{hauteur}" allowfullscreen="true" loading="lazy">
[<div class='#EDIT{titre} spip_doc_titre'><a href="#URL_DOCUMENT">(#TITRE)</a></div>]
</iframe>
[<div class='#EDIT{titre} spip_doc_titre'><strong>(#TITRE|sinon{[(#FICHIER|basename)]})</strong></div>]

2
noisettes/sommaire_modeportailcognac_zoomsur.html

@ -37,7 +37,7 @@
[(#MIME_TYPE|=={text/oembed}|oui)
<div style="position: relative; padding-bottom: [(#CONFIG{soyezcreateurs/hauteur_slider,580}|div{1920}|mult{100})%]">
<div class="mbYTP_wrapper" id="wrapper_mbYTP_bgndVideo" style="position: absolute; z-index: -1; min-width: 100%; min-height: 100%; left: 0; top: 0; overflow: hidden; opacity: 1; -webkit-backface-visibility: hidden;">
<iframe id="mbYTP_bgndVideo#ID_DOCUMENT" class="playerBox" style="position: absolute; z-index: -1; width: 2380.8px; height: 1080px; top: 0px; left: 0px; overflow: hidden; opacity: 1; margin-top: -199.5px; margin-left: -230.4px;" frameborder="0" allowfullscreen="1" width="[(#INCLURE{#FICHIER}|extraire_attribut{width})]" height="[(#INCLURE{#FICHIER}|extraire_attribut{height})]" src="[(#INCLURE{#FICHIER}|extraire_attribut{src})]&amp;autoplay=1&amp;loop=1&amp;modestbranding=1&amp;controls=0&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1&amp;version=3&amp;playerapiid=mbYTP_bgndVideo&amp;allowfullscreen=true&amp;wmode=transparent&amp;iv_load_policy=3&amp;html5=1&amp;mute=1[&amp;playlist=(#INCLURE{#FICHIER}|extraire_attribut{src}|replace{'https:\/\/www\.youtube\.com\/embed\/\(\[^\?]*\).*','$1'}|replace{'\?feature=oembed',''})]"></iframe>
<iframe id="mbYTP_bgndVideo#ID_DOCUMENT" class="playerBox" style="position: absolute; z-index: -1; width: 2380.8px; height: 1080px; top: 0px; left: 0px; overflow: hidden; opacity: 1; margin-top: -199.5px; margin-left: -230.4px;" frameborder="0" allowfullscreen="1" width="[(#INCLURE{#FICHIER}|extraire_attribut{width})]" height="[(#INCLURE{#FICHIER}|extraire_attribut{height})]" src="[(#INCLURE{#FICHIER}|extraire_attribut{src})]&amp;autoplay=1&amp;loop=1&amp;modestbranding=1&amp;controls=0&amp;showinfo=0&amp;rel=0&amp;enablejsapi=1&amp;version=3&amp;playerapiid=mbYTP_bgndVideo&amp;allowfullscreen=true&amp;wmode=transparent&amp;iv_load_policy=3&amp;html5=1&amp;mute=1[&amp;playlist=(#INCLURE{#FICHIER}|extraire_attribut{src}|replace{'https:\/\/www\.youtube\.com\/embed\/\(\[^\?]*\).*','$1'}|replace{'\?feature=oembed',''})]" loading="lazy"></iframe>
</div>
</div>]
</a>]

Loading…
Cancel
Save