Template:Warning: Difference between revisions
From Artisans Asylum Wiki
Acharlwood (talk | contribs) No edit summary |
Acharlwood (talk | contribs) (Template code cleanup and simplification) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{| class="warningbox" | |||
! [[File:OOjs_UI_icon_notice-destructive.png|20px|alt=Warning|link=]] !! class="warningbox-text" | {{{text}}} | |||
|- | |||
| | |||
|} | |||
<noinclude> | <noinclude> | ||
Line 18: | Line 21: | ||
Wiki code: | Wiki code: | ||
<nowiki>{{warning| | <nowiki>{{warning|text=</nowiki> Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.<nowiki>}}</nowiki> | ||
{{warning| | {{warning|text=Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}} | ||
(This is a subset of the [https://www.mediawiki.org/wiki/Template:Warning MediaWiki Warning Template]) | (This is a subset of the [https://www.mediawiki.org/wiki/Template:Warning MediaWiki Warning Template]) | ||
Line 29: | Line 32: | ||
"description": "Adds a warning box to a page.", | "description": "Adds a warning box to a page.", | ||
"params": { | "params": { | ||
" | "text": { | ||
"label": "Warning message", | "label": "Warning message", | ||
"type": "string", | "type": "string", |
Latest revision as of 13:46, 2 February 2024
{{{text}}} | |
---|---|
Warning Template
The following displays the warning icon and the word "Warning: " followed by the included text.
Wiki code:
{{warning|text=Don't do that!}}
Don't do that! | |
---|---|
Example
Here is a longer example.
Wiki code:
{{warning|text= Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}}
Here is a long warning, which is sufficiently wordy to run onto a second line (unless you have a really large screen!), which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight. | |
---|---|
(This is a subset of the MediaWiki Warning Template)
Adds a warning box to a page.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Warning message | text 1 | Warning message (i.e. "Look out below!") | String | required |