Template:SpoilerBox: Difference between revisions
Jump to navigation
Jump to search
Pupswoof117 (talk | contribs) FFS why wasn't this fixed before?? |
Pupswoof117 (talk | contribs) woof |
||
| Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
This template shows a collapsible spoiler box. | This template shows a collapsible spoiler box. | ||
Usage: | Usage: | ||
* {{SpoilerBox|This is spoiler content only.}} | * {{SpoilerBox|This is spoiler content only.}} | ||
* {{SpoilerBox|title=Optional title|content=Spoiler content here.}} | * {{SpoilerBox|title=Optional title|content=Spoiler content here.}} | ||
Optional parameters: | |||
* `class=` — add extra classes (e.g. `dark-spoiler`) | |||
* `style=` — add custom inline style overrides | |||
To make your own dark style: add CSS for `.dark-spoiler` in your MediaWiki:Common.css | |||
</noinclude> | </noinclude> | ||
{{#tag:div| | {{#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= | |class={{#if:{{{class|}}}|mw-collapsible mw-collapsed {{{class}}}|mw-collapsible mw-collapsed}} | ||
|style={{#if:{{{style|}}}|{{{style}}}|border:1px solid #aaa; background:#f9f9f9; padding:0.5em; margin:1em 0;}} | |||
}} | }} | ||
Revision as of 06:16, 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.
Optional parameters:
- `class=` — add extra classes (e.g. `dark-spoiler`)
- `style=` — add custom inline style overrides
To make your own dark style: add CSS for `.dark-spoiler` in your MediaWiki:Common.css
{{#tag:div| ⚠️ Spoiler (click to reveal)
No content provided.}