Template:LCARS Toggle: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
m (moving indicator to the other side :))
(adding header functionality)
Line 1: Line 1:
<includeonly><div class="LCARS"><div class="mw-customtoggle-{{{Toggle Name}}}"">
<includeonly><div class="LCARS"><div class="mw-customtoggle-{{{Toggle Name}}}"">
{{#switch: {{{Header}}}
|Yes=<h2 style="display: none;>{{{Title}}}</h2>
|}}
{|style="width: 100%; align: center;"
{|style="width: 100%; align: center;"
|width="40px" height="16px" style="background:{{{Color}}}; border:0px; border-radius: 20px 0px 0px 20px"|
|width="40px" height="16px" style="background:{{{Color}}}; border:0px; border-radius: 20px 0px 0px 20px"|
Line 25: Line 28:
The "Expand Indicator" variable allows one to set any unicode symbol as a marker to "click here". Hopefully this will increase the salience of the LCARS toggle button! Some characters that might work include: ˅, ⌄, ↕, ⇕, ⇳, ☟, ⬍, ⭥, 𝅎, 𝅏, 🡙 (but you can use whatever you want).</pre>
The "Expand Indicator" variable allows one to set any unicode symbol as a marker to "click here". Hopefully this will increase the salience of the LCARS toggle button! Some characters that might work include: ˅, ⌄, ↕, ⇕, ⇳, ☟, ⬍, ⭥, 𝅎, 𝅏, 🡙 (but you can use whatever you want).</pre>


===Example===
'''Example'''
<pre>
<pre>
{{LCARS Toggle
{{LCARS Toggle
Line 46: Line 49:
|Content = This is some writing, blarg.
|Content = This is some writing, blarg.
}}
}}
===Different Sides!===
 
'''Different Sides!'''
You can also switch the side that the text is on!
You can also switch the side that the text is on!
{{LCARS Toggle
{{LCARS Toggle
Line 54: Line 58:
|Title = Shore Leave!
|Title = Shore Leave!
|Expand Indicator = ⮟
|Expand Indicator = ⮟
|Content = This is some writing, blarg.
}}
'''Header Optionality!'''
If you want this to act as a header (aka: show up in the TOC) there is a toggle to turn that on - it is off by default.
__TOC__
<pre>
{{LCARS Toggle
|Toggle Name = SH
|Side = Right
|Color = steelblue
|Title = Woah, a header!
|Expand Indicator = ⮟
|Header = Yes
|Content = This is some writing, blarg.
}}
</pre>
{{LCARS Toggle
|Toggle Name = SH
|Side = Right
|Color = steelblue
|Title = Woah, a header!
|Expand Indicator = ⮟
|Header = Yes
|Content = This is some writing, blarg.
|Content = This is some writing, blarg.
}}
}}


[[Category:Templates]]</noinclude>
[[Category:Templates]]</noinclude>

Revision as of 23:00, 24 May 2024

Creates a toggle-able LCARS menu!

NOTE: To include things like tables and any sort of formatting that uses | characters within the content section of the template, substitute any | characters with {{!}}, and the code should work just fine.

The "Expand Indicator" variable allows one to set any unicode symbol as a marker to "click here". Hopefully this will increase the salience of the LCARS toggle button! Some characters that might work include: ˅, ⌄, ↕, ⇕, ⇳, ☟, ⬍, ⭥, 𝅎, 𝅏, 🡙 (but you can use whatever you want).

Example

{{LCARS Toggle
|Toggle Name = SL
|Side = Left
|Color = steelblue
|Title = Shore Leave!
|Expand Indicator = ⮟
|Content = This is some writing, blarg.
}}

which gives you

Shore Leave! ⮟

This is some writing, blarg.

Different Sides! You can also switch the side that the text is on!

Shore Leave! ⮟

This is some writing, blarg.

Header Optionality! If you want this to act as a header (aka: show up in the TOC) there is a toggle to turn that on - it is off by default.

{{LCARS Toggle
|Toggle Name = SH
|Side = Right
|Color = steelblue
|Title = Woah, a header!
|Expand Indicator = ⮟
|Header = Yes
|Content = This is some writing, blarg.
}}

Woah, a header!

Woah, a header! ⮟

This is some writing, blarg.