Template:Note: Difference between revisions

From Svacer Wiki
No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<onlyinclude>{{#if: {{{1|{{{content|{{{text|{{{demo|<noinclude>demo</noinclude>}}}}}}}}}}}} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
<onlyinclude>{{#if: {{{1|{{{content|{{{text|{{{demo|<noinclude>demo</noinclude>}}}}}}}}}}}} | <templatestyles src="Note/styles.css" /><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}}
     |gotcha=error
     |gotcha=error
Line 7: Line 6:
     |#default={{{2|{{{type|}}}}}}
     |#default={{{2|{{{type|}}}}}}
     }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{content|{{{text}}}}}}}}}</div>
     }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{content|{{{text}}}}}}}}}</div>
   | [[File:OOjs UI icon lightbulb-yellow.svg|18px|alt=<translate><!--T:1--> Note</translate>|link=]]&nbsp;'''<translate><!--T:2--> Note:</translate>''' }}<!--
   | [[File:OOjs_UI_icon_alert-warning.png|18px|alt=Note|link=]]&nbsp;}}</onlyinclude>
--></onlyinclude>
 
{{documentation|content=
== Usage ==  
<translate>
== Usage == <!--T:3-->
</translate>
<pre>
<pre>
{{Note|text=Foo}}
{{Note|text=Foo}}
Line 20: Line 16:
{{Note|type=warn|text=Foo}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} <translate nowrap><!--T:6--> Loose test</translate>
{{Note}} Warning inline


* Text {{Note|inline=1|text=Foo}}
* Text {{Note|inline=1|text=Foo}}
Line 30: Line 26:
{{Note|type=warn|text=Foo}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} <translate><!--T:4--> Loose test</translate>
{{Note}} Warning inline


* Text {{Note|inline=1|text=Foo}}
* Text {{Note|inline=1|text=Foo}}
Line 37: Line 33:


{{Note/doc}}
{{Note/doc}}
== See also ==
* {{tl|warn}}, shortcut for this template with <code>type=warning</code>.
* {{tl|mbox}}, and in particular the namespace-agnostic {{tl|ombox}}, which by default resembles a typical "info" template.
}}
[[Category:Templates{{#translation:}}|{{PAGENAME}}]]

Latest revision as of 18:56, 18 June 2024

{{{text}}}

Usage

{{Note|text=Foo}}
{{Note|type=info|text=Foo}}
{{Note|type=reminder|text=Foo}}
{{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}}
{{Note|type=warn|text=Foo}}
{{Note|type=error|text=Foo}}
{{Note}} Warning inline

* Text {{Note|inline=1|text=Foo}}
Foo
Foo
Foo
Multiple
lines
of
text
Foo
Foo

Note  Warning inline

  • Text
    Foo

Parameters

Show a note in a box (e.g. a top-of-the-page warning).

[Edit template data]

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Inline formattinginline

Show the template without line breaks before and after it.

Default
0
Auto value
1
Booleanoptional
Typetype 2

One of “info”, “reminder”, “warn”, or “error”. This setting affects the color and icon.

Suggested values
info reminder warn error
Default
info
Stringoptional
Texttext 1 content

Informative note.

Contentrequired