Template:Caution: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Undid revision 853071246 by Hddty. (talk)
 
m 1 revision imported
Line 1:
<includeonly>{{#if: {{{1|}}}|<table cellspacing="0" cellpadding="0" border="0" style="background: transparent;"><tr><td nowrap="nowrap" valign="top">}}<span style="position: relative; top: -2px;">[[File:Caution.png|20px|2em|Warning|link=]]</span> '''Caution''': {{#if: {{{1|}}}|</td><td valign="top" style="padding-left:0.5em;">{{{1|}}}</td></tr></table>}}</includeonly><noinclude>
{{Mbox
 
| name = Caution
== Usage ==
| demospace = {{{demospace|}}}
 
| style = {{#if:{{{style|}}} |{{#if:{{{small|}}}||margin:inherit auto;width:80%;}} {{{style}}} }}
This template has two possible usages:
| subst = <includeonly>{{subst:substcheck}}</includeonly>
# Will have the text flow below when the caution text is too long
| type = style
# Uses a table to indent the text.
| image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Caution|link={{{imagelink|}}}]] |[[File:Ambox warning yellow.svg|40px|Caution|link={{{imagelink|}}}]]}}
 
| small = {{{small|}}}
=== Method 1 ===
| smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Caution|link={{{imagelink|}}}]] |[[File:Ambox warning yellow.svg|30px|Caution|link={{{imagelink|}}}]]}}
 
| imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }}
The following displays the warning icon and the word 'Warning:'. You can follow this with whatever text/images/markup you like.
| textstyle = {{{textstyle|{{{align|text-align: {{#if:{{{center|}}}|center|left}};}}}}}}
 
| text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="text-align:{{#if:{{{center|}}}|center|left}};">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!--
Wiki Code:
-->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}}
<nowiki>{{Caution}}</nowiki> Be careful!
}}<noinclude>{{Documentation}}</noinclude>
 
{{Caution}} Don't do that!
 
=== Method 2 ===
The following includes the text passed to the template, and uses a table to stop the text flowing round the icon.
 
Wiki Code:
<nowiki>{{Caution|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>
 
{{Caution|Here is a long caution, 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.}}
 
{{Languages|Template:Warning}}
[[Category:Templates|{{PAGENAME}}]]
</noinclude>