Difference between revisions of "Template:Collapsible"
From HeRO Wiki
(Created page with "<div class="mw-collapsible mw-collapsed" style="width:95%; margin-left: 2.5%; margin-right:2.5%;"> <div style="height:25px; background-color:#ECC788; vertical-align:middle; te...") |
m |
||
(One intermediate revision by one user not shown) | |||
Line 1: | Line 1: | ||
− | <div class="mw-collapsible mw-collapsed" style="width:95%; margin-left: 2.5%; margin-right:2.5%;"> | + | <includeonly> |
+ | <div class="mw-collapsible {{t|1=|1{{{collapsed|}}}= mw-collapsed}}" style="width:95%; margin-left: 2.5%; margin-right:2.5%;"> | ||
<div style="height:25px; background-color:#ECC788; vertical-align:middle; text-align:center; font-size:120%;">{{{text|text}}}</div> | <div style="height:25px; background-color:#ECC788; vertical-align:middle; text-align:center; font-size:120%;">{{{text|text}}}</div> | ||
<div class="mw-collapsible-content" style="padding:15px;"> | <div class="mw-collapsible-content" style="padding:15px;"> | ||
{{{content|content}}} | {{{content|content}}} | ||
</div></div> | </div></div> | ||
+ | </includeonly> | ||
<noinclude> | <noinclude> | ||
==Usage== | ==Usage== | ||
− | This template is preferably used for long content that stretches the page. | + | This template is preferably used for long content that stretches the page. This template is collapsed by default. |
− | < | + | {| class=wikitable {{prettytable}} |
− | {{collapsible | + | !Parameter |
− | |text= | + | !Usage |
− | |content= | + | |- |
− | }} | + | | {{{text}}} |
− | </ | + | | Any data input here is always shown regardless of whether it is collapsed or not. Defaults to show "text" when there is no input. |
+ | '''Example''': <nowiki>{{collapsible|text=Hello}}</nowiki> | ||
+ | {{collapsible|text=Hello}} | ||
+ | |||
+ | |- | ||
+ | | {{{content}}} | ||
+ | | Any data input here can be hidden when collapsed. Defaults to show "content" when there is no input. | ||
+ | '''Example''': <nowiki>{{collapsible|content=Hello}}</nowiki> | ||
+ | {{collapsible|content=Hello}} | ||
+ | |||
+ | |- | ||
+ | | {{{collapsed}}} | ||
+ | | Any data input here will cause it to not default to collapsed. | ||
+ | '''Example''': <nowiki>{{collapsible|collapsed=a}}</nowiki> | ||
+ | {{collapsible|collapsed=a}} | ||
+ | |} | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude> | </noinclude> |
Latest revision as of 08:19, 20 October 2019
Usage
This template is preferably used for long content that stretches the page. This template is collapsed by default.
Parameter | Usage |
---|---|
{{{text}}} | Any data input here is always shown regardless of whether it is collapsed or not. Defaults to show "text" when there is no input.
Example: {{collapsible|text=Hello}} Hello
content
|
{{{content}}} | Any data input here can be hidden when collapsed. Defaults to show "content" when there is no input.
Example: {{collapsible|content=Hello}} text
Hello
|
{{{collapsed}}} | Any data input here will cause it to not default to collapsed.
Example: {{collapsible|collapsed=a}} text
content
|