Keyboard/Key – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fix background color)
m (Remove min-width)
Line 1: Line 1:
<includeonly>| colspan="{{{4|2}}}" rowspan="{{{5|1}}}" style="background-color: {{#if:{{{3|}}}|<nowiki/>{{{3}}}|<nowiki/>#FFF}}; border: {{{6|1}}}px solid #CCC; border-right-color:#888; border-bottom-color:#333; border-radius: 0.5em; height: 3.5em; margin: 0.5em; text-align: left; vertical-align: top; min-width: 2em" | <small style="padding-left:5px; color:#666; font-size:0.7em;">{{{1|N/A}}}</small><br /><div style="text-align:center; margin-top:-5px;">{{#if:{{{2|}}}|<strong style="font-size:0.9em;">{{{2}}}</strong>}}</div></includeonly><noinclude>
<includeonly>| colspan="{{{4|2}}}" rowspan="{{{5|1}}}" style="background-color: {{#if:{{{3|}}}|<nowiki/>{{{3}}}|<nowiki/>#FFF}}; border: {{{6|1}}}px solid #CCC; border-right-color:#888; border-bottom-color:#333; border-radius: 0.5em; height: 3.5em; margin: 0.5em; text-align: left; vertical-align: top" | <small style="padding-left:5px; color:#666; font-size:0.7em;">{{{1|N/A}}}</small><br /><div style="text-align:center; margin-top:-5px;">{{#if:{{{2|}}}|<strong style="font-size:0.9em;">{{{2}}}</strong>}}</div></includeonly><noinclude>
Draws a keyboard key - has to be used in a table, without the pipe symbol <tt>|</tt> preceding it.
Draws a keyboard key - has to be used in a table, without the pipe symbol <tt>|</tt> preceding it.



Revision as of 20:35, 29 December 2020

Draws a keyboard key - has to be used in a table, without the pipe symbol | preceding it.

Usage

{{Keyboard/Key|key|description|color|colSpan|rowSpan|borderSize}}

  • key: key name (S, Esc, Space etc)
  • description: (Optional, default empty) key description
  • color: (Optional, default #FFF) CSS background color
  • colSpan: (Optional, default 2)
  • rowSpan: (Optional, default 1)
  • borderSize: (Optional, default 1) border size in px
Examples
Code Result
{{Keyboard/Key}} N/A
{{Keyboard/Key|K}} K
{{Keyboard/Key|K|key}} K
key
{{Keyboard/Key|K|key|#CDF}} K
key
{{Keyboard/Key|K|key|#CDF|||5}} K
key