Want to contribute? Join the Discord and ask for the editor role.
Template:Mbox: Difference between revisions
Template page
No edit summary Tag: 2017 source edit |
No edit summary Tag: 2017 source edit |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<div class="mbox mbox--{{{priority|low}}} {{#ifeq:{{yesno|{{{ | <div class="mbox mbox--{{{priority|low}}} {{#ifeq:{{yesno|{{{expanded|no}}}}}|yes|mbox--expanded}}" role="presentation"><span class="mbox__title"><span class="mbox__icon metadata {{#if: {{yesno|{{{imageinvert|yes}}}}}||mbox__icon--noinvert}}">[[File:{{{image|WikimediaUI-Alert.svg}}}|{{{imagesize|14px}}}|link=]]</span><span>{{{title|}}}</span></span>{{#if: {{{description|}}} | <div class="mbox__text">{{{description|}}}</div> }} | ||
{{#if: {{{description|}}} | <div class="mbox__text">{{{description}}}</div> }} | |||
</div><templatestyles src="Template:Mbox/styles.css" /> | </div><templatestyles src="Template:Mbox/styles.css" /> | ||
<noinclude><templatedata> | |||
{ | |||
"description": "Shows a message box", | |||
"params": { | |||
"title": { | |||
"label": "Title", | |||
"type": "string", | |||
"suggested": true, | |||
"required": true, | |||
"description": "Title of the message box, will always be shown" | |||
}, | |||
"description": { | |||
"label": "Description", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Additional text. If message box is expanded it will be shown below the title, otherwise it will be shown when hovering on the message box." | |||
}, | |||
"expanded": { | |||
"label": "Expanded", | |||
"type": "boolean", | |||
"suggested": true, | |||
"description": "Whethere the message box is expanded. If true the description will be shown at all times, otherwise it will displayed when hovering on the message box." | |||
}, | |||
"priority": { | |||
"label": "Priority", | |||
"type": "string", | |||
"suggested": true, | |||
"description": "Message box priority. Determines the colour when no other classes are applied. Valid values are low/med/high. Defaults to low." | |||
}, | |||
"class": { | |||
"label": "Class", | |||
"type": "string", | |||
"description": "Additional CSS classes to add to the message box element" | |||
}, | |||
"image": { | |||
"label": "Image", | |||
"type": "wiki-file-name", | |||
"description": "Image to show in the message box." | |||
}, | |||
"imagesize": { | |||
"label": "Image Size", | |||
"type": "string", | |||
"description": "Size of the image to show in the message box, with px units. Defaults to 14px" | |||
}, | |||
"imageinvert": { | |||
"label": "Image Invert", | |||
"description": "If true, images will be inverted on dark themed pages", | |||
"type": "boolean", | |||
"default": "yes" | |||
} | |||
} | |||
} | |||
</templatedata>[[Category:Templates]]{{/doc}}</noinclude> |
Latest revision as of 23:00, 6 May 2021
Shows a message box
Parameter | Description | Type | Status | |
---|---|---|---|---|
Title | title | Title of the message box, will always be shown | String | required |
Description | description | Additional text. If message box is expanded it will be shown below the title, otherwise it will be shown when hovering on the message box. | String | suggested |
Expanded | expanded | Whethere the message box is expanded. If true the description will be shown at all times, otherwise it will displayed when hovering on the message box. | Boolean | suggested |
Priority | priority | Message box priority. Determines the colour when no other classes are applied. Valid values are low/med/high. Defaults to low. | String | suggested |
Class | class | Additional CSS classes to add to the message box element | String | optional |
Image | image | Image to show in the message box. | File | optional |
Image Size | imagesize | Size of the image to show in the message box, with px units. Defaults to 14px | String | optional |
Image Invert | imageinvert | If true, images will be inverted on dark themed pages
| Boolean | optional |