« Modèle:Collapsible list » : différence entre les versions

De Pikmin FR
fr>Fxfxfx0
Copie et traduction de https://splatoonwiki.org/wiki/Template:Collapsible_list
 
m Text replacement - "{{clr}}" to "{{Clear}}"
Ligne 1 : Ligne 1 :
<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="{{{framestyle|border:none; padding:0}}}">
<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="{{{framestyle|border:none; padding:0}}}">
     <div class="mw-collapsible-header" style="{{{titlestyle|background:transparent;font-size:12px;font-weight:bold}}}"><!--
     <div class="mw-collapsible-header" style="{{{titlestyle|background:transparent;font-size:12px;font-weight:bold}}}"><!--
     -->{{{title|Liste}}}<!--
     -->{{{title|List}}}<!--
  --></div>
  --></div>
     <div class="mw-collapsible-content" style="{{{liststyle|text-align:left;padding:0}}}"><!--
     <div class="mw-collapsible-content" style="{{{liststyle|text-align:left;padding:0}}}"><!--
     -->{{#if:{{{1|}}}  |{{{1|}}}      }}<!--
     -->{{#if:{{{1|}}}  |{{{1|}}}      }}<!--
     -->{{#if:{{{2|}}}  |{{clr}}{{{2|}}}  }}<!--
     -->{{#if:{{{2|}}}  |{{Clear}}{{{2|}}}  }}<!--
     -->{{#if:{{{3|}}}  |{{clr}}{{{3|}}}  }}<!--
     -->{{#if:{{{3|}}}  |{{Clear}}{{{3|}}}  }}<!--
     -->{{#if:{{{4|}}}  |{{clr}}{{{4|}}}  }}<!--
     -->{{#if:{{{4|}}}  |{{Clear}}{{{4|}}}  }}<!--
     -->{{#if:{{{5|}}}  |{{clr}}{{{5|}}}  }}<!--
     -->{{#if:{{{5|}}}  |{{Clear}}{{{5|}}}  }}<!--
     -->{{#if:{{{6|}}}  |{{clr}}{{{6|}}}  }}<!--
     -->{{#if:{{{6|}}}  |{{Clear}}{{{6|}}}  }}<!--
     -->{{#if:{{{7|}}}  |{{clr}}{{{7|}}}  }}<!--
     -->{{#if:{{{7|}}}  |{{Clear}}{{{7|}}}  }}<!--
     -->{{#if:{{{8|}}}  |{{clr}}{{{8|}}}  }}<!--
     -->{{#if:{{{8|}}}  |{{Clear}}{{{8|}}}  }}<!--
     -->{{#if:{{{9|}}}  |{{clr}}{{{9|}}}  }}<!--
     -->{{#if:{{{9|}}}  |{{Clear}}{{{9|}}}  }}<!--
     -->{{#if:{{{10|}}} |{{clr}}{{{10|}}} }}<!--
     -->{{#if:{{{10|}}} |{{Clear}}{{{10|}}} }}<!--
     -->{{#if:{{{11|}}} |{{clr}}{{{11|}}} }}<!--
     -->{{#if:{{{11|}}} |{{Clear}}{{{11|}}} }}<!--
     -->{{#if:{{{12|}}} |{{clr}}{{{12|}}} }}<!--
     -->{{#if:{{{12|}}} |{{Clear}}{{{12|}}} }}<!--
     -->{{#if:{{{13|}}} |{{clr}}{{{13|}}} }}<!--
     -->{{#if:{{{13|}}} |{{Clear}}{{{13|}}} }}<!--
     -->{{#if:{{{14|}}} |{{clr}}{{{14|}}} }}<!--
     -->{{#if:{{{14|}}} |{{Clear}}{{{14|}}} }}<!--
     -->{{#if:{{{15|}}} |{{clr}}{{{15|}}} }}<!--
     -->{{#if:{{{15|}}} |{{Clear}}{{{15|}}} }}<!--
     -->{{#if:{{{16|}}} |{{clr}}{{{16|}}} }}<!--
     -->{{#if:{{{16|}}} |{{Clear}}{{{16|}}} }}<!--
     -->{{#if:{{{17|}}} |{{clr}}{{{17|}}} }}<!--
     -->{{#if:{{{17|}}} |{{Clear}}{{{17|}}} }}<!--
     -->{{#if:{{{18|}}} |{{clr}}{{{18|}}} }}<!--
     -->{{#if:{{{18|}}} |{{Clear}}{{{18|}}} }}<!--
     -->{{#if:{{{19|}}} |{{clr}}{{{19|}}} }}<!--
     -->{{#if:{{{19|}}} |{{Clear}}{{{19|}}} }}<!--
     -->{{#if:{{{20|}}} |{{clr}}{{{20|}}} }}<!--
     -->{{#if:{{{20|}}} |{{Clear}}{{{20|}}} }}<!--
     -->{{#if:{{{21|}}} |{{clr}}{{{21|}}} }}<!--
     -->{{#if:{{{21|}}} |{{Clear}}{{{21|}}} }}<!--
     -->{{#if:{{{22|}}} |{{clr}}{{{22|}}} }}<!--
     -->{{#if:{{{22|}}} |{{Clear}}{{{22|}}} }}<!--
     -->{{#if:{{{23|}}} |{{clr}}{{{23|}}} }}<!--
     -->{{#if:{{{23|}}} |{{Clear}}{{{23|}}} }}<!--
     -->{{#if:{{{24|}}} |{{clr}}{{{24|}}} }}<!--
     -->{{#if:{{{24|}}} |{{Clear}}{{{24|}}} }}<!--
     -->{{#if:{{{25|}}} |{{clr}}{{{25|}}} }}<!--
     -->{{#if:{{{25|}}} |{{Clear}}{{{25|}}} }}<!--
     -->{{#if:{{{26|}}} |{{clr}}{{{26|}}} }}<!--
     -->{{#if:{{{26|}}} |{{Clear}}{{{26|}}} }}<!--
     -->{{#if:{{{27|}}} |{{clr}}{{{27|}}} }}<!--
     -->{{#if:{{{27|}}} |{{Clear}}{{{27|}}} }}<!--
     -->{{#if:{{{28|}}} |{{clr}}{{{28|}}} }}<!--
     -->{{#if:{{{28|}}} |{{Clear}}{{{28|}}} }}<!--
     -->{{#if:{{{29|}}} |{{clr}}{{{29|}}} }}<!--
     -->{{#if:{{{29|}}} |{{Clear}}{{{29|}}} }}<!--
     -->{{#if:{{{30|}}} |{{clr}}{{{30|}}} }}<!--
     -->{{#if:{{{30|}}} |{{Clear}}{{{30|}}} }}<!--
     -->{{#if:{{{31|}}} |{{clr}}{{{31|}}} }}<!--
     -->{{#if:{{{31|}}} |{{Clear}}{{{31|}}} }}<!--
     -->{{#if:{{{32|}}} |{{clr}}{{{32|}}} }}<!--
     -->{{#if:{{{32|}}} |{{Clear}}{{{32|}}} }}<!--
     -->{{#if:{{{33|}}} |{{clr}}{{{33|}}} }}<!--
     -->{{#if:{{{33|}}} |{{Clear}}{{{33|}}} }}<!--
     -->{{#if:{{{34|}}} |{{clr}}{{{34|}}} }}<!--
     -->{{#if:{{{34|}}} |{{Clear}}{{{34|}}} }}<!--
     -->{{#if:{{{35|}}} |{{clr}}{{{35|}}} }}<!--
     -->{{#if:{{{35|}}} |{{Clear}}{{{35|}}} }}<!--
     -->{{#if:{{{36|}}} |{{clr}}{{{36|}}} }}<!--
     -->{{#if:{{{36|}}} |{{Clear}}{{{36|}}} }}<!--
     -->{{#if:{{{37|}}} |{{clr}}{{{37|}}} }}<!--
     -->{{#if:{{{37|}}} |{{Clear}}{{{37|}}} }}<!--
     -->{{#if:{{{38|}}} |{{clr}}{{{38|}}} }}<!--
     -->{{#if:{{{38|}}} |{{Clear}}{{{38|}}} }}<!--
     -->{{#if:{{{39|}}} |{{clr}}{{{39|}}} }}<!--
     -->{{#if:{{{39|}}} |{{Clear}}{{{39|}}} }}<!--
     -->{{#if:{{{40|}}} |{{clr}}{{{40|}}} }}<!--
     -->{{#if:{{{40|}}} |{{Clear}}{{{40|}}} }}<!--
     -->{{#if:{{{41|}}} |{{clr}}{{{41|}}} }}<!--
     -->{{#if:{{{41|}}} |{{Clear}}{{{41|}}} }}<!--
     -->{{#if:{{{42|}}} |{{clr}}{{{42|}}} }}<!--
     -->{{#if:{{{42|}}} |{{Clear}}{{{42|}}} }}<!--
     -->{{#if:{{{43|}}} |{{clr}}{{{43|}}} }}<!--
     -->{{#if:{{{43|}}} |{{Clear}}{{{43|}}} }}<!--
     -->{{#if:{{{44|}}} |{{clr}}{{{44|}}} }}<!--
     -->{{#if:{{{44|}}} |{{Clear}}{{{44|}}} }}<!--
     -->{{#if:{{{45|}}} |{{clr}}{{{45|}}} }}<!--
     -->{{#if:{{{45|}}} |{{Clear}}{{{45|}}} }}<!--
     -->{{#if:{{{46|}}} |{{clr}}{{{46|}}} }}<!--
     -->{{#if:{{{46|}}} |{{Clear}}{{{46|}}} }}<!--
     -->{{#if:{{{47|}}} |{{clr}}{{{47|}}} }}<!--
     -->{{#if:{{{47|}}} |{{Clear}}{{{47|}}} }}<!--
     -->{{#if:{{{48|}}} |{{clr}}{{{48|}}} }}<!--
     -->{{#if:{{{48|}}} |{{Clear}}{{{48|}}} }}<!--
     -->{{#if:{{{49|}}} |{{clr}}{{{49|}}} }}<!--
     -->{{#if:{{{49|}}} |{{Clear}}{{{49|}}} }}<!--
     -->{{#if:{{{50|}}} |{{clr}}{{{50|}}} }}<!--
     -->{{#if:{{{50|}}} |{{Clear}}{{{50|}}} }}<!--
  --></div>
  --></div>
</div><noinclude>
</div><noinclude>
Ce modèle crée une liste déroulante avec de la place pour jusqu'à 50 éléments.
This template creates a collapsible list with room for up to 50 items.


==Paramètres==
==Parameters==
;Non nommés
;Unnamed
Ces paramètres vont de 1 à 50 et ne nécessitent pas de nom de paramètre. Par exemple, '''<tt><nowiki>{{liste déroulante|un|deux|trois}}</nowiki></tt>''' donnera :
These range from 1–50 and don't require a parameter name. For instance '''<tt><nowiki>{{collapsible list|one|two|three}}</nowiki></tt>''' will result in:


{{liste déroulante|un|deux|trois}}
{{collapsible list|one|two|three}}


;Paramètres nommés
;Named parameters
Ces paramètres sont tous techniquement facultatifs, mais il est suggéré d'au moins donner le paramètre '''<tt>title</tt>'''.
These parameters are all technically optional, but it is suggested that you at least give the '''<tt>title</tt>''' parameter.
*'''<tt>title</tt>''': Le titre de la liste. Par défaut "Liste".
*'''<tt>title</tt>''': The title of the list. Default is "List".
*'''<tt>expand</tt>''': Mettre quelque chose ici fera que la liste sera développée au chargement de la page. Par défaut, elle est repliée.
*'''<tt>expand</tt>''': Putting something here will make the list expanded on page load. Default is collapsed.
*'''<tt>framestyle</tt>''': Style CSS pour le conteneur de la liste entière. Par défaut "border:none; padding:0;".
*'''<tt>framestyle</tt>''': CSS styling for the entire list container. Default is "border:none; padding:0;".
*'''<tt>titlestyle</tt>''': Style CSS pour l'élément titre. Par défaut "background:transparent;font-size:12px".
*'''<tt>titlestyle</tt>''': CSS styling for the title element. Default is "background:transparent;font-size:12px".
*'''<tt>liststyle</tt>''': Style CSS pour la liste elle-même. Par défaut "text-align:left;".
*'''<tt>liststyle</tt>''': CSS styling for the list itself. Default is "text-align:left;".


==Exemples==
==Examples==
;Modèle autonome
;Standalone template
<pre>{{liste déroulante
<pre>{{collapsible list
|un
|one
|deux
|two
|trois
|three
|title=Liste d'exemple
|title=Example list
|expand=yes
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|framestyle=padding:3px;border:1px solid black;
Ligne 84 : Ligne 84 :
|liststyle=text-align:left;color:blue;margin-left:10px;
|liststyle=text-align:left;color:blue;margin-left:10px;
}}</pre>
}}</pre>
{{liste déroulante
{{collapsible list
|un
|one
|deux
|two
|trois
|three
|title=Liste d'exemple
|title=Example list
|expand=yes
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|framestyle=padding:3px;border:1px solid black;
Ligne 96 : Ligne 96 :




;Dans un autre élément
;Within another element
<pre>{{liste déroulante
<pre>{{collapsible list
|[[bulbapedia:Sandshrew|Sandshrew d'Alola]]
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[[bulbapedia:Sandslash|Sandslash d'Alola]]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[[bulbapedia:Vulpix|Vulpix d'Alola]]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[[bulbapedia:Ninetails|Ninetails d'Alola]]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[[bulbapedia:Smoochum|Lippouti]]
|[[bulbapedia:Smoochum|Smoochum]]
|[[bulbapedia:Jynx|Lippoutou]]
|[[bulbapedia:Jinx|Jinx]]
|title=CT}}</pre>
|title=TMs}}</pre>


{|{{prettytable|style=width:250px}}
{|{{prettytable|style=width:250px}}
! Tableau d'exemple
! Example table
|-
|-
| {{collapsible list
| {{collapsible list
|[https://www.pokepedia.fr/Sabelette_d%27Alola Sabelette d'Alola]
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[https://www.pokepedia.fr/Sablaireau_d%27Alola Sablaireau d'Alola]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[https://www.pokepedia.fr/Goupix_d%27Alola Goupix d'Alola]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[https://www.pokepedia.fr/Feunard_d%27Alola Feunard d'Alola]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[https://www.pokepedia.fr/Lippouti Lippouti]
|[[bulbapedia:Smoochum|Smoochum]]
|[https://www.pokepedia.fr/Lippoutou Lippoutou]
|[[bulbapedia:Jinx|Jinx]]
|title=CT}}
|title=TMs}}
|}
|}
[[Category:Modèles]]</noinclude>
[[Category:Templates]]</noinclude>

Version du 8 septembre 2024 à 15:13

List

This template creates a collapsible list with room for up to 50 items.

Parameters

Unnamed

These range from 1–50 and don't require a parameter name. For instance {{collapsible list|one|two|three}} will result in:

List
one
two
three
Named parameters

These parameters are all technically optional, but it is suggested that you at least give the title parameter.

  • title: The title of the list. Default is "List".
  • expand: Putting something here will make the list expanded on page load. Default is collapsed.
  • framestyle: CSS styling for the entire list container. Default is "border:none; padding:0;".
  • titlestyle: CSS styling for the title element. Default is "background:transparent;font-size:12px".
  • liststyle: CSS styling for the list itself. Default is "text-align:left;".

Examples

Standalone template
{{collapsible list
|one
|two
|three
|title=Example list
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|liststyle=text-align:left;color:blue;margin-left:10px;
}}
Example list
one
two
three


Within another element
{{collapsible list
|[[bulbapedia:Sandshrew|Alolan Sandshrew]]
|[[bulbapedia:Sandslash|Alolan Sandslash]]
|[[bulbapedia:Vulpix|Alolan Vulpix]]
|[[bulbapedia:Ninetails|Alolan Ninetails]]
|[[bulbapedia:Smoochum|Smoochum]]
|[[bulbapedia:Jinx|Jinx]]
|title=TMs}}
Example table