Template:Spoiler: Difference between revisions

mNo edit summary
m (more eyegrabbing)
 
(74 intermediate revisions by one other user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
For documentation on this template, see [[Template:Spoiler/doc]].
{{{{PAGENAME}}/doc}}
[[Category:Templates|Spoilers]]
[[Category:Templates|{{PAGENAME}}]]
</noinclude><onlyinclude><includeonly>
</noinclude><onlyinclude><includeonly>
{{ #switch: {{{1}}}  
{{ #switch: {{{1}}}  
| end = </span><span style="border:1px solid black; padding: 2px; text-align:left; background-color:#FF6666; display:inline;"> Thou hast defeated the spoiler.</span>
| end = </div></div>
</span>
| start = <div class="toccolours mw-collapsible mw-collapsed" style=" overflow: hidden;">'''''Warning: Spoilers!'''''<br/>Click expand to view content<!-- overflow: hidden; due to the float here --><div class="mw-collapsible-content">
| start = <span class="collapsible collapsed" style="margin-top:10px; margin-bottom:10px;">  
<span style="border:1px solid black; padding: 5px; text-align:left; background-color:#FF6666;"> A spoiler draws near!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Click 'show' to display, otherwise run away!</span><span>
| #default = <span style="margin-top:10px; margin-bottom:10px;">  
<span style="border:1px solid black; padding: 5px; text-align:left; background-color:#FF6666; display:inline;"> A spoiler draws near!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not read further if you want to avoid being spoiled!</span>
}}</includeonly></onlyinclude>
}}</includeonly></onlyinclude>

Latest revision as of 01:34, 19 April 2020

The spoiler template is used to mark sections of an article which might contain spoiler information.

UsageEdit

This template should be called in pairs. One call before spoiler information starts, and one after.

StartEdit

A spoiler start should be the first invocation of the template.

{{spoiler|start}}
  • start: A required parameter which marks a section as the start of a spoiler.

EndEdit

A spoiler end should be the second invocation of the template.

{{spoiler|end}}
  • end: A required parameter which marks a section as the end of a spoiler.

ExampleEdit

SampleEdit

Warning: Spoilers!
Click expand to view content

This is spoiler information. OMGz!


CodeEdit

{{spoiler|start}}
Spoiler text goes here.
{{spoiler|end}}