Browse Source

#1 #2, Compat 4 ready, doctype html5 by default

pull/3/head
Charles Stephan 1 year ago
parent
commit
2006544eb4
  1. 2
      inclure/inc-swiper-figure.html
  2. 26
      modeles/swiper.html
  3. 4
      paquet.xml
  4. 9
      swiper.html
  5. 14
      swiper_pipelines.php
  6. 16
      swiper_spip.css

2
inclure/inc-swiper-figure.html

@ -2,9 +2,7 @@
<figure
class="swiper-slide"
id="swiper-slide_#ID_DOCUMENT"
style="background-image:url(#FICHIER)"
>
[(#REM)On laisse le fichier mais on le cache en css pour la SEO]
[(#FICHIER
|balise_img
|inserer_attribut{title,#TITRE}

26
modeles/swiper.html

@ -7,6 +7,7 @@
{id_swiper}
{par rang_lien, num titre, titre}
{si #ENV{id_swiper}}
{si #ENV{multiple}|non}
{extension==jpg|png|gif}>
<INCLURE{fond=inclure/inc-swiper-figure, id_document, rel=#GET{rand}} />
</BOUCLE_SWIPER>
@ -19,6 +20,26 @@
</div>
</B_SWIPER>
[(#REM) Cas d'un mot]
<B_SWIPER_MOT>
<div class="swiper-container[ swiper_mot_(#ID_MOT)][ (#ENV{args/align})][ (#ENV{class})]">
<div class="swiper-wrapper">
<BOUCLE_SWIPER_MOT(DOCUMENTS documents_liens)
{id_mot?}
{si #ENV{id_swiper}|non}
{si #ENV{multiple}|non}
>
<INCLURE{fond=inclure/inc-swiper-figure, id_document, rel=#GET{rand}} />
</BOUCLE_SWIPER_MOT>
</div>
[(#TOTAL_BOUCLE|>{1}|oui)
<INCLURE{fond=inclure/inc-swiper-paginations} />
<INCLURE{fond=inclure/inc-swiper-buttons} />
<INCLURE{fond=inclure/inc-swiper-scrollbar} />
]
</div>
</B_SWIPER_MOT>
[(#REM) Cas d'un article]
<B_SWIPER_ARTICLE>
<div class="swiper-container[ swiper_article_(#ID_ARTICLE)][ (#ENV{args/align})][ (#ENV{class})]">
@ -28,6 +49,7 @@
{par rang_lien, num titre, titre}
{si #ENV{multiple}|non}
{si #ENV{id_swiper}|non}
{si #ENV{id_mot}|non}
{extension==jpg|png|gif}>
<INCLURE{fond=inclure/inc-swiper-figure, id_document, rel=#GET{rand}} />
</BOUCLE_SWIPER_ARTICLE>
@ -50,6 +72,7 @@
{si #ENV{multiple}|non}
{si #ENV{id_swiper}|non}
{si #ENV{id_article}|non}
{si #ENV{id_mot}|non}
{extension==jpg|png|gif}
>
<INCLURE{fond=inclure/inc-swiper-figure, id_document, rel=#GET{rand}} />
@ -69,7 +92,8 @@
<div class="swiper-wrapper">
<BOUCLE_SWIPER_AU_CHOIX(DOCUMENTS)
{id_document IN #GET{multiple}}
{extension==jpg|png|gif}
{si #ENV{multiple}|oui}
{tout}
>
<INCLURE{fond=inclure/inc-swiper-figure, id_document,rel=#GET{rand}} />
</BOUCLE_SWIPER_AU_CHOIX>

4
paquet.xml

@ -1,9 +1,9 @@
<paquet
prefix="swiper"
categorie="multimedia"
version="1.2.0"
version="2.0.0"
etat="test"
compatibilite="[3.2.0;3.2.*]"
compatibilite="[3.2.0;4.0.*]"
logo="prive/themes/spip/images/swiper-64.png"
documentation="https://contrib.spip.net/article5347"
schema="1.0.0"

9
swiper.html

@ -1,11 +1,6 @@
<BOUCLE_principale(SWIPERS) {id_swiper}>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
[(#REM) Cf.: http://paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/
]<!--[if lt IE 7 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie6"> <![endif]-->
<!--[if IE 7 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie7"> <![endif]-->
<!--[if IE 8 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie8"> <![endif]-->
<!--[if IE 9 ]> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js ie ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html dir="#LANG_DIR" lang="#LANG" xmlns="http://www.w3.org/1999/xhtml" xml:lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js"> <!--<![endif]-->
<!DOCTYPE html>
<html dir="#LANG_DIR" lang="#LANG" class="[(#LANG_DIR)][ (#LANG)] no-js">
<head>
<script type='text/javascript'>/*<![CDATA[*/(function(H){H.className=H.className.replace(/\bno-js\b/,'js')})(document.documentElement);/*]]>*/</script>
<title>[(#TITRE|couper{80}|textebrut) - ][(#NOM_SITE_SPIP|textebrut)]</title>

14
swiper_pipelines.php

@ -52,17 +52,7 @@ function swiper_insert_head_css($flux) {
}
function swiper_header_prive($flux) {
$css = find_in_path('lib/swiper/swiper-bundle.min.css');
$flux .='<link rel="stylesheet" type="text/css" href="'.$css.'">';
$swiper_spip_css = find_in_path('swiper_spip.css');
$flux .='<link rel="stylesheet" type="text/css" href="'.$swiper_spip_css.'">';
$lib = find_in_path('lib/swiper/swiper-bundle.min.js');
$flux .='<script src="'.$lib.'" type="text/javascript"></script>';
$flux .= swiper_configurateur();
$flux .= swiper_insert_head_css('');
$flux .= swiper_insert_head('');
return $flux;
}

16
swiper_spip.css

@ -1,8 +1,3 @@
.swiper-container {
height: 300px;
width: 500px;
}
.swiper-container.left {
margin-left:inherit;
float:left;
@ -18,20 +13,21 @@
.swiper-container.no-float {
float:none;
}
figure.swiper-slide{
/*
figure.swiper-slide {
background-size: cover;
background-position: center;
margin: 0;
}
figure.swiper-slide img{
position: absolute;
top: -10000%;
opacity: 0;
}
*/
figure.swiper-slide figcaption {
position: relative;
position: absolute;
bottom:1em;
text-align: left;
padding:1.5em 2.25em;
}

Loading…
Cancel
Save