Keyboard/Key – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Remove min-width)
m (Text replacement - "<tt>([^ =]+)<\/tt>" to "{{hl|$1}}")
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" | <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 {{hl||}} preceding it.


== Usage ==
== Usage ==
Line 6: Line 6:
* key: key name (S, Esc, Space etc)
* key: key name (S, Esc, Space etc)
* description: (Optional, default empty) key description
* description: (Optional, default empty) key description
* color: (Optional, default <tt>#FFF</tt>) CSS background color
* color: (Optional, default {{hl|#FFF}}) CSS background color
* colSpan: (Optional, default 2)
* colSpan: (Optional, default 2)
* rowSpan: (Optional, default 1)
* rowSpan: (Optional, default 1)

Revision as of 10:33, 16 November 2021

Draws a keyboard key - has to be used in a table, without the pipe symbol -No content provided- 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