Template:SpoilerBox: Difference between revisions

From PuppyDog Online Wiki
Jump to navigation Jump to search
Fixed so that both title and without are supported
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>
<div class="mw-collapsible mw-collapsed" style="border:1px solid #aaa; background:#f9f9f9; padding:0.5em; margin:1em 0;">
{{#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>
</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.}