Template:LCARS Toggle: Difference between revisions

From 118Wiki
Jump to navigation Jump to search
mNo edit summary
(adding an option to put in a unicode character to indicate that the button can expand/open)
Line 3: Line 3:
|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"|
{{#switch: {{{Side}}}
{{#switch: {{{Side}}}
|Left=!style{{=}}"width:1px; padding-top: 0px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; white-space:nowrap; text-transform:uppercase; font-family:Arial, Helvetica, sans-serif; font-size:large; line-height: 100%;"{{!}}{{{Title}}}
|Left=!style{{=}}"width:1px; padding-top: 0px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; white-space:nowrap; text-transform:uppercase; font-family:Arial, Helvetica, sans-serif; font-size:large; line-height: 100%;"{{!}}{{{Title}}} {{{Expand Indicator}}}
|Right={{!}}width{{=}}"5px"{{!}}
|Right={{!}}width{{=}}"5px"{{!}}
|{{!}}width{{=}}"5px"{{!}}
|{{!}}width{{=}}"5px"{{!}}
Line 9: Line 9:
|style="background:{{{Color}}}; border:0px;"|
|style="background:{{{Color}}}; border:0px;"|
{{#switch: {{{Side}}}
{{#switch: {{{Side}}}
|Right=!style{{=}}"width:1px; padding-top: 0px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; white-space:nowrap; text-transform:uppercase; font-family:Arial, Helvetica, sans-serif; font-size:large; line-height: 100%;"{{!}}{{{Title}}}
|Right=!style{{=}}"width:1px; padding-top: 0px; padding-bottom: 0px; padding-left: 5px; padding-right: 5px; white-space:nowrap; text-transform:uppercase; font-family:Arial, Helvetica, sans-serif; font-size:large; line-height: 100%;"{{!}}{{{Expand Indicator}}} {{{Title}}}
|Left={{!}}width{{=}}"5px"{{!}}
|Left={{!}}width{{=}}"5px"{{!}}
|{{!}}width{{=}}"5px"{{!}}
|{{!}}width{{=}}"5px"{{!}}
Line 21: Line 21:
Creates a toggle-able LCARS menu! <!-- Also, this is my first template, hoorah! -->
Creates a toggle-able LCARS menu! <!-- Also, this is my first template, hoorah! -->


<pre>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.</pre>
<pre>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!</pre>


===Example===
===Example===
Line 30: Line 32:
|Color = steelblue
|Color = steelblue
|Title = Shore Leave!
|Title = Shore Leave!
|Expand Indicator = ⮟
|Content = This is some writing, blarg.
|Content = This is some writing, blarg.
}}
}}
Line 40: Line 43:
|Color = steelblue
|Color = steelblue
|Title = Shore Leave!
|Title = Shore Leave!
|Expand Indicator = ⮟
|Content = This is some writing, blarg.
|Content = This is some writing, blarg.
}}
}}
Line 49: Line 53:
|Color = steelblue
|Color = steelblue
|Title = Shore Leave!
|Title = Shore Leave!
|Expand Indicator = ⮟
|Content = This is some writing, blarg.
|Content = This is some writing, blarg.
}}
}}


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

Revision as of 22:13, 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!

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.