Difference between revisions of "Template:Spoiler"
Extractum11 (talk | contribs) m (For cases where you want to hide something that's not necessarily a spoiler, for the sake of saving space.) |
m |
||
Line 1: | Line 1: | ||
− | <div class="spoilers gg-spoiler"> | + | <!-- <div class="spoilers gg-spoiler"> |
<span class="spoilers-button"> | <span class="spoilers-button"> | ||
<span class="spoilers-show" style="display:inline"><strong>{{{2|Spoiler!}}}</strong></span> | <span class="spoilers-show" style="display:inline"><strong>{{{2|Spoiler!}}}</strong></span> | ||
Line 7: | Line 7: | ||
{{{1|Spoiler text.}}} | {{{1|Spoiler text.}}} | ||
</div> | </div> | ||
− | </div><noinclude> | + | </div><noinclude> --> |
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed spoilbox"> | ||
+ | {{{1|Spoiler!}}} | ||
+ | <div class="mw-collapsible-content">{{{2|Spoiler text.}}} | ||
+ | </div></div> | ||
==Description== | ==Description== |
Revision as of 19:44, 17 January 2018
Spoiler!
Description
Use this template to add a spoiler section to a page (for inline text use Template:Hint instead).
This template replaces the tag provided by the <spoiler> extension. Originally it was intended to allow using tables (which the extension doesn't) but it turned out the template doesn't allow for it either. Still, it is recommended to use this template as we have more freedom to restyle it or change its behavior down the line if we want to.
Known issues
- Tables can not be formatted inside the template. Suggest using definition lists as a workaround.
- Spoiler content shouldn't be too huge anyway. If you want to hide a long table of info in a page, consider adding a link to another page.
Alternate method
While the examples suggested in this template work in most areas, the Template tag works if you wish to display alternative text than "Spoiler"
Examples
A basic spoiler like this may be better replaced with Template:Hint:
{{Spoiler| Sarina's clothes are not outside, but inside the [[Boarded up Basement]] dungeon. }}
A more complex spoiler, we use definition lists because a table can not be included inside it:
{{Spoiler| ; Utility : ''Word of Power: Cure Bovinity'' ... Speaking this word causes you to stop being a cow if you are one. ; Teleports : ''Word of Power: Teleport to Crypt'' ... Speaking this word teleports you to the crypt beneath the town of Serbule. }}