Template:SpoilerBox: Difference between revisions
Jump to navigation
Jump to search
Pupswoof117 (talk | contribs) Fixed so that both title and without are supported |
Pupswoof117 (talk | contribs) FFS why wasn't this fixed before?? |
||
| Line 5: | Line 5: | ||
* {{SpoilerBox|title=Optional title|content=Spoiler content here.}} | * {{SpoilerBox|title=Optional title|content=Spoiler content here.}} | ||
</noinclude> | </noinclude> | ||
{{#tag:div| | |||
'''{{{title|Spoiler (click to reveal)}}}''' | '''{{{title|Spoiler (click to reveal)}}}''' | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
{{#if:{{{content|}}}|{{{content}}}|{{{1|<i>No content provided.</i>}}}} | {{#if:{{{content|}}}|{{{content}}}|{{{1|<i>No content provided.</i>}}}} | ||
</div> | </div> | ||
|class="mw-collapsible mw-collapsed" style="border:1px solid #aaa; background:#f9f9f9; padding:0.5em; margin:1em 0;" | |||
}} | |||
Revision as of 06:13, 13 July 2025
This template shows a collapsible spoiler box. Usage:
{{#tag:div| Spoiler (click to reveal)
This is spoiler content only.}
{{#tag:div| Optional title
Spoiler content here.
{{#tag:div| Spoiler (click to reveal)
No content provided.}