Difference between revisions of "Template:Note"

From SoftMC-Wiki
Jump to: navigation, search
(OK)
m
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{|width=100%
+
<includeonly><table><!--
|rowspan=2 width=120 valign=top align=center|[[{{{icon}}}|60px|link=]]
+
--><tr><td rowspan="2" width="50" valign="top" align="left">[[{{{icon|File:NOTE-Info.svg}}}|40px|link=]]</td><td>'''{{{title|NOTE}}}'''</td></tr><!--
|<big>{{{title}}}</big>
+
--><tr><td valign=top>{{{1}}}</td></tr><!--
|-
+
--></table></includeonly><!--  
|valign=top|{{{text}}}
 
|}</includeonly><!--  
 
  
  
Line 11: Line 9:
 
{{Template
 
{{Template
 
|description=
 
|description=
This is the base template for all safety notes.  
+
When used directly, this template produces an information note.
It is not meant to be used directly.
+
 
Instead please use one of the templates in the [[:Category:Template:Note]].
+
To produce specialized safety notes, this can be used as base template. Therefore the icon and the title have to be specified.  
 +
 
 +
{{Note|The [[:Category:Template:Notes]] gives an overview of all note templates.}}
  
 
|template=
 
|template=
 
<nowiki>
 
<nowiki>
{{Note
+
{{Note|text
 
|icon=
 
|icon=
 
|title=
 
|title=
|text=
 
 
}}
 
}}
 
</nowiki>
 
</nowiki>
  
 
|parameters=
 
|parameters=
;icon
 
: Icon in the File: namespace.
 
;title
 
: The bold title over the note.
 
 
;text
 
;text
 
: The actual note text.
 
: The actual note text.
 +
;icon (optional)
 +
: Icon in the File: namespace. If not set, [[:File:NOTE-Info.svg]] is used.
 +
;title (optional)
 +
: The bold title over the note. If not set, '''NOTE''' is used.
  
 
|examples=
 
|examples=
In this way this template should be used in all specialized sub-templates:
+
For simple usage:
 +
;Input
 +
<pre>{{Note|watch your head!}}</pre>
 +
;Output
 +
{{Note|watch your head!}}
 +
 
 +
 
 +
In specialized sub-templates the following syntax should be used:
 
<pre>
 
<pre>
{{Note
+
{{Note|{{{1}}}
|icon=File:Note-Danger.svg
+
|icon=File:DANGER-Electricity.svg
|title=Danger
+
|title=DANGER
|text={{{1}}}
 
 
}}
 
}}
 
</pre>
 
</pre>
 +
 
}}
 
}}
  
[[Category:Template:Note]]
+
[[Category:Template:Notes]]
 
</noinclude>
 
</noinclude>

Latest revision as of 12:11, 15 December 2010

When used directly, this template produces an information note.

To produce specialized safety notes, this can be used as base template. Therefore the icon and the title have to be specified.

NOTE-Info.svgNOTE
The Category:Template:Notes gives an overview of all note templates.

Template

{{Note|text
|icon=
|title=
}}

Parameters

text
The actual note text.
icon (optional)
Icon in the File: namespace. If not set, File:NOTE-Info.svg is used.
title (optional)
The bold title over the note. If not set, NOTE is used.

Examples

For simple usage:

Input
{{Note|watch your head!}}
Output
NOTE-Info.svgNOTE
watch your head!


In specialized sub-templates the following syntax should be used:

{{Note|{{{1}}}
|icon=File:DANGER-Electricity.svg
|title=DANGER
}}

For more examples refer to pages, which use this template: What links here.

Help:Templates describes general usage of templates, including treatment of special characters.