« 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| | -->{{{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|}}} |{{ | -->{{#if:{{{2|}}} |{{Clear}}{{{2|}}} }}<!-- | ||
-->{{#if:{{{3|}}} |{{ | -->{{#if:{{{3|}}} |{{Clear}}{{{3|}}} }}<!-- | ||
-->{{#if:{{{4|}}} |{{ | -->{{#if:{{{4|}}} |{{Clear}}{{{4|}}} }}<!-- | ||
-->{{#if:{{{5|}}} |{{ | -->{{#if:{{{5|}}} |{{Clear}}{{{5|}}} }}<!-- | ||
-->{{#if:{{{6|}}} |{{ | -->{{#if:{{{6|}}} |{{Clear}}{{{6|}}} }}<!-- | ||
-->{{#if:{{{7|}}} |{{ | -->{{#if:{{{7|}}} |{{Clear}}{{{7|}}} }}<!-- | ||
-->{{#if:{{{8|}}} |{{ | -->{{#if:{{{8|}}} |{{Clear}}{{{8|}}} }}<!-- | ||
-->{{#if:{{{9|}}} |{{ | -->{{#if:{{{9|}}} |{{Clear}}{{{9|}}} }}<!-- | ||
-->{{#if:{{{10|}}} |{{ | -->{{#if:{{{10|}}} |{{Clear}}{{{10|}}} }}<!-- | ||
-->{{#if:{{{11|}}} |{{ | -->{{#if:{{{11|}}} |{{Clear}}{{{11|}}} }}<!-- | ||
-->{{#if:{{{12|}}} |{{ | -->{{#if:{{{12|}}} |{{Clear}}{{{12|}}} }}<!-- | ||
-->{{#if:{{{13|}}} |{{ | -->{{#if:{{{13|}}} |{{Clear}}{{{13|}}} }}<!-- | ||
-->{{#if:{{{14|}}} |{{ | -->{{#if:{{{14|}}} |{{Clear}}{{{14|}}} }}<!-- | ||
-->{{#if:{{{15|}}} |{{ | -->{{#if:{{{15|}}} |{{Clear}}{{{15|}}} }}<!-- | ||
-->{{#if:{{{16|}}} |{{ | -->{{#if:{{{16|}}} |{{Clear}}{{{16|}}} }}<!-- | ||
-->{{#if:{{{17|}}} |{{ | -->{{#if:{{{17|}}} |{{Clear}}{{{17|}}} }}<!-- | ||
-->{{#if:{{{18|}}} |{{ | -->{{#if:{{{18|}}} |{{Clear}}{{{18|}}} }}<!-- | ||
-->{{#if:{{{19|}}} |{{ | -->{{#if:{{{19|}}} |{{Clear}}{{{19|}}} }}<!-- | ||
-->{{#if:{{{20|}}} |{{ | -->{{#if:{{{20|}}} |{{Clear}}{{{20|}}} }}<!-- | ||
-->{{#if:{{{21|}}} |{{ | -->{{#if:{{{21|}}} |{{Clear}}{{{21|}}} }}<!-- | ||
-->{{#if:{{{22|}}} |{{ | -->{{#if:{{{22|}}} |{{Clear}}{{{22|}}} }}<!-- | ||
-->{{#if:{{{23|}}} |{{ | -->{{#if:{{{23|}}} |{{Clear}}{{{23|}}} }}<!-- | ||
-->{{#if:{{{24|}}} |{{ | -->{{#if:{{{24|}}} |{{Clear}}{{{24|}}} }}<!-- | ||
-->{{#if:{{{25|}}} |{{ | -->{{#if:{{{25|}}} |{{Clear}}{{{25|}}} }}<!-- | ||
-->{{#if:{{{26|}}} |{{ | -->{{#if:{{{26|}}} |{{Clear}}{{{26|}}} }}<!-- | ||
-->{{#if:{{{27|}}} |{{ | -->{{#if:{{{27|}}} |{{Clear}}{{{27|}}} }}<!-- | ||
-->{{#if:{{{28|}}} |{{ | -->{{#if:{{{28|}}} |{{Clear}}{{{28|}}} }}<!-- | ||
-->{{#if:{{{29|}}} |{{ | -->{{#if:{{{29|}}} |{{Clear}}{{{29|}}} }}<!-- | ||
-->{{#if:{{{30|}}} |{{ | -->{{#if:{{{30|}}} |{{Clear}}{{{30|}}} }}<!-- | ||
-->{{#if:{{{31|}}} |{{ | -->{{#if:{{{31|}}} |{{Clear}}{{{31|}}} }}<!-- | ||
-->{{#if:{{{32|}}} |{{ | -->{{#if:{{{32|}}} |{{Clear}}{{{32|}}} }}<!-- | ||
-->{{#if:{{{33|}}} |{{ | -->{{#if:{{{33|}}} |{{Clear}}{{{33|}}} }}<!-- | ||
-->{{#if:{{{34|}}} |{{ | -->{{#if:{{{34|}}} |{{Clear}}{{{34|}}} }}<!-- | ||
-->{{#if:{{{35|}}} |{{ | -->{{#if:{{{35|}}} |{{Clear}}{{{35|}}} }}<!-- | ||
-->{{#if:{{{36|}}} |{{ | -->{{#if:{{{36|}}} |{{Clear}}{{{36|}}} }}<!-- | ||
-->{{#if:{{{37|}}} |{{ | -->{{#if:{{{37|}}} |{{Clear}}{{{37|}}} }}<!-- | ||
-->{{#if:{{{38|}}} |{{ | -->{{#if:{{{38|}}} |{{Clear}}{{{38|}}} }}<!-- | ||
-->{{#if:{{{39|}}} |{{ | -->{{#if:{{{39|}}} |{{Clear}}{{{39|}}} }}<!-- | ||
-->{{#if:{{{40|}}} |{{ | -->{{#if:{{{40|}}} |{{Clear}}{{{40|}}} }}<!-- | ||
-->{{#if:{{{41|}}} |{{ | -->{{#if:{{{41|}}} |{{Clear}}{{{41|}}} }}<!-- | ||
-->{{#if:{{{42|}}} |{{ | -->{{#if:{{{42|}}} |{{Clear}}{{{42|}}} }}<!-- | ||
-->{{#if:{{{43|}}} |{{ | -->{{#if:{{{43|}}} |{{Clear}}{{{43|}}} }}<!-- | ||
-->{{#if:{{{44|}}} |{{ | -->{{#if:{{{44|}}} |{{Clear}}{{{44|}}} }}<!-- | ||
-->{{#if:{{{45|}}} |{{ | -->{{#if:{{{45|}}} |{{Clear}}{{{45|}}} }}<!-- | ||
-->{{#if:{{{46|}}} |{{ | -->{{#if:{{{46|}}} |{{Clear}}{{{46|}}} }}<!-- | ||
-->{{#if:{{{47|}}} |{{ | -->{{#if:{{{47|}}} |{{Clear}}{{{47|}}} }}<!-- | ||
-->{{#if:{{{48|}}} |{{ | -->{{#if:{{{48|}}} |{{Clear}}{{{48|}}} }}<!-- | ||
-->{{#if:{{{49|}}} |{{ | -->{{#if:{{{49|}}} |{{Clear}}{{{49|}}} }}<!-- | ||
-->{{#if:{{{50|}}} |{{ | -->{{#if:{{{50|}}} |{{Clear}}{{{50|}}} }}<!-- | ||
--></div> | --></div> | ||
</div><noinclude> | </div><noinclude> | ||
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 '''<tt><nowiki>{{collapsible list|one|two|three}}</nowiki></tt>''' will result in: | |||
{{ | {{collapsible list|one|two|three}} | ||
; | ;Named parameters | ||
These parameters are all technically optional, but it is suggested that you at least give the '''<tt>title</tt>''' parameter. | |||
*'''<tt>title</tt>''': | *'''<tt>title</tt>''': The title of the list. Default is "List". | ||
*'''<tt>expand</tt>''': | *'''<tt>expand</tt>''': Putting something here will make the list expanded on page load. Default is collapsed. | ||
*'''<tt>framestyle</tt>''': | *'''<tt>framestyle</tt>''': CSS styling for the entire list container. Default is "border:none; padding:0;". | ||
*'''<tt>titlestyle</tt>''': | *'''<tt>titlestyle</tt>''': CSS styling for the title element. Default is "background:transparent;font-size:12px". | ||
*'''<tt>liststyle</tt>''': | *'''<tt>liststyle</tt>''': CSS styling for the list itself. Default is "text-align:left;". | ||
== | ==Examples== | ||
; | ;Standalone template | ||
<pre>{{ | <pre>{{collapsible list | ||
| | |one | ||
| | |two | ||
| | |three | ||
|title= | |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> | ||
{{ | {{collapsible list | ||
| | |one | ||
| | |two | ||
| | |three | ||
|title= | |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 : | ||
; | ;Within another element | ||
<pre>{{ | <pre>{{collapsible list | ||
|[[bulbapedia:Sandshrew|Sandshrew | |[[bulbapedia:Sandshrew|Alolan Sandshrew]] | ||
|[[bulbapedia:Sandslash|Sandslash | |[[bulbapedia:Sandslash|Alolan Sandslash]] | ||
|[[bulbapedia:Vulpix|Vulpix | |[[bulbapedia:Vulpix|Alolan Vulpix]] | ||
|[[bulbapedia:Ninetails|Ninetails | |[[bulbapedia:Ninetails|Alolan Ninetails]] | ||
|[[bulbapedia:Smoochum| | |[[bulbapedia:Smoochum|Smoochum]] | ||
|[[bulbapedia: | |[[bulbapedia:Jinx|Jinx]] | ||
|title= | |title=TMs}}</pre> | ||
{|{{prettytable|style=width:250px}} | {|{{prettytable|style=width:250px}} | ||
! | ! Example table | ||
|- | |- | ||
| {{collapsible list | | {{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= | |title=TMs}} | ||
|} | |} | ||
[[Category: | [[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
onetwothree
- 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
onetwothree
- 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 |
---|