Browse Source

modele oembed figure

utilise oembed
up de z

git-svn-id: svn://zone.spip.net/spip-zone/_plugins_/figure@104892 ac52e18a-acf5-0310-9fe8-c4428f23b10a
master
Mist. GraphX 5 years ago
parent
commit
e550b97724
  1. 17
      modeles/oembed_video.html
  2. 3
      plugin.xml

17
modeles/oembed_video.html

@ -0,0 +1,17 @@
#SET{thumbnail,#ENV{data/thumbnail_url}|sinon{#ENV{data/image}}}
#SET{async,#ENV{async}|=={non}|non|et{#GET{thumbnail}|et{#ENV*{data/html}|match{'<iframe'}}|oui}}
<figure class="oembed oe-video[(#GET{async}|oui)async] clearfix[ (#ENV{align})]" style="max-width:#ENV{data/width}px;">
<div class="rwd-video-container[(#GET{async}|oui)oe-play-button]"
style="width:100%;height:0;padding-bottom:[(#ENV{data/height}|div{#ENV{data/width}}|mult{100}|round{2})]%;[background-image:url('(#GET{thumbnail})');background-repeat:no-repeat;background-position:center;background-size:cover;]"
[(#GET{async}|oui)
onclick="if (jQuery(this).is('.oe-play-button')){jQuery(this).removeClass('oe-play-button').addClass('loading').html(decodeURIComponent('[(#ENV*{data/html}|oembed_force_video_autoplay|rawurlencode|texte_script)]'));}"
]>
[(#GET{async}|oui) <button onclick="jQuery(this).parent().trigger('click');">Play</button>]
[(#GET{async}|non) [(#ENV*{data/html}|et{#ENV{autoplay}}|?{[(#ENV*{data/html}|oembed_force_video_autoplay)],#ENV*{data/html}|sinon{#ENV{url}}})] ]
</div>
<style><!--/**/.oe-video .loading {background-image:url("#CHEMIN_IMAGE{searching.gif}")!important;background-size:auto !important;}/**/--></style>
<figcaption class='spip_doc_caption'>
[<div class="spip_doc_titre" style="max-width:#ENV{data/width}px;"><a href="#ENV*{url}" class="oe-title">(#ENV*{data/title})</a>[
<span class="oe-author_name"><br /><i>par <a href="#ENV*{data/author_url}">(#ENV*{data/author_name})</a></i></span>]</div>]
</figcaption>
</figure>

3
plugin.xml

@ -3,7 +3,7 @@
<prefix>figure</prefix>
<icon>figure.png</icon>
<version>0.4.0</version>
<version>0.4.1</version>
<etat>dev</etat>
<categorie>multimedia</categorie>
@ -15,4 +15,5 @@
<utilise id="medias" version="[1.6.8;]" />
<utilise id="medoc" version="[1.0.0;]" />
<utilise id="accessibilite" />
<utilise id="oembed" version="[1.8.0;]"/>
</plugin>
Loading…
Cancel
Save