Difference between revisions of "Template:Spoiler/doc"

Everything About Fiction You Never Wanted to Know.
Jump to navigation Jump to search
m (1 revision: reupload of previous page XML upload)
(rm random line breaks)
Line 1: Line 1:
 
==Syntax==
 
==Syntax==
  
Type:<br>
+
Type:
 +
<nowiki> {{spoiler|text}} </nowiki> to get {{spoiler|text}}.
  
 +
Type:
 +
<nowiki> {{spoiler|[[text]]}} </nowiki> to get {{spoiler|[[text]]}}.
  
 
+
Type:
 
+
<nowiki> {{spoiler|[[text does not exist]]}} </nowiki> to get {{spoiler|[[text does not exist]]}}.
 
 
 
 
 
 
<nowiki> {{spoiler|text}} </nowiki> to get {{spoiler|text}}.<br>
 
 
 
 
 
Type:<br>
 
 
 
 
 
 
 
 
 
 
 
 
 
<nowiki> {{spoiler|[[text]]}} </nowiki> to get {{spoiler|[[text]]}}.<br>
 
 
 
 
 
 
 
Type:<br>
 
 
 
 
 
 
 
 
 
 
 
 
 
<nowiki> {{spoiler|[[text does not exist]]}} </nowiki> to get {{spoiler|[[text does not exist]]}}.<br>
 
  
 
This works for all types of texts, whether unlinked, blue linked, or red linked. All will be visible if the area affected is highlighted by the mouse. It will work the same on external links, and it will hide everything except for the external link arrow icon.
 
This works for all types of texts, whether unlinked, blue linked, or red linked. All will be visible if the area affected is highlighted by the mouse. It will work the same on external links, and it will hide everything except for the external link arrow icon.
Line 45: Line 23:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|
 
|
 
+
<nowiki> <span class="spoiler"><u>{{{1}}}</u></span> </nowiki> <br>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<nowiki> <span class="spoiler"><u>{{{1}}}</u></span> </nowiki> <br>
 
 
|}
 
|}
  
Line 64: Line 33:
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|
 
|
 
}
 
 
 
.spoiler, .spoiler a, .spoiler a.link, .spoiler a.new, .spoiler a.visited, .spoiler a.external:link, .spoiler a.hover  { background: #ffffff; color:#ffffff; border:1px dotted gray; border-top:none; background: #ffffff; .spoiler:hover { background: #ffffff;}
 
.spoiler, .spoiler a, .spoiler a.link, .spoiler a.new, .spoiler a.visited, .spoiler a.external:link, .spoiler a.hover  { background: #ffffff; color:#ffffff; border:1px dotted gray; border-top:none; background: #ffffff; .spoiler:hover { background: #ffffff;}
 
}
 
  
 
|}
 
|}
Line 77: Line 41:
 
<noinclude>
 
<noinclude>
 
[[Category:ATT Template Documentation]]
 
[[Category:ATT Template Documentation]]
</noinclude>
+
</noinclude><includeonly>
 +
[[Category:ATT Templates]]
 +
</includeonly>

Revision as of 02:14, 7 September 2014

Syntax

Type:

 {{spoiler|text}}  to get text.

Type:

 {{spoiler|[[text]]}}  to get text.

Type:

 {{spoiler|[[text does not exist]]}}  to get text does not exist.

This works for all types of texts, whether unlinked, blue linked, or red linked. All will be visible if the area affected is highlighted by the mouse. It will work the same on external links, and it will hide everything except for the external link arrow icon.

The template puts a white overlay over text and all types of links. If a link is clicked, it will be visible on subsequent visits to the same page until the browser cache is cleared, merely highlighting the spoilered text will not need this.

This template is an originally created MediaWiki equivalent to the spoiler code for text used on TV Tropes.org and should function in an equivalent manner.

Code Of Template

This template uses the following CSS based template code:


 <span class="spoiler"><u>{{{1}}}</u></span>  


CSS Required to make this template function

This template depends on the following CSS being implemented in the common.css file on your MediaWiki installation:

.spoiler, .spoiler a, .spoiler a.link, .spoiler a.new, .spoiler a.visited, .spoiler a.external:link, .spoiler a.hover { background: #ffffff; color:#ffffff; border:1px dotted gray; border-top:none; background: #ffffff; .spoiler:hover { background: #ffffff;}

Copy and paste the text in the box above to your MediaWiki:Common.css file for this template to work