Difference between revisions of "Template:Box Note"
m (Tag: 2017 source edit) |
(Tag: 2017 source edit) |
Note: {{{Note text}}}
Kopiervorlage:
{{Box_Note|Note text =}}
This template creates different types of info boxes on a page. Based on the box type, the label and the color scheme are selected.
The template files (Template:Box Note and Template:Box Note/styles.css can be downloaded as part of the template package.
To add standard infoboxes such as notes or related links to a page
UnknownParameter | Description | Type | Status | |
---|---|---|---|---|
BoxtypeType of box | boxtype |
Possible values: note, tip, warning, important, example, backgroundbox. If type backgroundbox is chosen, then no label is added before the message.
|
String | required |
Note textText message | Note text |
no description
|
Content | optional |
Background color |
bgcolor
|
Changes the background color of the box.
|
String | optional |
<div class="infobox notification-{{{boxtype}}}" {{#if:{{{bgcolor|}}}|style="background:{{{bgcolor}}}"|}}> <span class="boxlabel"> {{#switch: {{{boxtype}}} | note = Note: | tip = Tip: | warning = Warning: | example = Example: | important = Important! | backgroundbox = | #default = Note: }} </span>{{{Note text}}} </div> <noinclude> Kopiervorlage: <pre> {{Box_Note|Note text =}} </pre> This template creates different types of info boxes on a page. Based on the box type, the label and the color scheme are selected. The template files (''Template:Box Note'' and ''Template:Box Note/styles.css'' can be downloaded as part of the [[Manual:Template/Template package|template package]]. [[File:template-download-Box Note.png|550x550px|center|alt=screenshot of infobox template|thumb|Infoboxes created with this template]] <templatedata> { "params": { "boxtype": { "description": "Possible values: note, tip, warning, important, example, backgroundbox. If type backgroundbox is chosen, then no label is added before the message.", "example": "note", "type": "string", "default": "note", "required": true }, "Note text": {} }, "label": "Type of box" }, "Note text": { "label": "Text message", "type": "content" }, "bgcolor": { "label": "Background color", "description": "Changes the background color of the box.", "type": "string" } }, "description": "To add standard infoboxes such as notes or related links to a page" } </templatedata> </noinclude>
(27 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <div class="infobox {{{boxtype}}}"> | + | <div class="infobox notification-{{{boxtype}}}" |
+ | {{#if:{{{bgcolor|}}}|style="background:{{{bgcolor}}}"|}}> | ||
<span class="boxlabel"> | <span class="boxlabel"> | ||
{{#switch: {{{boxtype}}} | {{#switch: {{{boxtype}}} | ||
Line 5: | Line 6: | ||
| tip = Tip: | | tip = Tip: | ||
| warning = Warning: | | warning = Warning: | ||
+ | | example = Example: | ||
+ | | important = Important! | ||
+ | | backgroundbox = | ||
| #default = Note: | | #default = Note: | ||
}} | }} | ||
Line 10: | Line 14: | ||
</div> | </div> | ||
<noinclude> | <noinclude> | ||
− | + | This template creates different types of info boxes on a page. Based on the box type, the label and the color scheme are selected. | |
− | + | ||
− | + | The template files (''Template:Box Note'' and ''Template:Box Note/styles.css'' can be downloaded as part of the [[Manual:Template/Template package|template package]]. | |
− | + | ||
+ | [[File:template-download-Box Note.png|550x550px|center|alt=screenshot of infobox template|thumb|Infoboxes created with this template]] | ||
+ | |||
+ | |||
<templatedata> | <templatedata> | ||
{ | { | ||
"params": { | "params": { | ||
"boxtype": { | "boxtype": { | ||
− | "description": "Possible values: note, tip, warning", | + | "description": "Possible values: note, tip, warning, important, example, backgroundbox. If type backgroundbox is chosen, then no label is added before the message.", |
"example": "note", | "example": "note", | ||
"type": "string", | "type": "string", | ||
"default": "note", | "default": "note", | ||
− | "required": true | + | "required": true, |
+ | "label": "Type of box" | ||
}, | }, | ||
− | "Note text": {} | + | "Note text": { |
+ | "label": "Text message", | ||
+ | "type": "content" | ||
+ | }, | ||
+ | "bgcolor": { | ||
+ | "label": "Background color", | ||
+ | "description": "Changes the background color of the box.", | ||
+ | "type": "string" | ||
+ | } | ||
}, | }, | ||
"description": "To add standard infoboxes such as notes or related links to a page" | "description": "To add standard infoboxes such as notes or related links to a page" |