Difference between revisions of "Template:Spoiler"

From Twinsuniverse
Jump to: navigation, search
(Created page with "<noinclude> This template mimics the spoiler on the [http://forum.magicball.net/ Magicball Network forums], for use in articles. Any content within the spoiler is hidden init...")
 
m (added doc about combining spoiler with list)
Line 2: Line 2:
 
This template mimics the spoiler on the [http://forum.magicball.net/ Magicball Network forums], for use in articles.
 
This template mimics the spoiler on the [http://forum.magicball.net/ Magicball Network forums], for use in articles.
  
Any content within the spoiler is hidden initially, but when the Expand-link is clicked, the spoiler opens and displays the content normally. This is useful for hiding information that is considered to highly spoil new visitors.
+
Any content within the spoiler is hidden initially, but when the Expand-link is clicked, the spoiler opens and displays the content normally. This is useful for e.g. hiding information that is considered to highly spoil new visitors.
  
 
==Parameters==
 
==Parameters==
 
# The text to include in the spoiler (no parameter name)
 
# The text to include in the spoiler (no parameter name)
 
  
 
==Syntax==
 
==Syntax==
 
  <nowiki>{{spoiler|hidden text}}</nowiki>
 
  <nowiki>{{spoiler|hidden text}}</nowiki>
  
==Example==
+
==Examples==
 
To use a spoiler in an article, for example:
 
To use a spoiler in an article, for example:
 
  <nowiki>{{spoiler
 
  <nowiki>{{spoiler
Line 25: Line 24:
 
|}
 
|}
 
<noinclude>
 
<noinclude>
 +
 +
Tip: the spoiler is best combined with the {{templatelink|list}} template, to show a bulleted list of spoiler sentences in one go.
 +
<nowiki>{{spoiler|{{list
 +
|Once upon a time.
 +
|There was.
 +
|A listed spoiler.
 +
|Is that a pun?
 +
}}}}</nowiki>
 +
 +
 +
{| class="mw-collapsible mw-collapsed" style="border: 1px dashed; padding: 4px; width: 100%;"
 +
! style="text-align: left;" | Spoiler:
 +
|- style="display: none"
 +
| class="mw-collapsible-content" |{{list
 +
|Once upon a time.
 +
|There was.
 +
|A listed spoiler.
 +
|Is that a pun?
 +
}}
 +
|}
  
 
[[Category:Twinsuniverse - Templates]]
 
[[Category:Twinsuniverse - Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 22:58, 24 May 2014

This template mimics the spoiler on the Magicball Network forums, for use in articles.

Any content within the spoiler is hidden initially, but when the Expand-link is clicked, the spoiler opens and displays the content normally. This is useful for e.g. hiding information that is considered to highly spoil new visitors.

Parameters

  1. The text to include in the spoiler (no parameter name)

Syntax

{{spoiler|hidden text}}

Examples

To use a spoiler in an article, for example:

{{spoiler
 |[[Twinsen]] can find his [[Ancestral Tunic|tunic]] in the [[Miss Bloop's private museum|museum]].
}}


Spoiler:

Twinsen can find his tunic in the museum.


Tip: the spoiler is best combined with the {{list}} template, to show a bulleted list of spoiler sentences in one go.

{{spoiler|{{list
 |Once upon a time.
 |There was.
 |A listed spoiler.
 |Is that a pun?
}}}}


Spoiler:
  • Once upon a time.
  • There was.
  • A listed spoiler.
  • Is that a pun?