Keyboard/Key – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Fix pipe symbol)
 
(7 intermediate revisions by 2 users not shown)
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: {{#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>
</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>{{{2}}}</strong></div><noinclude>
Draws a keyboard key - has to be used in a table, without the pipe symbol {{hl|{{!}}}} preceding it. See {{Template|Keyboard}}.
 
== 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 {{hl|#FFF}}) 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|Keyboard-Key]]</noinclude>
[[Category:Templates|{{uc:{{PAGENAME}}}}]]</noinclude>

Latest revision as of 11:00, 10 August 2023

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

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