More actions
Content deleted Content added
Alistair3149 (talk | contribs) No edit summary Tag: 2017 source edit |
Alistair3149 (talk | contribs) No edit summary Tag: 2017 source edit |
||
(3 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
This template is used to style text as a badge. |
This template is used to style text as a badge. |
||
==Usage== |
|||
<code><nowiki>{{Badge|Lando's favourite ship}}</nowiki></code> gives {{Badge|Lando's favourite ship}} |
|||
<code><nowiki>{{Badge|Lando's favourite ship|color=#666}}</nowiki></code> gives {{Badge|Lando's favourite ship|color=#666}} |
|||
<code><nowiki>{{Badge|Lando's favourite ship|bg=#d0817d}}</nowiki></code> gives {{Badge|Lando's favourite ship|bg=#d0817d}} |
|||
<code><nowiki>{{Badge|Lando's favourite ship|bg=#d0817d|color=#222}}</nowiki></code> gives {{Badge|Lando's favourite ship|bg=#d0817d|color=#222}} |
|||
==TemplateData== |
==TemplateData== |
||
Line 23: | Line 32: | ||
"type": "string" |
"type": "string" |
||
}, |
}, |
||
" |
"color": { |
||
"label": " |
"label": "Color", |
||
"description": " |
"description": "Color of the text on the badge", |
||
"example": " |
"example": "#000", |
||
"type": " |
"type": "string" |
||
"default": "false" |
|||
} |
} |
||
}, |
}, |
||
Line 35: | Line 43: | ||
"1", |
"1", |
||
"bg", |
"bg", |
||
" |
"color", |
||
"class" |
"class" |
||
], |
], |
Latest revision as of 06:25, 3 July 2024
This is a documentation subpage for 'Template:Badge'.
It contains usage information, categories, and other content that is not part of the original template page.
This template is used to style text as a badge.
Usage
{{Badge|Lando's favourite ship}}
gives Lando's favourite ship
{{Badge|Lando's favourite ship|color=#666}}
gives Lando's favourite ship
{{Badge|Lando's favourite ship|bg=#d0817d}}
gives Lando's favourite ship
{{Badge|Lando's favourite ship|bg=#d0817d|color=#222}}
gives Lando's favourite ship
TemplateData
Style text as a badge
Parameter | Description | Type | Status | |
---|---|---|---|---|
Text | 1 | Text in the badge | String | required |
Background color | bg | Background color of the badge (HEX/RGB(A)/HSL(A)) | String | optional |
Color | color | Color of the text on the badge
| String | optional |
HTML class | class | Additional HTML class | String | optional |
See also
- {{Transit}} - used for transit lines