Template:Note: Difference between revisions
Template page
More actions
Replaced manually added params table with template data block on /doc |
Added optional header and 'example' type |
||
| Line 1: | Line 1: | ||
<onlyinclude>{{#if: {{{1|{{{content|{{{text|{{{demo|<noinclude>demo</noinclude>}}}}}}}}}}}} | <templatestyles src="Note/styles.css" /><div | <onlyinclude>{{#if: {{{1|{{{content|{{{text|{{{demo|<noinclude>demo</noinclude>}}}}}}}}}}}} | <templatestyles src="Note/styles.css" /><div class="note-container note-{{#switch: {{{2|{{{type|}}}}}} | ||
|gotcha=error | |gotcha=error | ||
|warning=warn | |warning=warn | ||
| Line 5: | Line 5: | ||
|=info | |=info | ||
|#default={{{2|{{{type|}}}}}} | |#default={{{2|{{{type|}}}}}} | ||
}} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{#ifeq:{{{inline|}}}|1|{{{1|{{{content|{{{text}}}}}}}}}| | }} {{#ifeq:{{{inline|}}}|1|note-inline}}"><div role="note" class="note note-{{#switch: {{{2|{{{type|}}}}}} | ||
{{{1|{{{content|{{{text}}}}}}}}}}}</div> | |gotcha=error | ||
|warning=warn | |||
|notice=info | |||
|=info | |||
|#default={{{2|{{{type|}}}}}} | |||
}}">{{#ifeq:{{{inline|}}}|1|{{{header|{{{1|{{{content|{{{text}}}}}}}}}}}}| | |||
{{{header|{{{1|{{{content|{{{text}}}}}}}}}}}}}}</div>{{#if:{{{header|}}}|<div class="note-body"> | |||
{{{1|{{{content|{{{text}}}}}}}}}</div>}}</div> | |||
| [[File:Icon lightbulb-yellow.svg|18px|alt=Note|link=]] '''Note:''' }}<!-- | | [[File:Icon lightbulb-yellow.svg|18px|alt=Note|link=]] '''Note:''' }}<!-- | ||
--></onlyinclude> | --></onlyinclude> | ||
| Line 12: | Line 19: | ||
<pre> | <pre> | ||
{{Note|text=Note without type}} | {{Note|text=Note without type}} | ||
{{Note|type=info|text=Note with type 'info'}} | {{Note|type=info|text=Note with type 'info'}} | ||
{{Note|type=info|text=Note with type 'info'|header=Header text}} | |||
{{Note|type=example|text=Note with type 'example'}} | |||
{{Note|type=example|text=Note with type 'example'|header=Header text}} | |||
{{Note|type=reminder|text=Note with type 'reminder'}} | {{Note|type=reminder|text=Note with type 'reminder'}} | ||
{{Note|type=reminder|text=Note with type 'reminder'|header=Header text}} | |||
{{Note|type=warn|text=Note with type 'warn'}} | {{Note|type=warn|text=Note with type 'warn'}} | ||
{{Note|type=warn|text=Note with type 'warn'|header=Header text}} | |||
{{Note|type=error|text=Note with type 'error'}} | {{Note|type=error|text=Note with type 'error'}} | ||
{{Note|type=error|text=Note with type 'error'|header=Header text}} | |||
{{Note|type=reminder|text=Add<br>br tags<br>to add<br>a line break}} | |||
{{Note|type=reminder|text= | |||
* Multiple paragraphs. | |||
Of text.}} | |||
{{Note|type=reminder|text= | |||
* Multiple paragraphs. | |||
Of text.|header=Header text}} | |||
{{Note}} Text with a note prefix | {{Note}} Text with a note prefix | ||
| Line 22: | Line 52: | ||
{{Note|text=Note without type}} | {{Note|text=Note without type}} | ||
{{Note|type=info|text=Note with type 'info'}} | {{Note|type=info|text=Note with type 'info'}} | ||
{{Note|type=info|text=Note with type 'info'|header=Header text}} | |||
{{Note|type=example|text=Note with type 'example'}} | |||
{{Note|type=example|text=Note with type 'example'|header=Header text}} | |||
{{Note|type=reminder|text=Note with type 'reminder'}} | {{Note|type=reminder|text=Note with type 'reminder'}} | ||
{{Note|type=reminder|text=Note with type 'reminder'|header=Header text}} | |||
{{Note|type=warn|text=Note with type 'warn'}} | |||
{{Note|type=warn|text=Note with type 'warn'|header=Header text}} | |||
{{Note|type=error|text=Note with type 'error'}} | |||
{{Note|type=error|text=Note with type 'error'|header=Header text}} | |||
{{Note|type=reminder|text=Add<br>br tags<br>to add<br>a line break}} | {{Note|type=reminder|text=Add<br>br tags<br>to add<br>a line break}} | ||
{{Note|type=reminder|text= | {{Note|type=reminder|text= | ||
| Line 28: | Line 66: | ||
Of text.}} | Of text.}} | ||
{{Note|type= | {{Note|type=reminder|text= | ||
* Multiple paragraphs. | |||
Of text.|header=Header text}} | |||
{{Note}} Text with a note prefix | {{Note}} Text with a note prefix | ||
Latest revision as of 12:31, 27 April 2026
{{{text}}}
Usage
{{Note|text=Note without type}}
{{Note|type=info|text=Note with type 'info'}}
{{Note|type=info|text=Note with type 'info'|header=Header text}}
{{Note|type=example|text=Note with type 'example'}}
{{Note|type=example|text=Note with type 'example'|header=Header text}}
{{Note|type=reminder|text=Note with type 'reminder'}}
{{Note|type=reminder|text=Note with type 'reminder'|header=Header text}}
{{Note|type=warn|text=Note with type 'warn'}}
{{Note|type=warn|text=Note with type 'warn'|header=Header text}}
{{Note|type=error|text=Note with type 'error'}}
{{Note|type=error|text=Note with type 'error'|header=Header text}}
{{Note|type=reminder|text=Add<br>br tags<br>to add<br>a line break}}
{{Note|type=reminder|text=
* Multiple paragraphs.
Of text.}}
{{Note|type=reminder|text=
* Multiple paragraphs.
Of text.|header=Header text}}
{{Note}} Text with a note prefix
* Text {{Note|inline=1|text=with an inline note}}
Note without type
Note with type 'info'
Header text
Note with type 'info'
Note with type 'example'
Header text
Note with type 'example'
Note with type 'reminder'
Header text
Note with type 'reminder'
Note with type 'warn'
Header text
Note with type 'warn'
Note with type 'error'
Header text
Note with type 'error'
Add
br tags
to add
a line break
br tags
to add
a line break
- Multiple paragraphs.
Header text
- Multiple paragraphs.
Note: Text with a note prefix
- Text with an inline note
Template Specification
Show a note in a box (e.g. a top-of-the-page warning).
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Inline formatting | inline | Show the template without line breaks before and after it.
| Boolean | optional |
| Type | type 2 | One of “info”, “example”, “reminder”, “warn”, or “error”. This setting affects the color and icon.
| String | optional |
| Header | header | Header text. This is expected to be used in combination with the 'text' parameter. | Content | optional |
| Text | text 1 content | Informative note. If the 'header' parameter is used, this will be the body text. | Content | optional |