Difference between revisions of "Template:Note/doc"
EricThrift (talk | contribs) (Copied from https://wiki.mozilla.org/index.php?title=Template:Message/doc) |
EricThrift (talk | contribs) m (EricThrift moved page Template:Message/doc to Template:Note/doc) |
(No difference)
|
Latest revision as of 12:00, 25 January 2021
Usage
This template displays a custom made note box.
Parameters
Parameter | Description |
---|---|
class |
Custom CSS class amendment |
bgcolor |
Background colour |
bdcolor |
Border colour |
fgcolor |
Foreground (text) colour |
image |
Image to be shown in the box |
imgwidth |
Image width (in pixels) |
style |
Custom CSS styling |
- Copy-paste templates
Size | Code |
---|---|
Basic | {{note|''text''}}
|
Common use | {{note|''text'' |bgcolor= |bdcolor= |image= }}
|
All parameters | {{note|''text'' |class= |bgcolor= |bdcolor= |fgcolor= |image= |imgwidth= |style= }}
|
Mandatory parameter
Text
- 1
Custom text string, wiki-formatting can be used. The parameter is unnamed, so no parameter name needs to be entered.
Note:
- If this parameter is left out, its name in the template code, "
{{{1}}}
", will be displayed.
- Usage
{{note|''text''}}
Optional parameters
Class
- class
A custom CSS class to append to the box's default class notebox
, e.g. notebox small
.
- Usage
{{note|1|class=class name}}
Colours
- bgcolor
The background colour of the box, defined as a CSS colour name (e.g. white
) or a hexadecimal colour code, e.g. #ffffff
for white. The default colour is #f9f6b7
.
- Usage
{{note|1|bgcolor=CSS/hex colour}}
- bdcolor
The border colour of the box, defined as a CSS colour name (e.g. black
) or a hexadecimal colour code, e.g. #000000
for black. The default colour is #c4c295
.
- Usage
{{note|1|bdcolor=CSS/hex colour}}
- fgcolor
The foreground colour of the box (i.e. text colour), defined as a CSS colour name (e.g. black
) or a hexadecimal colour code (e.g. #000000
for black). The default colour is black
.
- Usage
{{note|1|fgcolor=CSS/hex colour}}
Image
- image
You can choose a specific image to use for the template by using the image parameter. The image is displayed on the left side in the box, to the left of the text. The default image is Idea.png
(File:Idea.png).
Notes:
- When defining an image, don't include the namespace (
File:
orImage:
). That is inserted automatically.
- Usage
{{note|1|image=name.ext}}
- imgwidth
The width of the used image (in pixels). The default value is 35
.
Note:
- When defining the image width, don't include the unit (
px
orpixels
). That is inserted automatically.
- Usage
{{note|1|imgwidth=number value}}
CSS styling
- style
Optional CSS properties with corresponding values may be defined, without quotation marks " "
but with the ending semicolons ;
. The parameter specifies the style used by the entire note box.
- Usage
{{note|1|style=prop1:value1; prop2:value2;}}
Examples
Correct use
Parameter | What you write | What you see |
---|---|---|
1 |
{{note|You ''can'' '''use''' <sup>wiki</sup> <big>markup</big>}} |
|
class |
{{note|Custom text|class=text}} |
|
bgcolor |
{{note|Custom text|bgcolor=white}} |
|
{{note|Custom text|bgcolor=#ffffff}} |
||
bdcolor |
{{note|Custom text|bdcolor=black}} |
|
{{note|Custom text|bdcolor=#000000}} |
||
fgcolor |
{{note|Custom text|fgcolor=green}} |
|
{{note|Custom text|fgcolor=#008000}} |
||
image |
{{note|Custom text|image=Green check.png}} |
|
imgwidth |
{{note|Custom text|image=Green check.png|imgwidth=75}} |
|
style |
{{note|Custom text|style=text-align:right;}} |
Incorrect use
Example case | What you write | What you see (error) |
---|---|---|
No parameter | {{note}} |