Keyboard/Key – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Lou Montana moved page Template:Keyboard-Key to Template:Keyboard/Key without leaving a redirect: name standard)
m (Add description)
Line 1: Line 1:
<noinclude>{| style="background-color:#ccc; border-spacing:20px; border-collapse:separate;"
<includeonly>| colspan="{{{4|2}}}" rowspan="{{{5|1}}}" style="background-color:{{{3|#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>
</noinclude>| colspan="{{{4|2}}}" rowspan="{{{5|1}}}" height="50px" style="margin:3px; text-align:left; vertical-align:top; background-color:{{{3|white}}}; border: {{{6|1}}}px solid #999; border-right-color:#333; border-bottom-color:#333; border-radius:5px;"| <small style="padding-left:5px; color:#666; font-size:0.7em;">{{{1}}}</small><br /><div style="text-align:center; margin-top:-5px;"><strong style="font-size:0.9em;">{{{2}}}</strong></div><noinclude>
Draws a keyboard key - has to be used in a table, without the pipe symbol <tt>|</tt> preceding it.
 
== Usage ==
{{<nowiki/>Keyboard/Key|'''''key'''''|'''''description'''''|'''''color'''''|'''''colSpan'''''|'''''rowSpan'''''|'''''borderSize'''''}}</pre>
* key: key name (S, Esc, Space etc)
* description: (Optional, default empty) key description
* color: (Optional, default <tt>#FFF</tt>) CSS background color
* colSpan: (Optional, default 2)
* rowSpan: (Optional, default 1)
* borderSize: (Optional, default 1) border size in px
 
{|
|+ Examples
|- style="background-color: #EEE"
! Code
! Result
|-
| <nowiki>{{Keyboard/Key}}</nowiki>
{{Keyboard/Key}}
|-
| <nowiki>{{Keyboard/Key|K}}</nowiki>
{{Keyboard/Key|K}}
|-
| <nowiki>{{Keyboard/Key|K|key}}</nowiki>
{{Keyboard/Key|K|key}}
|-
| <nowiki>{{Keyboard/Key|K|key|#CDF}}</nowiki>
{{Keyboard/Key|K|key|#CDF}}
|-
| <nowiki>{{Keyboard/Key|K|key|#CDF|||5}}</nowiki>
{{Keyboard/Key|K|key|#CDF|||5}}
|}
|}
<pre>{{Keyboard-Key|Key|Description|Color|Width|Height|BorderThickness|Height(px)}}</pre>


[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Revision as of 18:58, 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