Template:Spoiler: Difference between revisions
Jump to navigation
Jump to search
(Created a template for easier to use spoilers) |
(Added width-parameter, added link to collapsible-template.) |
||
Line 1: | Line 1: | ||
<includeonly>{| class="wikitable mw-collapsible mw-collapsed" width=" | <includeonly>{| class="wikitable mw-collapsible mw-collapsed" {{#if: {{{width|}}}|width="{{{width}}}"|}} | ||
! {{#if: {{{title|}}}|{{{title}}}|Spoiler}} | ! {{#if: {{{title|}}}|{{{title}}}|Spoiler}} | ||
|- | |- | ||
Line 6: | Line 6: | ||
|}</includeonly><noinclude> | |}</includeonly><noinclude> | ||
== About == | == About == | ||
Some collapsible elements look rather ugly with an out of place expand/collapse-button. This template uses a minimalist table to fit any content with style. | Some collapsible elements look rather ugly with an out of place expand/collapse-button. This template uses a minimalist table to fit any content with style. For a more compact version see [[Template:Collapsible]]. | ||
== Parameter-Usage == | == Parameter-Usage == | ||
Line 21: | Line 21: | ||
| Spoiler | | Spoiler | ||
| Visible title of the spoiler | | Visible title of the spoiler | ||
|- | |||
! title | |||
| | |||
| Optional, width of table, useful to prevent jumpy layout on expand. | |||
|} | |} | ||
Line 31: | Line 35: | ||
<pre>{{Spoiler | <pre>{{Spoiler | ||
| title=Do not click | | title=Do not click | ||
| width=300 | |||
| content=How | | content=How | ||
Line 39: | Line 44: | ||
{{Spoiler | {{Spoiler | ||
| title=Do not click | | title=Do not click | ||
| width=300 | |||
| content=How | | content=How | ||
Latest revision as of 12:46, 4 May 2020
About
Some collapsible elements look rather ugly with an out of place expand/collapse-button. This template uses a minimalist table to fit any content with style. For a more compact version see Template:Collapsible.
Parameter-Usage
Parameter | Default | Description |
---|---|---|
content | Content that needs to be hidden | |
title | Spoiler | Visible title of the spoiler |
title | Optional, width of table, useful to prevent jumpy layout on expand. |
Examples
Bare
{{Spoiler}}
Spoiler |
---|
Bare - Hidden Processing-Options
{{Spoiler | title=Do not click | width=300 | content=How DARE you! }}
Do not click |
---|
How DARE you! |