Template:Button: Difference between revisions

From Space Station 14 Wiki
m (1 revision imported)
(state stuff wip)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<kbd class="nowrap button" title="{{{tooltip|This is not a clickable button; it illustrates the button one should find.}}}" style="padding:{{{padTB|.2em}}} {{{padLR|.6em}}}; border:1px solid; border-color:#AAA #555 #555 #AAA; border-radius:3px; background-color: {{{bgcolor|#F2F2F2}}}; color: {{{fgcolor|#000}}}; background-image: linear-gradient(to bottom, {{{bgcolor1|#FCFCFC}}}, {{{bgcolor2|#E0E0E0}}}); {{#ifeq:{{{format|}}}|bold|font-weight: bold;}} font-family:sans-serif; {{{style|}}}">{{{text|{{{1|Hello, World!}}}}}}</kbd><noinclude>
<includeonly><!--
{{documentation}}
--><templatestyles src="Button/styles.css" /><!--
</noinclude>
 
-->{{#vardefine: button_bg_clip_pixels|5}}<!--
 
--><kbd class="template-button {{lc: {{{state|normal}}}}}" style="
padding: .2em calc({{#var:button_bg_clip_pixels}}px + .3em);
 
clip-path: polygon(
0 0,
 
calc(100% - {{#var:button_bg_clip_pixels}}px) 0,
100% {{#var:button_bg_clip_pixels}}px,
 
100% 100%,  
 
{{#var:button_bg_clip_pixels}}px 100%,  
0 calc(100% - {{#var:button_bg_clip_pixels}}px)
);
">{{{1}}}</kbd></includeonly><noinclude>
{{documentation|bb=
{{uses template styles}}
}}
 
[[Category:Button templates]]
<templatedata>
{
"params": {
"1": {
"label": "Key",
"type": "line",
"suggestedvalues": [
"Left Mouse Button",
"Middle Mouse Button",
"Right Mouse Button",
"Mouse Button 4",
"Mouse Button 5",
"Mouse Scroll Wheel Down",
"Mouse Scroll Wheel Up",
"0",
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"I",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T",
"U",
"V",
"W",
"X",
"Y",
"Z",
"F1",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
"F8",
"F9",
"F10",
"F11",
"F12",
"Backspace",
"Tab",
"Enter",
"Shift",
"Ctrl",
"Alt",
"Pause/Break",
"Caps Lock",
"Esc",
"Space",
"Page Up",
"Page Down",
"End",
"Home",
"Left arrow",
"Up arrow",
"Right arrow",
"Down arrow",
"Print Screen",
"Insert",
"Delete",
"Left Win",
"Right Win",
"Popup",
"Num Lock",
"Scroll Lock",
"Left Shift",
"Right Shift",
"Left Ctrl",
"Right Ctrl",
"*",
"+",
"-",
".",
"/",
"Numpad 0",
"Numpad 1",
"Numpad 2",
"Numpad 3",
"Numpad 4",
"Numpad 5",
"Numpad 6",
"Numpad 7",
"Numpad 8",
"Numpad 9",
"Numpad *",
"Numpad +",
"Numpad -",
"Numpad .",
"Numpad /"
],
"required": true,
"description": "Select from the list, or use your own."
},
"2": {
"label": "Theme",
"description": "Theme of the button. Any casing is allowed, including lowercase.",
"type": "line",
"suggestedvalues": [
"Regular"
],
"default": "Regular",
"suggested": true
},
"state": {
"label": "State",
"description": "State of the button. Any casing is allowed, including lowercase.",
"type": "line",
"suggestedvalues": [
"Normal",
"Pressed"
],
"default": "Normal"
}
},
"description": "For representing a keyboard or other buttons.",
"paramOrder": [
"1",
"2",
"state"
]
}
</templatedata></noinclude>

Latest revision as of 23:14, 18 August 2024

Template documentation
view or edit this documentation about template documentation
Uses template styles
This template uses template styles found in:

Examples

{{button|Server List}}

Server List

Theming

Not implemented yet.

Button state

Normal

The default.

Pressed

{{button|Enabled|state=pressed}}

Enabled

For representing a keyboard or other buttons.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Key1

Select from the list, or use your own.

Suggested values
Left Mouse Button Middle Mouse Button Right Mouse Button Mouse Button 4 Mouse Button 5 Mouse Scroll Wheel Down Mouse Scroll Wheel Up 0 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Backspace Tab Enter Shift Ctrl Alt Pause/Break Caps Lock Esc Space Page Up Page Down End Home Left arrow Up arrow Right arrow Down arrow Print Screen Insert Delete Left Win Right Win Popup Num Lock Scroll Lock Left Shift Right Shift Left Ctrl Right Ctrl * + - . / Numpad 0 Numpad 1 Numpad 2 Numpad 3 Numpad 4 Numpad 5 Numpad 6 Numpad 7 Numpad 8 Numpad 9 Numpad * Numpad + Numpad - Numpad . Numpad /
Linerequired
Theme2

Theme of the button. Any casing is allowed, including lowercase.

Suggested values
Regular
Default
Regular
Linesuggested
Statestate

State of the button. Any casing is allowed, including lowercase.

Suggested values
Normal Pressed
Default
Normal
Lineoptional