Template:Spoil: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
(usage & limitations)
(figured out a problem with links, working on another)
Line 1: Line 1:
<includeonly>{{#CSS:  
<includeonly>{{#CSS:  
   .tmpl-spoil-jvn {
   .tmpl-spoil-jvn, .tmpl-spoil-jvn a {
     background-color: black;
     background-color: black;
     color: black;
     color: black;
   }
   }


   .tmpl-spoil-jvn:hover {
   .tmpl-spoil-jvn:hover, .tmpl-spoil-jvn:hover a {
     background-color: lightgrey;
     background-color: lightgrey;
   }
   }
Line 23: Line 23:


The hidden text can be multiple lines long.
The hidden text can be multiple lines long.
=== Limitations ===
Typical links can be seen through the black bar even when they should be hidden. This is caused by the fact that the links are different colour from the text. In order to avoid links being visible, consider using [[Template:Blacklink]] or [[Template:ColoredLink]]. Note that the link text will remain black even when the text is revealed, which might cause readers not to recognize it as a link. Mobile users might also accidentally click on a hidden link when trying to reveal the text. Linking templates such as [[Template:USS]] might not be usable.


== Examples ==
== Examples ==
Line 33: Line 29:
Lt. Commander Data is {{spoil|an android}}.
Lt. Commander Data is {{spoil|an android}}.


<pre>Lieutenant '''Jovenan''' is an {{spoil|{{blacklink|Edo}} Starfleet officer}}. She is currently serving as the Chief Science Officer aboard the {{USS|Artemis|A}}. {{spoil|Born on the Edo homeworld in 2373, she enrolled in the University of Hurkos in 2390, when the planet was ending its isolation. Upon graduation with degree in Planetary Sciences, she entered the Starfleet Academy. In 2399, she received the commission as ensign and was posted on the {{blacklink|USS Excalibur-A|USS ''Excalibur''-A}}, later transferring to the ''Artemis''}} with much of the ''Excalibur'' crew.</pre>
<pre>Lieutenant '''Jovenan''' is an {{spoil|[[Edo]] Starfleet officer}}. She is currently serving as the Chief Science Officer aboard the {{USS|Artemis|A}}. {{spoil|Born on the Edo homeworld in 2373, she enrolled in the University of Hurkos in 2390, when the planet was ending its isolation. Upon graduation with degree in Planetary Sciences, she entered the Starfleet Academy. In 2399, she received the commission as ensign and was posted on the {{USS|Excalibur|A}}, later transferring to the ''Artemis''}} with much of the ''Excalibur'' crew.</pre>
Lieutenant '''Jovenan''' is an {{spoil|{{blacklink|Edo}} Starfleet officer}}. She is currently serving as the Chief Science Officer aboard the {{USS|Artemis|A}}. {{spoil|Born on the Edo homeworld in 2373, she enrolled in the University of Hurkos in 2390, when the planet was ending its isolation. Upon graduation with degree in Planetary Sciences, she entered the Starfleet Academy. In 2399, she received the commission as ensign and was posted on the {{blacklink|USS Excalibur-A|USS ''Excalibur''-A}}, later transferring to the ''Artemis''}} with much of the ''Excalibur'' crew.}}
Lieutenant '''Jovenan''' is an {{spoil|[[Edo]] Starfleet officer}}. She is currently serving as the Chief Science Officer aboard the {{USS|Artemis|A}}. {{spoil|Born on the Edo homeworld in 2373, she enrolled in the University of Hurkos in 2390, when the planet was ending its isolation. Upon graduation with degree in Planetary Sciences, she entered the Starfleet Academy. In 2399, she received the commission as ensign and was posted on the {{USS|Excalibur|A}}, later transferring to the ''Artemis''}} with much of the ''Excalibur'' crew.}}
</noinclude>
</noinclude>

Revision as of 16:11, 22 January 2024

Template Documentation
Note: This template is currently under construction.
This notice was placed here by Jovenan, so go bug her to finish the page if nothing's happening.


This template functions as spoiler tags, i.e. hides a portion of text that can be revealed if the reader wants to read it.

Usage

Code:

{{spoil| }}

Write the hidden text as the unnamed parameter. Please see the examples below!

The template produces a black bar over the hidden text. If the reader chooses to view the hidden text, this bar will turn light grey, revealing the hidden text. On computer, the text is revealed by hovering the cursor over the text. Once the cursor is off from the text, the text will be hidden again. On mobile devices, the reader must click on the bar to reveal the hidden text. Clicking elsewhere on the screen, including another bar, will cause the text to be hidden again.

The hidden text can be multiple lines long.

Examples

Lt. Commander Data is {{spoil|an android}}.

Lt. Commander Data is an android.

Lieutenant '''Jovenan''' is an {{spoil|[[Edo]] Starfleet officer}}. She is currently serving as the Chief Science Officer aboard the {{USS|Artemis|A}}. {{spoil|Born on the Edo homeworld in 2373, she enrolled in the University of Hurkos in 2390, when the planet was ending its isolation. Upon graduation with degree in Planetary Sciences, she entered the Starfleet Academy. In 2399, she received the commission as ensign and was posted on the {{USS|Excalibur|A}}, later transferring to the ''Artemis''}} with much of the ''Excalibur'' crew.
Lieutenant Jovenan is an Edo Starfleet officer. She is currently serving as the Chief Science Officer aboard the USS Artemis-A. Born on the Edo homeworld in 2373, she enrolled in the University of Hurkos in 2390, when the planet was ending its isolation. Upon graduation with degree in Planetary Sciences, she entered the Starfleet Academy. In 2399, she received the commission as ensign and was posted on the USS Excalibur-A, later transferring to the Artemis with much of the Excalibur crew.