Difference between revisions of "Template:Note"

From Mashinky
Jump to: navigation, search
(swap svg filelink for png filelink)
 
Line 1: Line 1:
<onlyinclude>{{#if: {{#if:{{{1|{{{text|}}}}}}|{{{1|{{{text|}}}}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
+
<includeonly>{{#if: {{#if:{{{1|{{{text|}}}}}}|{{{1|{{{text|}}}}}}|{{#if:<noinclude>demo</noinclude>|demo|{{{demo|}}}}} }} | <div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
 
     |gotcha=error
 
     |gotcha=error
 
     |=info
 
     |=info
Line 5: Line 5:
 
     }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{text}}}}}}</div>
 
     }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{text}}}}}}</div>
 
   | [[File:OOjs UI icon lightbulb-yellow.png|18px|Note|link=]]&nbsp;'''Note:''' }}<!--
 
   | [[File:OOjs UI icon lightbulb-yellow.png|18px|Note|link=]]&nbsp;'''Note:''' }}<!--
--></onlyinclude>
+
--></includeonly><noinclude>
 +
== Usage ==
 +
Picking one of these options:
 +
<pre>
 +
{{Note|Foo}}
 +
{{Note|Foo|info}}
 +
{{Note|Foo|reminder}}
 +
{{Note|Foo|warn}}
 +
{{Note|Foo|error}}
 +
{{Note}} Loose test
 +
 
 +
* Text {{Note|Foo|inline=1}}
 +
</pre>
 +
 
 +
Will produce these formatted notes:
 +
 
 +
{{Note|Foo}}
 +
{{Note|Foo|info}}
 +
{{Note|Foo|reminder}}
 +
{{Note|Foo|warn}}
 +
{{Note|Foo|error}}
 +
{{Note}} Loose test
 +
 
 +
* Text {{Note|Foo|inline=1}}
 +
 
 +
Don't forget to change Foo for your own text.</noinclude>

Latest revision as of 01:51, 31 December 2021

Usage

Picking one of these options:

{{Note|Foo}}
{{Note|Foo|info}}
{{Note|Foo|reminder}}
{{Note|Foo|warn}}
{{Note|Foo|error}}
{{Note}} Loose test

* Text {{Note|Foo|inline=1}}

Will produce these formatted notes:

Foo
Foo
Foo
Foo
Foo

Note Note: Loose test

  • Text
    Foo

Don't forget to change Foo for your own text.