Difference between revisions of "Template:Key"
(Created page with '<table style="text-align: center; background: #2A2725; color: #FFAA00; width: 20%; font-weight: bold; font-size: 120%; -moz-border-radius: 10px; -webkit-border-radius: 10px; padd…') |
|||
Line 1: | Line 1: | ||
− | <table style="text-align: center; background: #2A2725; color: #FFAA00; width: 20%; font-weight: bold; font-size: 120%; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding-top: 10px; padding-bottom: 10px;" cellspacing="10px" {{#if:{{{align|}}}|align="{{{align|right}}}"|}}><tr>{{#if:{{{key1| | + | {{#if:{{{1|}}} |
− | <td width=" | + | | <span style="background-color:#2A2725;color:#FFAA00; padding: 0 1em;">'''{{{1|MOUSE2}}}{{#if:{{{2|}}}|{{n}}{{{2|forward}}}}}'''</span> |
− | <td width=" | + | |<table style="text-align: center; background: #2A2725; color: #FFAA00; width: 20%; font-weight: bold; font-size: 120%; -moz-border-radius: 10px; -webkit-border-radius: 10px; padding-top: 10px; padding-bottom: 10px; margin-left: 1em;" cellspacing="10px" {{#if:{{{align|}}}|align="{{{align|right}}}"|}}><tr>{{#if:{{{key1|}}}| |
+ | <td width="50%" style="font-size: 120%;">{{{key1|}}}</td> | ||
+ | <td width="50%">{{{desc1|}}}</td> | ||
</tr>}}{{#if:{{{key2|}}}|<tr> | </tr>}}{{#if:{{{key2|}}}|<tr> | ||
− | <td width=" | + | <td width="50%" style="font-size: 120%;">{{{key2|}}}</td> |
− | <td width=" | + | <td width="50%">{{{desc2|}}}</td> |
</tr>}}{{#if:{{{key3|}}}|<tr> | </tr>}}{{#if:{{{key3|}}}|<tr> | ||
− | <td width=" | + | <td width="50%" style="font-size: 120%;">{{{key3|}}}</td> |
− | <td width=" | + | <td width="50%">{{{desc3|}}}</td> |
</tr>}}{{#if:{{{key4|}}}|<tr> | </tr>}}{{#if:{{{key4|}}}|<tr> | ||
− | <td width=" | + | <td width="50%" style="font-size: 120%;">{{{key4|}}}</td> |
− | <td width=" | + | <td width="50%">{{{desc4|}}}</td> |
</tr>}}{{#if:{{{key5|}}}|<tr> | </tr>}}{{#if:{{{key5|}}}|<tr> | ||
− | <td width=" | + | <td width="50%" style="font-size: 120%;">{{{key5|}}}</td> |
− | <td width=" | + | <td width="50%">{{{desc5|}}}</td> |
</tr>}} | </tr>}} | ||
− | </table><noinclude> | + | </table>}}<noinclude> |
== Usage == | == Usage == | ||
Handles up to 5 keys and their descriptions. | Handles up to 5 keys and their descriptions. | ||
− | * <code><nowiki>{{key|MOUSE2|airblast}}</nowiki></code> generates: | + | * <code><nowiki>{{key|CTRL}}</nowiki></code> generates inline: |
+ | |||
+ | Lorem ipsum dolor sit amet. Lorem ipsum {{key|CTRL}} dolor sit amet. | ||
+ | |||
+ | * <code><nowiki>{{key|MOUSE2|airblast}}</nowiki></code> generates inline also: | ||
+ | |||
{{key|MOUSE2|airblast}} | {{key|MOUSE2|airblast}} | ||
− | |||
{{key | align = right | {{key | align = right | ||
| key1 = W | | key1 = W | ||
Line 33: | Line 39: | ||
| desc4 = backward | | desc4 = backward | ||
}} | }} | ||
− | < | + | <pre style="width: 50%;"><nowiki> |
− | |||
{{key | align = right | {{key | align = right | ||
| key1 = W | | key1 = W | ||
Line 45: | Line 50: | ||
| desc4 = backward | | desc4 = backward | ||
}} | }} | ||
+ | </nowiki></pre> | ||
+ | * generates a table aligned to right: | ||
[[Category:Formatting templates]]</noinclude> | [[Category:Formatting templates]]</noinclude> |
Revision as of 07:16, 5 August 2010
Usage
Handles up to 5 keys and their descriptions.
{{key|CTRL}}
generates inline:
Lorem ipsum dolor sit amet. Lorem ipsum CTRL dolor sit amet.
{{key|MOUSE2|airblast}}
generates inline also:
MOUSE2+airblast
{{{1}}}
{{key | align = right | key1 = W | desc1 = forward | key2 = A | desc2 = left | key3 = S | desc3 = right | key4 = D | desc4 = backward }}
- generates a table aligned to right: