Template:GM/box: Difference between revisions
Jump to navigation
Jump to search
m (That fixed the initial intended target ... except for the fact that tables are block elements (default), and as such its not directly usable as a inline item. (...maybe later)) |
(Replace table code (html => css), +Inline support (Main GM template).) |
||
Line 1: | Line 1: | ||
<includeonly>< | <includeonly | ||
>{{#if:{{{inline|}}}|{{nop}}|<p>}} | |||
<span style=" | |||
display: inline-table; | |||
border: 2px solid LightCyan; | border: 2px solid LightCyan; | ||
border-spacing: 0px; | border-spacing: 0px; | ||
background-color: Azure; | background-color: Azure; | ||
margin: 0.5em; | margin: 0.5em; | ||
">< | "><span style=" | ||
display: table-cell; | |||
border: 1px solid LightBlue; | border: 1px solid LightBlue; | ||
">[[File:Icon_keyboard.png|x32px]]{{ | ">[[File:Icon_keyboard.png|x32px]]{{ | ||
#if:{{{1|}}}|</ | #if:{{{1|}}}|</span><span style=" | ||
display: table-cell; | |||
border: 1px solid LightBlue; | border: 1px solid LightBlue; | ||
padding: 0px 5px; | padding: 0px 5px; | ||
">{{ | ">{{ | ||
#if:{{{1|}}}|{{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{1}}}}}}}}}}}{{ | #if:{{{1|}}}|{{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{1}}}}}}}}}}}{{ | ||
Line 23: | Line 27: | ||
#if:{{{6|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{6}}}}}}}}} | #if:{{{6|}}}| > {{Str_us2sp|{{Key_ws|{{Str_sp2us|{{{6}}}}}}}}} | ||
}} | }} | ||
}}</ | }}</span></span>{{#if:{{{inline|}}}|{{nop}}|</p>}}</includeonly><noinclude>{{documentation}} | ||
<!-- More Human readable version: | <!-- More Human readable version of last part: | ||
{{#if: {{{1|}}} | // if parm-N is set and not empty/or(white space only) | {{#if: {{{1|}}} | //if parm-N is set and not empty/or(white space only) | ||
 > //visual separator between input parms. (for p2 to pN line) |  > //visual separator between input parms. (for p2 to pN line) | ||
{{Str_us2sp| //convert underscores to spaces. | {{Str_us2sp| //convert underscores to spaces. |
Revision as of 17:26, 14 May 2023
Template documentation (for the template shown above, sometimes hidden or invisible)
Info
- General "menu path to feature" template.
- Currently supporting up to 6 parameters. (anonymous type)
- Use a leading '$' character to target a string character.
- Targeted character gets enclosed by a Key/box template call.
- (Only intended, and tested, with one '$' instance per string.)
- (Only intended to be used from "GM"/"GM/sub" template.)
Usage
{{GM/box|String1|String2|..|String6}}
Example
- {{GM/box| $Menu Item 1 | Menu $Item 2 | Menu Ite$m 3 | Menu Item $4| Menu Item 5}}
- Output:
- or
- {{GM/box
- | $Menu Item 1
- | Menu $Item 2
- | Menu Ite$m 3
- | Menu Item $4
- | Menu Item 5
- }}
- Output:
- Leading and trailing string spaces in examples are optional.
Used templates
Visit Template:GM/box/doc to edit this text! (How does this work?)