Browse Source

trunkage

v2
eric@smellup.net 9 years ago
commit
2acadabe4b
  1. 13
      .gitattributes
  2. 51
      css/faq.css
  3. BIN
      css/img/bg-dt.png
  4. BIN
      css/img/faq-close.png
  5. BIN
      css/img/faq-open.png
  6. BIN
      css/img/puce-dt.png
  7. 24
      faq_pipelines.php
  8. BIN
      icon/faq-128.png
  9. BIN
      icon/faq-32.png
  10. 6
      inc-rubrique-faq.html
  11. 8
      inclure/rubrique-faq.html
  12. 6
      js/faq.js
  13. 21
      plugin.xml

13
.gitattributes vendored

@ -0,0 +1,13 @@
* text=auto !eol
css/faq.css -text
css/img/bg-dt.png -text
css/img/faq-close.png -text
css/img/faq-open.png -text
css/img/puce-dt.png -text
/faq_pipelines.php -text
icon/faq-128.png -text
icon/faq-32.png -text
/inc-rubrique-faq.html -text
inclure/rubrique-faq.html -text
js/faq.js -text
/plugin.xml -text

51
css/faq.css

@ -0,0 +1,51 @@
/* --------------------------------------------------------------
faq.css
Style des FAQ
by romy.tetue.net - 2009-2011
-------------------------------------------------------------- */
/*
Si ce n'est pas déjà fait,
commencez pas styler les dfn et dl, dt, dd,
soit en adoptant reset, framework et/ou theme CSS,
soit en copiant les lignes ci-dessous dans votre feuille de style :
dfn { font-weight: bold; font-style: italic; }
dl { margin-bottom: 1em; border-bottom: 1px solid #DDD; }
dl dt,
dl dd { padding: .5em; padding-left: 30px; }
dl dt { background: url(img/puce-dt.png) no-repeat .4em .4em; border-top: 1px solid #DDD; font-weight: bold; color: #0366CB; }
dl dd { padding-top: 0; }
*/
dl.faq {}
dl.faq dt { /*background-image: url(img/faq-open.png);*/ background-repeat: no-repeat; cursor: pointer; }
dl.faq dt.close { /*background-image: url(img/faq-close.png);*/ }
dl.faq dd {}
#faq {}
#faq .ancres { margin-bottom: 3em; border-bottom: 1px solid #DDD; }
#faq .ancres li { padding: .5em 1em .5em .1em; border-top: 1px solid #DDD; }
#faq dl { border: 0; }
#faq dl dt,
#faq dl dd { padding: .4em; background: none; border: 0; }
#faq dl dt { position: relative; padding-right: 3em; background: #DDD url(img/bg-dt.png) no-repeat left top; margin-bottom: .4em; }
#faq dl dt .retour { display: block; position: absolute; top: 0; right: 0; padding: .2em .5em 0 0; text-align: right; font-weight: normal; }
#faq dl dd { margin-bottom: 2em; padding-right: 1em; }
/* Rustine devenue inutile
dl.spip_documents,
.spip_documents dl,
.spip_documents dt,
.spip_documents dd { margin: 0 auto; padding: 0; background: 0; border: 0; }
*/
@media print { dl.faq dd { display: block !important; } }
/* end */

BIN
css/img/bg-dt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

BIN
css/img/faq-close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
css/img/faq-open.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
css/img/puce-dt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

24
faq_pipelines.php

@ -0,0 +1,24 @@
<?php
function faq_css(){
$css ="";
$css .= '<link rel="stylesheet" href="'.find_in_path('css/faq.css').'" type="text/css" media="all" />';
return $css;
}
function faq_insert_head($flux) {
if (intval($GLOBALS['spip_version_branche'])<3){
$flux .= faq_css();
}
$flux .= '<script src="'.find_in_path('js/faq.js').'" type="text/javascript"></script>';
return $flux;
}
function faq_insert_head_css($flux) {
if (intval($GLOBALS['spip_version_branche'])>=3){
$flux .= faq_css();
}
return $flux;
}
?>

BIN
icon/faq-128.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
icon/faq-32.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

6
inc-rubrique-faq.html

@ -0,0 +1,6 @@
[(#REM)
RUSTINE DE COMPATIBILITE
Ne plus utiliser ce fichier !
]<INCLURE{fond=inclure/rubrique-faq,id_rubrique,env}>

8
inclure/rubrique-faq.html

@ -0,0 +1,8 @@
<B_faq>
<dl class="faq">
<BOUCLE_faq(ARTICLES){id_rubrique}{par num titre}{par date}>
<dt id="dt#COMPTEUR_BOUCLE">#TITRE</dt>
<dd>#TEXTE</dd>
</BOUCLE_faq>
</dl>
</B_faq>

6
js/faq.js

@ -0,0 +1,6 @@
$(document).ready(function(){
$('dl.faq > dt').addClass("close").click(function(){
$(this).toggleClass("close").next().toggle('fast');
return false;
}).next().hide();
});

21
plugin.xml

@ -0,0 +1,21 @@
<plugin>
<nom>D&#233;finitions et FAQ</nom>
<icon>icon/faq-32.png</icon>
<prefix>faq</prefix>
<version>2.1.21</version>
<etat>dev</etat>
<categorie>navigation</categorie>
<slogan>FAQ d&#233;pliable</slogan>
<description>Transformez les listes de d&#233;finitions marqu&#233;es du s&eacute;lecteur &#171;<code>faq</code>&#187; en <abbr title="Foire Aux Questions">FAQ</abbr> d&#233;pliable.</description>
<lien>http://www.spip-contrib.net/?rubrique891</lien>
<auteur>[romy.tetue.net->http://romy.tetue.net]</auteur>
<licence>GPL 2009</licence>
<pipeline>
<nom>insert_head</nom>
<inclure>faq_pipelines.php</inclure>
</pipeline>
<necessite id="SPIP" version="[2.0.0;3.0.99]" />
</plugin>
Loading…
Cancel
Save