Template:Spoiler: Difference between revisions
From Step Mods | Change The Game
TechAngel85 (talk | contribs) |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div id="collapse-pre-one" class="mw-collapsible mw-collapsed" | <includeonly><!-- | ||
--><div id="collapse-pre-one" class="mw-collapsible mw-collapsed spoiler"><!-- | |||
SPOILER TOGGLE | |||
--><div class="mw-collapsible-toggle"><span class="up small">➕ [Click to show]</span><span class="down small">➖ [Click to hide]</span> <span class=orangetx>{{{shown}}}</span><!-- | |||
SPOILER CONTENT | |||
--></div><div class="mw-collapsible-content spoiler-content p-2 pl-4"> | |||
{{{hidden}}}</div><!-- | |||
--></div><!-- | |||
--></includeonly><noinclude>__NOTOC____NOTITLE__ [[Category:Instruction Templates]][[Category:Formatting Templates]][[Category:Layout Templates]] | |||
==Purpose & Usage== | ==Purpose & Usage== | ||
Line 5: | Line 13: | ||
===Parameters=== | ===Parameters=== | ||
*''parameter shown'' is the | *''parameter shown'' is the 'shown' title of the toggle when collapsed | ||
*''parameter hidden'' is the hidden content | *''parameter hidden'' is the hidden content under the toggle when expanded | ||
==Examples== | ==Examples== | ||
'''Code:''' | '''Code:''' | ||
<pre>{{Spoiler|shown= | <pre>{{Spoiler|shown=Instructions|hidden=Hidden content}}</pre> | ||
'''Result:''' | '''Result:''' | ||
{{Spoiler|shown= | {{Spoiler|shown=Instructions|hidden=Hidden content}} | ||
'''Code:''' | '''Code:''' | ||
<pre>{{Spoiler|shown= | <pre>{{Spoiler|shown=Procedure|hidden=# Beginning with a list now works. | ||
# Beginning with a list}}</pre> | #*You can nest different types of lists. | ||
#*:It Just Works!}}</pre> | |||
'''Result:''' | '''Result:''' | ||
{{Spoiler|shown= | {{Spoiler|shown=Procedure|hidden=# Beginning with a list now works. | ||
# Beginning with a list}} | #*You can nest different types of lists. | ||
#*:It Just Works!}} | |||
'''Code:''' | '''Code:''' | ||
<pre>{{Spoiler|shown= | <pre>{{Spoiler|shown=A Process|hidden= ===Include a heading=== | ||
===Include a heading=== | Headings now work on the first line with no extra things in front of it.}}</pre> | ||
'''Result:''' | '''Result:''' | ||
{{Spoiler|shown= | {{Spoiler|shown=A Process|hidden= ===Include a heading=== | ||
===Include a heading=== | Headings now work on the first line with no extra things in front of it.}} | ||
== Known Issues == | == Known Issues == | ||
* Incompatible with CSS extension | * Incompatible with CSS extension | ||
Revision as of 23:38, April 18, 2023
Purpose & Usage[edit source]
This template allows text to be clicked like a spoiler to show hidden text immediately underneath it.
Parameters[edit source]
- parameter shown is the 'shown' title of the toggle when collapsed
- parameter hidden is the hidden content under the toggle when expanded
Examples[edit source]
Code:
{{Spoiler|shown=Instructions|hidden=Hidden content}}
Result:
➕ [Click to show]➖ [Click to hide] Instructions
Hidden content
Code:
{{Spoiler|shown=Procedure|hidden=# Beginning with a list now works. #*You can nest different types of lists. #*:It Just Works!}}
Result:
➕ [Click to show]➖ [Click to hide] Procedure
- Beginning with a list now works.
- You can nest different types of lists.
- It Just Works!
- You can nest different types of lists.
Code:
{{Spoiler|shown=A Process|hidden= ===Include a heading=== Headings now work on the first line with no extra things in front of it.}}
Result:
➕ [Click to show]➖ [Click to hide] A Process
Include a heading
Headings now work on the first line with no extra things in front of it.Known Issues[edit source]
- Incompatible with CSS extension
See Also[edit source]
No similar templates known.