Difference between revisions of "Template:Spoiler"
Jump to navigation
Jump to search
m |
(repositioning Hide button to the same spot as Show button) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div style="margin: | <includeonly><div style="margin: 0.5em 0 0.5em -12px; padding: 13px 10px 13px 0px;"><span class="spoilerShow mw-collapsible mw-customtoggle-spoiler1 mw-customtoggle-spoiler2" id="mw-customcollapsible-spoiler2" style="font-size: 16px;">Show spoiler</span><!-- | ||
--><span class="spoilerHide mw-collapsible mw-collapsed mw-customtoggle-spoiler1 mw-customtoggle-spoiler2" id="mw-customcollapsible-spoiler2" style="font-size: 16px;">Hide spoiler</span></div><!-- | --><span class="spoilerHide mw-collapsible mw-collapsed mw-customtoggle-spoiler1 mw-customtoggle-spoiler2" id="mw-customcollapsible-spoiler2" style="margin-left: 4px; font-size: 16px;">Hide spoiler</span></div><!-- | ||
--><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-spoiler1"><div class="mw-collapsible-content">{{{1}}}</div></div></includeonly><noinclude>{{doc}} | --><div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-spoiler1"><div class="mw-collapsible-content">{{{1}}}</div></div></includeonly><noinclude>{{doc}} | ||
[[Category:Formatting templates]]</noinclude> | [[Category:Formatting templates]]</noinclude> |
Latest revision as of 21:12, 4 July 2023
Documentation
[purge]
This template uses the class=mw-collapsible
to create a simple Spoiler functionality. For more details, see: Manual:Collapsible elements.
Usage: Copy this code anywhere you want to have the spoiler.
{{Spoiler|text}}
- Currently the template only supports a single spoiler per page. If you add more than one, they will both open/close at the same time.
Show spoilerHide spoiler
First spoiler
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse condimentum est vitae massa semper, vel iaculis urna euismod. Sed posuere fermentum ipsum eget pellentesque. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nullam aliquet consequat sem, sed mattis risus imperdiet in. Ut nec mauris pretium, iaculis justo id, condimentum dui. Aenean congue pretium porttitor. Curabitur auctor tristique justo. Maecenas congue felis interdum quam blandit convallis. Suspendisse sed elit eu turpis sagittis convallis. Pellentesque interdum sit amet quam at maximus. Morbi ullamcorper, sapien nec dictum consequat, leo enim commodo libero, sit amet vulputate odio dui vitae erat. Ut fermentum tortor id ultrices elementum. Suspendisse potenti. Nulla a elit nec lacus ornare lacinia in nec enim. Sed accumsan enim vitae euismod ullamcorper.Show spoilerHide spoiler