Template:Note/doc

From DFM Wiki

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: or Image:). 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 or pixels). 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>}}
Information icon.svg
Note
Note
class {{note|Custom text|class=text}}
Information icon.svg
Note
Note
bgcolor {{note|Custom text|bgcolor=white}}
Information icon.svg
Note
Note
{{note|Custom text|bgcolor=#ffffff}}
Information icon.svg
Note
Note
bdcolor {{note|Custom text|bdcolor=black}}
Information icon.svg
Note
Note
{{note|Custom text|bdcolor=#000000}}
Information icon.svg
Note
Note
fgcolor {{note|Custom text|fgcolor=green}}
Information icon.svg
Note
Note
{{note|Custom text|fgcolor=#008000}}
Information icon.svg
Note
Note
image {{note|Custom text|image=Green check.png}}
Green check.png
Note
Note
imgwidth {{note|Custom text|image=Green check.png|imgwidth=75}}
Green check.png
Note
Note
style {{note|Custom text|style=text-align:right;}}
Information icon.svg
Note
Note

Incorrect use

Example case What you write What you see (error)
No parameter {{note}}
Information icon.svg
Note
Note