Difference between revisions of "Template:Warning"

From Wikispooks
Jump to navigation Jump to search
m (1 revision: pages from 1153)
m (1 revision imported)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{#if: {{{1|}}}|<table cellspacing="0" cellpadding="0" border="0" style="background: transparent;"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[Image:Attention niels epting.svg|18px|Warning]]</span> '''Warning''': {{#if: {{{1|}}}|</td><td valign="top" style="padding-left:0.5em;">{{{1|}}}</td></tr></table>}}<noinclude>
+
{{Mbox
 
+
| name      = Warning
== Usage ==
+
| demospace  = {{{demospace|}}}
 
+
| style      = {{#if:{{{style|}}} |{{#if:{{{small|}}}||width:80%;}} {{{style}}} }}
=== Method 1 ===
+
| subst      = <includeonly>{{subst:substcheck}}</includeonly>
 
+
| type      = content
The following displays the warning icon and the word 'Warning:'.  You can follow this with whatever text/images/markup you like.
+
| image      = {{#if:{{{image|}}}| [[File:{{{image}}}|{{{imagesize|40px}}}|Warning]] }}
<nowiki>{{warning}}</nowiki> Don't do that!
+
| small      = {{{small|}}}
 
+
| smallimage = {{#if:{{{image|}}}| [[File:{{{image}}}|30px|Warning]]}}
{{warning}} Don't do that!
+
| imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }}
 
+
| textstyle  = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}}
=== Method 2 ===
+
| text      = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!--
The following includes the text passed to the template, and uses a table to stop the text flowing round the icon.
+
            -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}}
<nowiki>{{warning|Here is a long warning, which is sufficiently wordy to run onto a second line,
+
}}<noinclude>
which would normally cause it to wrap round the icon, but because we passed it as a parameter
+
<!-- Add categories to the /doc subpage; interwikis go to Wikidata. -->
it keeps its left alignment straight.}}</nowiki>  
+
{{Documentation}}
 
 
{{warning|Here is a long warning, which is sufficiently wordy to run onto a second line, which would normally cause it to wrap round the icon, but because we passed it as a parameter it keeps its left alignment straight.}}
 
 
 
{{Languages|Template:Warning}}
 
[[Category:Templates|{{PAGENAME}}]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 17:14, 7 August 2020

Template documentation[create]