Difference between revisions of "Template:Badge"

From WPRDC Wiki
Jump to navigation Jump to search
>Krinkle
m (Protected "Template:Badge" ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
>Fbstj
(add templatedata)
Line 1: Line 1:
<div style="{{#switch: {{{align|}}}
 
<noinclude><div style="{{#switch: {{{align|}}}
  | right= float: right; clear: right; margin: 0 0 0.5em 0.5em;
  | right= float: right; clear: right; margin: 0 0 0.5em 0.5em;
  | left= float: left; clear: left; margin: 0 0 0.5em 0.5em;
  | left= float: left; clear: left; margin: 0 0 0.5em 0.5em;
Line 5: Line 6:
  | center= margin: 0.5em auto;
  | center= margin: 0.5em auto;
  }} background-color: {{{bg-color|#E7EFF5}}}; {{{border|border: 1px solid #A1CEF5}}}; padding: 5px 8px; {{border-radius|10px}} {{{style|}}}; text-align: center;">{{{content}}}</div>
  }} background-color: {{{bg-color|#E7EFF5}}}; {{{border|border: 1px solid #A1CEF5}}}; padding: 5px 8px; {{border-radius|10px}} {{{style|}}}; text-align: center;">{{{content}}}</div>
<templatedata>
{
"description": "",
"paramOrder": [
"content",
"align",
"bg-color",
"border",
"style"
],
"params": {
"align": {
"label": "Alignment",
"description": "How to align the badge, either left, right or middle/center ",
"type": "string",
"required": true
},
"bg-color": {
"label": "Background color",
"description": "A CSS color string",
"type": "string",
"default": "#E7EFF5"
},
"border": {
"label": "Border style",
"description": "A CSS border style string",
"type": "string",
"default": "border: 1px solid #A1CEF5"
},
"style": {
"label": "Extra style",
"description": "Extra CSS for the badge's style tag.",
"type": "string",
"default": "10px"
},
"content": {
"label": "Contents",
"description": "The badge's content",
"type": "content",
"required": true
}
}
}
</templatedata>
</noinclude>

Revision as of 13:50, 26 November 2014

{{{content}}}

Template parameters

ParameterDescriptionTypeStatus
Contentscontent

The badge's content

Contentrequired
Alignmentalign

How to align the badge, either left, right or middle/center

Stringrequired
Background colorbg-color

A CSS color string

Default
#E7EFF5
Stringoptional
Border styleborder

A CSS border style string

Default
border: 1px solid #A1CEF5
Stringoptional
Extra stylestyle

Extra CSS for the badge's style tag.

Default
10px
Stringoptional