Template:LCARS Toggle: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
<includeonly | <includeonly><div class="mw-customtoggle-{{{Toggle Name}}}""> | ||
{{#switch: {{{Header}}} | {{#switch: {{{Header}}} | ||
|Yes=<h{{{Header Level}}} style="display: none;>{{{Title}}}</h{{{Header Level}}}> | |Yes=<h{{{Header Level}}} style="display: none;>{{{Title}}}</h{{{Header Level}}}> | ||
Line 17: | Line 17: | ||
}} | }} | ||
|width="40px" style="background:{{{Color}}}; border:0px; border-radius: 0px 20px 20px 0px"| | |width="40px" style="background:{{{Color}}}; border:0px; border-radius: 0px 20px 20px 0px"| | ||
|} | |}</div> | ||
<div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{{Toggle Name}}}"> | <div class="mw-collapsible mw-collapsed" id="mw-customcollapsible-{{{Toggle Name}}}"> | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> |
Revision as of 23:51, 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. If chosen, you must specify the header level that it will appear as in the TOC (I recommend 2, and 3 for sub-headers).
{{LCARS Toggle |Toggle Name = SH |Side = Right |Color = steelblue |Title = Woah, a header! |Expand Indicator = ⮟ |Header = Yes |Header Level = 2 |Content = This is some writing, blarg. }}
Woah, a header!
Woah, a header! ⮟ |
---|
This is some writing, blarg.
Here's an example of using header level 3.
This should be a sub-heading :)
This should be a sub-heading :) ⮟ |
---|
This is some writing, blarg.