Template:Spoiler: Difference between revisions

From the Portal Wiki
Jump to navigation Jump to search
(Created page with "<div style="border-left: 3px dashed #B8383B; padding-left: 1em;">{{{1|}}}</div><!-- --><includeonly>Category:Spoiler</includeonly><!-- --><noinclude> === Example === {{Spoil...")
 
(Undo revision 185425 by CatMurderer (talk))
 
(17 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<div style="border-left: 3px dashed #B8383B; padding-left: 1em;">{{{1|}}}</div><!--
<{{#if:{{{block|}}}|div|span}} class="spoiler-text">{{{1|}}}</{{#if:{{{block|}}}|div|span}}><includeonly>{{#if:{{NAMESPACE}}
--><includeonly>[[Category:Spoiler]]</includeonly><!--
| {{ns:0}}<!-- Don't categorize non-mainspace pages. -->
--><noinclude>
| {{if lang
| en    = [[Category:Spoiler|{{PAGENAME}}]]
| non-en = [[Category:Spoiler/lang|{{SUBPAGENAME}}]]
}}
}}</includeonly><noinclude>
{{doc begin}}
{{tl|Spoiler}} is a spoiler tag template. If spoilers are toggled off (using the tab at the top of the page) text inside the {{tl|Spoiler}} tag will be blacked out. You can still highlight the text to view it without toggling all spoilers on.


=== Example ===
== ==
{{Spoiler paragraph|
=== What to mark? ===
Lorum Ipsum lots of text. ejrnanfdsngasdfnhjafhndaghadghadghgadh
=== Grey areas ===
agdhagdhdfggjgffs
 
gaddghadghgdjgdajadgjadgjagdjgjfkssfhks
=== Things to ignore ===
 
== Limitations ==
Doesn't work nice with headers sometimes. Examples: [https://theportalwiki.com/w/index.php?title=Portal_Test_Chamber_11&diff=182306&oldid=155441 1].
 
== Examples ==
* <code>A line of text. <nowiki>{{spoiler|Snape kills Dumbledore}}.</nowiki></code> generates
 
A line of text. {{spoiler|Snape kills Dumbledore}}.
 
* The below code will generate:
<pre>
&#123;&#123;Spoiler|block=yes|
* Harry is the last horcrux.
* And [[Chell]] is [[GLaDOS]]' daughter.
}}
}}
</pre>


<code><nowiki>{{Spoiler paragraph|
{{Spoiler|block=yes|
Lorum Ipsum lots of text. ejrnanfdsngasdfnhjafhndaghadghadghgadh
* Harry is the last horcrux.
agdhagdhdfggjgffs
* And [[Chell]] is [[GLaDOS]]' daughter.
gaddghadghgdjgdajadgjadgjagdjgjfkssfhks
}}
}}</nowiki></code>


[[Category:Spoiler templates]]
[[Category:Spoiler templates]]
[[Category:Maintenance templates]]
[[Category:Maintenance templates]]
</noinclude>
</noinclude>

Latest revision as of 04:57, 13 June 2023

The template above may be partially or fully invisible or glitched due to the respected strings aren't entered.
This is normal.

Documentation for Spoiler

{{Spoiler}} is a spoiler tag template. If spoilers are toggled off (using the tab at the top of the page) text inside the {{Spoiler}} tag will be blacked out. You can still highlight the text to view it without toggling all spoilers on.

What to mark?

Grey areas

Things to ignore

Limitations

Doesn't work nice with headers sometimes. Examples: 1.

Examples

  • A line of text. {{spoiler|Snape kills Dumbledore}}. generates

A line of text. Snape kills Dumbledore.

  • The below code will generate:
{{Spoiler|block=yes|
* Harry is the last horcrux.
* And [[Chell]] is [[GLaDOS]]' daughter.
}}
  • Harry is the last horcrux.
  • And Chell is GLaDOS' daughter.