Template:Spoiler: Difference between revisions
From Step Mods | Change The Game
TechAngel85 (talk | contribs) No edit summary |
TechAngel85 (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><div id="collapse-pre-one" class="mw-collapsible mw-collapsed" style="margin-bottom:1em;"><div class="mw-collapsible-toggle" style="float:none; cursor:pointer; color:#8DA9C0; display:{{#ifeq:{{{h2}}}|1|initial|inline-block}};"><span class="up">➕</span><span class="down">➖</span> {{{shown}}}</div><div class="mw-collapsible-content">< | <includeonly><div id="collapse-pre-one" class="mw-collapsible mw-collapsed" style="margin-bottom:1em;"><div class="mw-collapsible-toggle" style="float:none; cursor:pointer; color:#8DA9C0; display:{{#ifeq:{{{h2}}}|1|initial|inline-block}};"><span class="up">➕</span><span class="down">➖</span> {{{shown}}}</div><div class="mw-collapsible-content"><div>{{{hidden}}}</div></div></div></includeonly><noinclude>__NOTOC____NOTITLE__ [[Category:Layout Templates]] | ||
==Purpose & Usage== | ==Purpose & Usage== |
Revision as of 21:20, June 12, 2021
Purpose & Usage
This template allows text to be clicked like a spoiler to show hidden text immediately underneath it.
Parameters
- parameter shown is the text clicked to show the hidden content
- parameter hidden is the hidden content
- parameter h2 if set to 1 will make the shown text have the initial display property (useful for the header 2 level, since it is underlined).
Examples
Code:
{{Spoiler|shown=Click Me!|hidden=Where did this come from?}}
Result:
➕➖ Click Me!
Where did this come from?
Code:
{{Spoiler|shown=Click To Reveal Hidden List|hidden=some text, a <br>, or a # Beginning with a list}}
Result:
➕➖ Click To Reveal Hidden List
some text, a <br>, or a
- Beginning with a list
Code:
{{Spoiler|shown=Click To Reveal Hidden Heading|hidden=some text, a <br>, or a ===Include a heading=== some text, a <br>, a list, or a }}
Result:
➕➖ Click To Reveal Hidden Heading
some text, a <br>, or a
Include a heading
some text, a <br>, a list, or a Known Issues
- Wiki markup for lists will not be honored unless placeholder text is used at the beginning of the hidden text followed by a line break in the markup.
- Wiki markup for headings will not be honored unless placeholder text is used at the beginning of the hidden text and followed by a line break in the markup before the heading AND a line break in the markup after the heading followed by placeholder text.
- Incompatible with CSS extension
See Also
No similar templates known.