Template:Spoiler: Difference between revisions

Jump to navigation Jump to search
196 bytes added ,  12:46, 4 May 2020
Added width-parameter, added link to collapsible-template.
(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="600"
<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


1,133

edits

Navigation menu