Template:Note: Difference between revisions

[unchecked revision][pending revision]
Content deleted Content added
No edit summary
No edit summary
Tag: 2017 source edit
 
(48 intermediate revisions by 2 users not shown)
Line 1:
<includeonly><templatestyles src="Note/styles.css" />{{#switch: {{{2}}}
<onlyinclude>{{#switch:
| reminder-green =
| =
<div style="clear: both;"></div><div class="note {{{4|back-palegreen}}}">
{{#if: {{#if:{{{1|}}}|{{{1}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch:{{{2|}}}
<div style="float: left">[[File:OOjs UI icon lightbulb-yellow.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Note: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
|gotcha=error
| reminder-yellow =
|=info
<div style="clear: both;"></div><div class="note {{{4|back-yellow}}}">
|#default={{{2|}}}
<div style="float: left">[[File:OOjs UI icon lightbulb-yellow.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Note: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
}} {{#if:{{{inline|}}}|note-inline}}">{{{1}}}</div>
| caution =
| [[File:OOjs UI icon lightbulb-yellow.svg|18px|Note|link=]]&nbsp;'''Note:''' }}
<div style="clear: both;"></div><div class="note {{{4|back-orange}}}>
| #default=
<div style="float: left">[[File:OOjs UI icon alert-warning.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Caution: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
{{Template:Note|noshift=1}}
| caution-red =
}}</onlyinclude>
<div style="clear: both;"></div><div class="note {{{4|back-red}}}>
 
<div style="float: left">[[File:OOjs UI icon alert-destructive.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Caution: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
== Usage ==
| caution-orange =
<pre>
<div style="clear: both;"></div><div class="note {{{4|back-orange}}}>
{{Note|Foo}}
<div style="float: left">[[File:OOjs UI icon alert-warning.svg|30px]]</div> <div>&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Caution: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
{{Note|Foo|reminder}}
| tip =
{{Note|Foo|error}}
<div style="clear: both;"></div><div class="note {{{4|back-clear-blue}}}>
{{Note|Foo|gotcha}}
<div style="float: left">[[File:Customer Service Icon.png||30px]]</div> <div>&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Tip: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
{{Note}} Loose test
| moved =
 
<div style="clear: both;"></div><div class="note {{{4|back-clear-blue}}}>
* Text {{Note|Foo|inline=1}}
<div style="float: left">[[File:301redirect.png|100px]]</div> <div>&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Moved: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
</pre>
| warning =
{{Note|Foo}}
<div style="clear: both;"></div><div class="note {{{4|back-red}}}>
{{Note|Foo|reminder}}
<div style="float: left">[[File:OOjs_UI_icon_notice-destructive.svg|30px]]</div> <div>&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Warning: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
{{Note|Foo|error}}
| dragons =
{{Note|Foo|gotcha}}
<div style="clear: both;"></div><div class="note {{{4|back-red}}}>
{{Note}} Loose test
<div style="float: left">[[File:Dragon.webp|100px]]</div><div style="min-height: 100px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Here be Dragons!}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
 
| info =
* Text {{Note|Foo|inline=1}}
<div style="clear: both;"></div><div class="note {{{4|back-brown}}}>
 
<div style="float: left">[[File:OOjs_UI_icon_reference_20_ac6600.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
<templatedata>
| info-blue =
{
<div style="clear: both;"></div><div class="note {{{4|back-clear-blue}}}>
"params": {
<div style="float: left">[[File:OOjs UI icon reference-progressive.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;{{{1}}}</div></div></div>
"1": {
| legend =
"type": "content",
<div style="clear: both;"></div><div class="note {{{4|back-lightgrey}}}>
"label": "Text",
<div style="float: left">[[File:OOjs UI icon info.svg.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Legend: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
"required": true
| legend-clear =
},
<div style="clear: both;"></div><div class="note {{{4|back-clear-black}}}>
"2": {
<div style="float: left">[[File:OOjs UI icon info.svg.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Legend: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
"label": "Type",
| legend-blue =
"description": "'reminder', 'error', 'gotcha' or nothing. Will affect formatting.",
<div style="clear: both;"></div><div class="note {{{4|back-clear-blue}}}>
"type": "line"
<div style="float: left">[[File:OOjs UI icon info-progressive.svg.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Legend: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
},
| elephant =
"inline": {
<div style="clear: both;"></div><div class="note {{{4|back-pink}}}>
"label": "Inline formatting",
<div style="float: left">[[File:pink-elephant.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;{{{1}}}</div></div></div>
"description": "Show the template without line breaks before and after it",
| clown =
"type": "line"
<div style="clear: both;"></div><div class="note {{{4|back-cyan-sky-boarder}}}>
}
<div style="float: left">[[File:clown-icon.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
},
| backpack =
"format": "inline",
<div style="clear: both;"></div><div class="note {{{4|back-yellow-teal-boarder}}}>
"description": "Show a note in a box (e.g. a top-of-the-page warning)."
<div style="float: left">[[File:backpack-icon.jpg|60px]]</div><div style="min-height: 60px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|&nbsp;}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
}
| tension =
</templatedata>
<div style="clear: both;"></div><div class="note {{{4|back-red}}}>
<div style="float: left">[[File:tension-icon.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
| crystalball =
<div style="clear: both;"></div><div class="note {{{4|back-lavender-purple-boarder}}}>
<div style="float: left">[[File:crystal-ball-icon.png|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
| hourglass =
<div style="clear: both;"></div><div class="note {{{4|back-green-darkgreen-boarder}}}>
<div style="float: left">[[File:Hourglass-icon.svg|35px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
| breadcrumbs =
<div style="clear: both;"></div><div class="note {{{4|back-clear-black}}}>
<div style="float: left">[[File:breadcrumb-trail.png|100px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|}}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
| #default =
<div style="clear: both;"></div><div class="note {{{4|back-palegreen}}}">
<div style="float: left">[[File:OOjs UI icon lightbulb-yellow.svg|30px]]</div><div style="min-height: 35px;">&nbsp;<div style="flex-grow:0;flex-shrink:0;"><strong>{{{3|Note: }}}</strong>&nbsp;&nbsp;</div><div>{{{1}}}</div></div></div>
}}</includeonly><noinclude>
{{documentation}}</noinclude>