Template:Spoiler: Difference between revisions

From Dragon Quest Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(45 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<noinclude>
<onlyinclude><includeonly>
For documentation on this template, see [[Template:Spoiler/doc]].
{{#switch: {{{1}}}  
[[Category:Templates|Spoilers]]
| end = </div></div>
</noinclude><onlyinclude><includeonly>
| start = <div class="toccolours mw-collapsible mw-collapsed" style="overflow: hidden;">'''''Warning: Spoilers!'''''{{#if:{{{2|}}}|<br>This page contains spoilers for {{{2}}}. Read at your own discretion.|}}<br/>Click expand to view content<!-- overflow: hidden; due to the float here --><div class="mw-collapsible-content">
{{ #switch: {{{1}}}  
| end = <div style="border:1px solid black; padding: 2px; font-weight: bold; text-align:left; background-color:#FF6666;"> Thou hast defeated the spoiler.</div></div>
}}</includeonly></onlyinclude><noinclude>
</div>
{{Spoiler/doc}}
| start = <div class="collapsible collapsed" style="margin-top:10px; margin-bottom:10px; margin-right:10px;">  
[[Category:Templates]]
<div 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!</div><div>
</noinclude>
}}</includeonly></onlyinclude>

Latest revision as of 01:47, 3 March 2026

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

Usage[edit source]

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

Start[edit source]

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

{{spoiler|start|media}}
  • start: A required parameter which marks a section as the start of a spoiler.
  • media: An optional parameter which indicates which media the information might be spoiling.

End[edit source]

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.

Example[edit source]

Sample[edit source]

Warning: Spoilers!
Click expand to view content

This is spoiler information. OMGz!


Warning: Spoilers!
This page contains spoilers for Dragon Quest V. Read at your own discretion.
Click expand to view content

This is spoiler information. OMGz!

Code[edit source]

{{spoiler|start}}
Spoiler text goes here.
{{spoiler|end}}
{{spoiler|start|[[Dragon Quest V]]}}
Spoiler text goes here.
{{spoiler|end}}