Template:Admon/note/doc: Difference between revisions

Updated and corrected the documentation text.
No edit summary
(Updated and corrected the documentation text.)
Line 2: Line 2:
__NOTOC__
__NOTOC__
==Usage==
==Usage==
{{tl|Admon/note}} creates an information box with a custom text denoting that something is to be considered as a note/commentary text. The box will show at the position on the page where you put the template.
{{tl|Admon/note}} creates an information box with a custom text denoting that something is to be considered as a notation text. The box will show at the position on the page where you put the template, and stretch horizontally to fill the width of the available space and vertically depending on how many rows of text are needed.


To use the template, type <code><nowiki>{{Admon/note|text}}</nowiki></code>.
To use the template, type <code><nowiki>{{Admon/note|header|message body}}</nowiki></code>.


==Parameters==
==Parameters==
There is only one parameter, the custom text.
There are two unnamed parameters for the header and the message body, respectively (below called <code>1</code> and <code>2</code>). The text inside the box can be formatted using wiki-code.


===Custom text===
===Header===
The text inside the box can be formatted using wiki-code.
'''<code>1</code>''': Custom text


;Header
The first parameter is the header, and is automatically formatted as '''bold text'''. Thus, any text you enclose in three apostrophes (for bold text) in this field will be inverted (i.e. show as plain text). If you don't want to use a header, skip the header parameter by entering two pipes before the body text, leaving the header parameter empty, like so: <code><nowiki>{{Admon/note||message body}}</nowiki></code>.
The first line of the box's textual part functions as the header, and is automatically formatted as '''bold text'''. Any text wiki-formatted to show in bold will be inverted (i.e. show as plain text). If you don't want to use a header, start the custom text part with an empty line.


;Body text
'''Usage:'''
The lines beneath the first line are not pre-formatted.
* <code><nowiki>{{Admon/note|'''header'''|message body}}</nowiki></code>


==Examples==
===Body text===
===Only header===
'''<code>2</code>''': Custom text
The string


<nowiki>{{Admon/note|The first line is automatically formatted as bold text.}}</nowiki>
The second parameter is the message's body text, and is not pre-formatted. If you don't want to use any body text, you can skip the second parameter altogether, and only enter the header parameter, like so: <code><nowiki>{{Admon/note|header}}</nowiki></code>.


will show as
'''Usage:'''
* <code><nowiki>{{Admon/note|header|'''message body'''}}</nowiki></code>


{{Admon/note|The first line is automatically formatted as bold text.}}
==Examples==
 
{| class="wikitable"
===No header===
|-
The string
! Example case !! What you write !! What you see
 
|-
<nowiki>{{Admon/note|
| Only header || <code><nowiki>{{Admon/note|The first parameter is automatically formatted as bold text.}}</nowiki></code> || {{Admon/note|The first parameter is automatically formatted as bold text.}}
This is shown as plain text.}}</nowiki>
|-
 
| Only body text || <code><nowiki>{{Admon/note||This is shown as plain text.}}</nowiki></code> || {{Admon/note||This is shown as plain text.}}
will show as
|-
 
| Header and body text || <code><nowiki>{{Admon/note|This is the header|This is the body text.}}</nowiki></code> || {{Admon/note|This is the header|This is the body text.}}
{{Admon/note|
|-
This is shown as plain text.}}
| Wiki-coding || <pre><nowiki>{{Admon/
 
note|Wiki-formatting for '''bold text''' is inverted in the header
===Text with header===
|The ''other rows'' '''behave as''' '''''normal'''''. <br />
The string
 
<nowiki>{{Admon/note|This is the header
 
 
This is the body text.}}</nowiki>
 
will show as
 
{{Admon/note|This is the header
 
 
This is the body text.}}
 
===Wiki-coding===
The string
 
<nowiki>{{Admon/note|''Wiki-formatting'' for '''bold text''' is inverted in the '''''header'''''
The ''other rows'', however, '''behave as''' you are '''''used to'''''. <br />
You can use wiki-code to, e.g.
You can use wiki-code to, e.g.
[[link to stuff]],
[[link to stuff]],
Line 64: Line 44:
make text <small>small</small> or <big>big</big>,
make text <small>small</small> or <big>big</big>,
  and include pre-format boxes.
  and include pre-format boxes.
You can also
You can even
 


insert empty rows.}}</nowiki>


will show as


{{Admon/note|''Wiki-formatting'' for '''bold text''' is inverted in the '''''header'''''
insert empty rows.}}</nowiki></pre> || {{Admon/
The ''other rows'', however, '''behave as''' you are '''''used to'''''. <br />
note|Wiki-formatting for '''bold text''' is inverted in the header|The ''other rows'' '''behave as''' '''''normal'''''. <br />
You can use wiki-code to, e.g.
You can use wiki-code to, e.g.
[[link to stuff]],
[[link to stuff]],
Line 78: Line 55:
make text <small>small</small> or <big>big</big>,
make text <small>small</small> or <big>big</big>,
  and include pre-format boxes.
  and include pre-format boxes.
You can also
You can  
even
 




insert empty rows.}}
insert empty rows.}}
|}


==See also==
==See also==
3,860

edits