Skip to content
Extraits de code Groupes Projets
Valider 3f3319a4 rédigé par Jacques Pyrat's avatar Jacques Pyrat
Parcourir les fichiers

Maintenant que iframe supporte le lazy loading...

Maintenant que iframe supporte le lazy loading (https://web.dev/iframe-lazy-loading/), autant l'utiliser
parent 09aed4dc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -1065,7 +1065,7 @@ function soyezcreateurs_config_motsclefs() { ...@@ -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> <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>
<div id=\"carte\" class=\"avec-padding\"> <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>
</div>"); </div>");
} }
......
...@@ -690,7 +690,7 @@ EOF; ...@@ -690,7 +690,7 @@ EOF;
if ($article == "Un sourire peut changer une vie") { if ($article == "Un sourire peut changer une vie") {
$contenu['titre'] = "Un sourire peut changer une vie"; $contenu['titre'] = "Un sourire peut changer une vie";
$contenu['chapo'] = <<<EOF $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; EOF;
} }
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#SET{hauteur,#ENV{hauteur,600px}} #SET{hauteur,#ENV{hauteur,600px}}
<div class='spip_document_#ID_DOCUMENT spip_document_video spip_documents[ spip_documents_(#ENV{align})]' <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})]'> 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>] [<div class='#EDIT{titre} spip_doc_titre'><a href="#URL_DOCUMENT">(#TITRE)</a></div>]
</iframe> </iframe>
[<div class='#EDIT{titre} spip_doc_titre'><strong>(#TITRE|sinon{[(#FICHIER|basename)]})</strong></div>] [<div class='#EDIT{titre} spip_doc_titre'><strong>(#TITRE|sinon{[(#FICHIER|basename)]})</strong></div>]
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
[(#MIME_TYPE|=={text/oembed}|oui) [(#MIME_TYPE|=={text/oembed}|oui)
<div style="position: relative; padding-bottom: [(#CONFIG{soyezcreateurs/hauteur_slider,580}|div{1920}|mult{100})%]"> <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;"> <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>
</div>] </div>]
</a>] </a>]
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter