Template:SpoilerText: Difference between revisions

From questden
Jump to navigationJump to search
(that was a horrible waste of time)
No edit summary
Line 2: Line 2:
This used to have a fancy fade-in effect on hover, but it turns out that it only worked on the preview page, so I had to settle for this garbage.
This used to have a fancy fade-in effect on hover, but it turns out that it only worked on the preview page, so I had to settle for this garbage.


The syntax is just <code><nowiki>{{SpoilerText|text=Hidden Text Here}}</nowiki></code>
The syntax is just <code><nowiki>{{SpoilerText|text=Hidden Text Here}}</nowiki></code>.
 
For inline spoilers (no red text appending it), use <code><nowiki>{{SpoilerText|text=Inline Hidden Text Here|inline=1}}</nowiki></code>.
 


Example: {{SpoilerText|text=Hidden Text Here}}
Example: {{SpoilerText|text=Hidden Text Here}}
Here's some {{SpoilerText|text=inline hidden text|inline=1}} in a sentence.
</noinclude>
</noinclude>
<includeonly><span style="background-color: #333; color: #333; padding: 3px 5px 2px 5px;">{{{text}}}</span><span style="display:inline-block; line-height:8px; vertical-align:sub; padding-left:4px;"><span style="font-size:9px; color:red;">Spoiler Text <br/>Highlight to Expose</span></span>
<includeonly><span style="background-color: #333; color: #333; padding: 3px 5px 2px 5px;">{{{text}}}</span>
</span>
{{#if:{{{inline|}}}||<span style="display:inline-block; line-height:8px; vertical-align:sub; padding-left:4px;"><span style="font-size:9px; color:red;">Spoiler Text <br/>Highlight to Expose</span></span>}}</span></span></includeonly>
</span></includeonly>

Revision as of 23:29, 26 October 2020

This used to have a fancy fade-in effect on hover, but it turns out that it only worked on the preview page, so I had to settle for this garbage.

The syntax is just {{SpoilerText|text=Hidden Text Here}}.

For inline spoilers (no red text appending it), use {{SpoilerText|text=Inline Hidden Text Here|inline=1}}.


Example: Hidden Text Here Spoiler Text
Highlight to Expose

Here's some inline hidden text in a sentence.