Template:GM/box: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
m (add: box-style (table))
m (cleanup)
Line 1: Line 1:
<noinclude>tmp example:
<includeonly><table border="2" style = "
:<nowiki>{{Key_box|$MenuItem1 | Menu$Item2|MenuItem$3|MenuItem4}}</nowiki>
  box-sizing: border-box;
:<code>{{t|Key_box|$MenuItem1|Menu$Item2|MenuItem$3|MenuItem4}}</code>
  border: 2px solid LightCyan;
:{{Key_box| $MenuItem1 | Menu$Item2 | MenuItem$3 | MenuItem4}}
  border-spacing: 0px;
</noinclude>
  background-color: Azure;
 
  white-space: nowrap;
 
  margin: 0.5em;
<includeonly><table border="2"
style = "
box-sizing: border-box;
border: 2px solid LightCyan;
border-spacing: 0px;
background-color: Azure;
white-space: nowrap;
margin: 0.5em;


"><tr><td style = "
"><tr><td style = "
border: 1px solid LightBlue;
  border: 1px solid LightBlue;


">[[File:Icon_keyboard.png|x32px]]</td><td style = "
">[[File:Icon_keyboard.png|x32px]]</td><td style = "
border: 1px solid LightBlue;
  border: 1px solid LightBlue;
padding: 0px 15px;
  padding: 0px 15px;
white-space: nowrap;
  white-space: nowrap;
">{{#if:{{{1|}}}|{{Key_ws|{{{1}}}}}}}{{#if:{{{2|}}}|.->.{{Key_ws|{{{2}}}}}}}{{#if:{{{3|}}}|.->.{{Key_ws|{{{3}}}}}}}{{#if:{{{4|}}}|.->.{{Key_ws|{{{4}}}}}}}{{#if:{{{5|}}}|.->.{{Key_ws|{{{5}}}}}}}{{#if:{{{6|}}}|.->.{{Key_ws|{{{6}}}}}}}</td></tr></table></includeonly><noinclude>{{documentation}}</noinclude>
">{{#if:{{{1|}}}|{{Key_ws|{{{1}}}}}}}{{#if:{{{2|}}}|&nbsp;>&nbsp;{{Key_ws|{{{2}}}}}}}{{#if:{{{3|}}}|&nbsp;>&nbsp;{{Key_ws|{{{3}}}}}}}{{#if:{{{4|}}}|&nbsp;>&nbsp;{{Key_ws|{{{4}}}}}}}{{#if:{{{5|}}}|&nbsp;>&nbsp;{{Key_ws|{{{5}}}}}}}{{#if:{{{6|}}}|&nbsp;>&nbsp;{{Key_ws|{{{6}}}}}}}</td></tr></table></includeonly><noinclude>{{documentation}}
 
<!-- Remark: White-Space compressed code. ToDo/later: reformat into a bit more human readable form (without breaking it again) --></noinclude>

Revision as of 17:10, 29 April 2015

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:
Icon keyboard.pngTemplate:Key ws > Template:Key ws > Template:Key ws > Template:Key ws > Template:Key ws
or
{{GM/box
| $Menu Item 1
| Menu $Item 2
| Menu Ite$m 3
| Menu Item $4
| Menu Item 5
}}
Output:
Icon keyboard.pngTemplate:Key ws > Template:Key ws > Template:Key ws > Template:Key ws > Template:Key ws
Leading and trailing string spaces in examples are optional.

Used templates

GM/keys
Str_us2sp
Str_sp2us

Visit Template:GM/box/doc to edit this text! (How does this work?)