Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Button: Difference between revisions

Template page
No edit summary
No edit summary
Line 1: Line 1:
<templatestyles src="Button/style.css" />
<templatestyles src="Button/style.css" />


<div class="tpl-button-{{{align|center}}}">
<div class="tpl-button-{{{align|center}}}" style="margin-top:{{{top|0}}}px; margin-bottom:{{{bottom|0}}}px;">
<div class="tpl-button tpl-button-{{{color|red}}}">
<div class="tpl-button tpl-button-{{{color|red}}}">
[[{{{link|}}}|{{{text|}}}]]
[[{{{link}}}|{{{text}}}]]
</div>
</div>
</div>
</div>
<noinclude>
<templatedata>
{
"params": {
"align": {
"description": "Choose left, center or right. Always full-width on mobile. Defaults as center.",
"type": "string",
"default": "center"
},
"top": {
"description": "Create empty space above the button (in pixels, integer only)",
"type": "number",
"default": "0"
},
"bottom": {
"description": "Create empty space below the button (in pixels, integer only)",
"type": "number",
"default": "0"
},
"link": {
"description": "The URL where you want the button to link",
"type": "string",
            "required": true
},
"color": {
"description": "Choose between red, green, blue, or yellow (default: red)",
"type": "string",
"default": "red"
},
"text": {
"description": "The text you want the button to display",
"type": "string",
            "required": true
}
}
}
</templatedata>
</noinclude>

Revision as of 21:00, 25 September 2023

[[{{{link}}}|{{{text}}}]]


No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
alignalign

Choose left, center or right. Always full-width on mobile. Defaults as center.

Default
center
Stringoptional
toptop

Create empty space above the button (in pixels, integer only)

Default
0
Numberoptional
bottombottom

Create empty space below the button (in pixels, integer only)

Default
0
Numberoptional
linklink

The URL where you want the button to link

Stringrequired
colorcolor

Choose between red, green, blue, or yellow (default: red)

Default
red
Stringoptional
texttext

The text you want the button to display

Stringrequired