Difference between revisions of "Template:spoiler"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
m
m
 
(41 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>
+
<span class="plainlinks">{{notice2|<big><big>{{#if:{{{1|}}}|'''[[109: Spoiler Alert|''Spoiler alert!'']]'''|'''''Spoiler alert!'''''}}</big></big><br><!--
===Usage===
 
  
This template is for marking spoilers.
+
-->{{{1|The following explanation contains [[109: Spoiler Alert|spoilers]].}}}}}</span><noinclude>
For instance, to spoiler "Snape kills Trinity with Rosebud", you would type "<code><nowiki>{{Spoiler|''xkcd 109''|Snape kills Trinity with Rosebud.}}</nowiki></code>" for a result of "Spoiler[s] for ''xkcd 109'': <span style="color: lightgray"><span style="background-color: lightgray">Snape kills Trinity with Rosebud.</span></span>"
 
  
===Wikicode===
+
==Usage==
 +
If you do not include the reason for the spoiler notice, this is what it will look like:
  
<code><nowiki>Spoiler[s] for {{1||''xkcd 109''}}: <span style="color: lightgray"><span style="background-color: lightgray">{{{2|Snape kills Trinity with Rosebud}}}</span></span></nowiki></code></noinclude>
+
<code>{{<nowiki></nowiki>spoiler}}</code>{{spoiler}}
  
<includeonly>Spoiler[s] for {{{1||''xkcd 109''}}}: <span style="color: lightgray"><span style="background-color: lightgray">{{{2|Snape kills Trinity with Rosebud}}}</span></span></includeonly>
+
If you include a reason, you'll get this:
  
<noinclude>[[Category: Templates]]</noinclude>
+
<code>{{<nowiki></nowiki>spoiler|reason}}</code>{{spoiler|reason}}
 +
[[Category: Templates]]

Latest revision as of 17:48, 28 March 2025

warning!!.png Spoiler alert!
The following explanation contains spoilers.

Usage[edit]

If you do not include the reason for the spoiler notice, this is what it will look like:

{{spoiler}}
warning!!.png Spoiler alert!
The following explanation contains spoilers.

If you include a reason, you'll get this:

{{spoiler|reason}}