Template:Spoiler: Difference between revisions

From Dragon Quest Wiki
m (132 revisions: importing Template namespace from Wikia)
 
(reverting to a simpler spoiler template, using show/hide is just too complicated)
Line 1: Line 1:
<noinclude>
<noinclude>
{{/doc}}
{{{{PAGENAME}}/doc}}
[[Category:Templates|Spoilers]]
[[Category:Templates|{{PAGENAME}}]]
[[Category:Notices|{{PAGENAME}}]]
[[Category:Notices|{{PAGENAME}}]]
</noinclude><onlyinclude><includeonly>
</noinclude><onlyinclude><includeonly>
{{ #switch: {{{1}}}  
{{ #switch: {{{1}}}  
| end = </div><div style="border:1px solid black; padding: 2px; text-align:left; background-color:#FF6666; display:inline;"> Thou hast defeated the spoiler.</div>
| end = <div style="border-top:solid 2px #ddd; border-bottom:solid 2px #ddd">'''Spoilers end here'''</div>
| start = <div style="border-top:solid 2px #ddd; border-bottom:solid 2px #ddd">
'''[[Dragon Quest Wiki:Spoiler policy|<span style="color:red;">Spoiler warning</span>]]''': '''Plot and/or ending details follow.'''
</div>
</div>
| start = <div class="collapsible collapsed" style="float:left; width:100%; margin-top:10px; margin-bottom:10px;">
| #default = <div style="border-top:solid 2px #ddd; border-bottom:solid 2px #ddd">
<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>
'''[[Dragon Quest Wiki:Spoiler policy|<span style="color:red;">Spoiler warning</span>]]''': '''Plot and/or ending details follow.'''
| #default = <div style="border:1px solid black; padding: 5px; text-align:left; background-color:#FF6666;"> A spoiler draws near!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do not read further if you want to avoid being spoiled!</div>
}}</includeonly></onlyinclude>
}}</includeonly></onlyinclude>

Revision as of 01:20, 21 October 2010

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

Usage

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

Start

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.

End

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

Sample

Spoiler warning: Plot and/or ending details follow.

This is spoiler information. OMGz!

Spoilers end here


Code

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