
commit
2acadabe4b
13 changed files with 129 additions and 0 deletions
@ -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 |
@ -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 */ |
After Width: | Height: | Size: 200 B |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 4.0 KiB |
@ -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; |
||||
} |
||||
|
||||
?> |
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,6 @@
|
||||
[(#REM) |
||||
|
||||
RUSTINE DE COMPATIBILITE |
||||
Ne plus utiliser ce fichier ! |
||||
|
||||
]<INCLURE{fond=inclure/rubrique-faq,id_rubrique,env}> |
@ -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> |
@ -0,0 +1,6 @@
|
||||
$(document).ready(function(){ |
||||
$('dl.faq > dt').addClass("close").click(function(){ |
||||
$(this).toggleClass("close").next().toggle('fast'); |
||||
return false; |
||||
}).next().hide(); |
||||
}); |
@ -0,0 +1,21 @@
|
||||
<plugin> |
||||
<nom>Dé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épliable</slogan> |
||||
<description>Transformez les listes de définitions marquées du sélecteur «<code>faq</code>» en <abbr title="Foire Aux Questions">FAQ</abbr> dé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…
Reference in new issue