Utilisateur:HertzZ:Bac à sable : Différence entre versions
De Ekopedia
(test) |
(test) |
||
| Ligne 1 : | Ligne 1 : | ||
| − | [[ | + | <includeonly><table width="100%" cellspacing="0" cellpadding="0" valign="top" border="0" style="background-color:transparent;"> |
| − | [[ | + | <tr> |
| − | [[ | + | {{#if:{{{Onglet-1|}}}|<td style="padding:0.3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-1}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-1}}}|{{{Onglet-1}}}]]</td>|<font color="red">'''"Onglet-1 non défini" '''</font>}}{{#if:{{{Onglet-2|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> |
| − | [[ | + | <td style="padding:0.3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-2}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-2}}}|{{{Onglet-2}}}]]</td>|}}{{#if:{{{Onglet-3|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> |
| − | [[ | + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-3}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-3}}}|{{{Onglet-3}}}]]</td>|}}{{#if:{{{Onglet-4|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> |
| − | [[ | + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-4}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-4}}}|{{{Onglet-4}}}]]</td>|}}{{#if:{{{Onglet-5|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> |
| − | [[ | + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-5}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-5}}}|{{{Onglet-5}}}]]</td>|}}{{#if:{{{Onglet-6|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> |
| + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-6}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-6}}}|{{{Onglet-6}}}]]</td>|}}{{#if:{{{Onglet-7|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> | ||
| + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-7}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-7}}}|{{{Onglet-7}}}]]</td>|}}{{#if:{{{Onglet-8|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> | ||
| + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-8}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-8}}}|{{{Onglet-8}}}]]</td>|}}{{#if:{{{Onglet-9|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> | ||
| + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-9}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-9}}}|{{{Onglet-9}}}]]</td>|}}{{#if:{{{Onglet-10|}}}|<td style="border-bottom:{{{bordure|solid 2px #A3B1BF}}}" width="2%"> </td> | ||
| + | <td style="padding:0 .3em; border:{{{bordure|solid 2px #A3B1BF}}}; text-align:center ; {{#ifeq:{{FULLPAGENAME}}|{{{URL-10}}}| background-color:{{{fond cadre|white}}}; border-bottom: 0; font-weight:bold;| background-color:{{{fond onglets|#CEE0F2}}}; font-size:90%}}" width="{{#expr:(100/{{Nombre de paramètres définis|{{{Onglet-1}}}|{{{Onglet-2}}}|{{{Onglet-3}}}|{{{Onglet-4}}}|{{{Onglet-5}}}|{{{Onglet-6}}}|{{{Onglet-7}}}|{{{Onglet-8}}}|{{{Onglet-9}}}|{{{Onglet-10}}}}})-2}}%">[[{{{URL-10}}}|{{{Onglet-10}}}]]</td>|}} | ||
| + | </tr> | ||
| + | </table><div style="border:{{{bordure|solid 2px #A3B1BF}}}; padding:.5em 1em 1em 1em;border-top:none;background-color:{{{fond cadre|white}}};color:#000"> | ||
| + | <div style="padding:1ex; "></includeonly><noinclude> | ||
| + | |||
| + | '''But''' : créer une interface à onglets, notamment pour les pages d'aides ([[Projet:Traduction/*/Aide|exemple]]) et les pages utilisateurs ([[Utilisateur:Antaya|exemple]]). | ||
| + | |||
| + | '''Syntaxe''' : chacune des pages doit contenir le code wiki : | ||
| + | <pre> | ||
| + | {{Début des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Projet:Traduction/*/Aide/Demander une traduction | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | }} | ||
| + | |||
| + | Bla bla bla | ||
| + | |||
| + | {{Fin des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Projet:Traduction/*/Aide/Demander une traduction | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | |Onglet-Fin=Revenir au projet traduction | ||
| + | |URL-Fin=Projet:Traduction | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | |||
| + | '''Résultat''' : | ||
| + | |||
| + | |||
| + | {{Début des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Modèle:Début des onglets | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | }} | ||
| + | |||
| + | Bla bla bla | ||
| + | |||
| + | {{Fin des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Modèle:Début des onglets | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | |Onglet-Fin=Revenir au projet traduction | ||
| + | |URL-Fin=Projet:Traduction | ||
| + | }} | ||
| + | |||
| + | |||
| + | * Le nombre maximum d'onglets est de 10. Pour qu'au dernier onglet la page suivante ne soit pas la première vous pouvez définir <nowiki>{{{Onglet-Fin}}} et {{{URL-Fin}}}</nowiki>. | ||
| + | |||
| + | *Il est possible de définir des paramètres optionnels <code>bordure=</code>, <code>fond onglets=</code> et <code>fond cadre=</code> pour choisir le style de la bordure et les couleurs des onglets et du cadre. | ||
| + | *:<code>bordure=</code> et <code>fond onglets=</code> fonctionnent également pour le modèle {{m|Fin des onglets}}. | ||
| + | |||
| + | |||
| + | '''Exemple:''' | ||
| + | <pre> | ||
| + | {{Début des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Projet:Traduction/*/Aide/Demander une traduction | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | |bordure=1px solid black | ||
| + | |fond onglets=#EEEEEE | ||
| + | |fond cadre=#EEEFFF | ||
| + | }} | ||
| + | |||
| + | Bla bla bla | ||
| + | |||
| + | {{Fin des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Projet:Traduction/*/Aide/Demander une traduction | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | |Onglet-Fin=Revenir au projet traduction | ||
| + | |URL-Fin=Projet:Traduction | ||
| + | |bordure=1px solid black | ||
| + | |fond onglets=#EEEEEE | ||
| + | }} | ||
| + | </pre> | ||
| + | |||
| + | |||
| + | '''Résultat''' : | ||
| + | |||
| + | |||
| + | {{Début des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Modèle:Début des onglets | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | |bordure=1px solid black | ||
| + | |fond onglets=#EEEEEE | ||
| + | |fond cadre=#EEEFFF | ||
| + | }} | ||
| + | |||
| + | Bla bla bla | ||
| + | |||
| + | {{Fin des onglets | ||
| + | |Onglet-1=Demander une traduction | ||
| + | |URL-1=Modèle:Début des onglets | ||
| + | |Onglet-2=Traduire un article | ||
| + | |URL-2=Projet:Traduction/*/Aide/Traduire un article | ||
| + | |Onglet-3=Relire un article | ||
| + | |URL-3=Projet:Traduction/*/Aide/Relire un article | ||
| + | |Onglet-4=Foire aux questions | ||
| + | |URL-4=Projet:Traduction/*/Aide/FAQ | ||
| + | |Onglet-Fin=Revenir au projet traduction | ||
| + | |URL-Fin=Projet:Traduction | ||
| + | |bordure=1px solid black | ||
| + | |fond onglets=#EEEEEE | ||
| + | }} | ||
| + | </pre> | ||
| + | </noinclude> | ||
Version du 14 mars 2007 à 15:20
But : créer une interface à onglets, notamment pour les pages d'aides (exemple) et les pages utilisateurs (exemple).
Syntaxe : chacune des pages doit contenir le code wiki :
{{Début des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
}}
Bla bla bla
{{Fin des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
|Onglet-Fin=Revenir au projet traduction
|URL-Fin=Projet:Traduction
}}
Résultat :
| Demander une traduction | Traduire un article | Relire un article | Foire aux questions |
Bla bla bla
Page suivante : →
- Le nombre maximum d'onglets est de 10. Pour qu'au dernier onglet la page suivante ne soit pas la première vous pouvez définir {{{Onglet-Fin}}} et {{{URL-Fin}}}.
- Il est possible de définir des paramètres optionnels
bordure=,fond onglets=etfond cadre=pour choisir le style de la bordure et les couleurs des onglets et du cadre.bordure=etfond onglets=fonctionnent également pour le modèle {{Fin des onglets}}.
Exemple:
{{Début des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
|bordure=1px solid black
|fond onglets=#EEEEEE
|fond cadre=#EEEFFF
}}
Bla bla bla
{{Fin des onglets
|Onglet-1=Demander une traduction
|URL-1=Projet:Traduction/*/Aide/Demander une traduction
|Onglet-2=Traduire un article
|URL-2=Projet:Traduction/*/Aide/Traduire un article
|Onglet-3=Relire un article
|URL-3=Projet:Traduction/*/Aide/Relire un article
|Onglet-4=Foire aux questions
|URL-4=Projet:Traduction/*/Aide/FAQ
|Onglet-Fin=Revenir au projet traduction
|URL-Fin=Projet:Traduction
|bordure=1px solid black
|fond onglets=#EEEEEE
}}
Résultat :
| Demander une traduction | Traduire un article | Relire un article | Foire aux questions |
Bla bla bla
Page suivante : →