Actions

Template

Notice/doc: Difference between revisions

From Anthrodia Atlas

k6ka>K6ka
 
m 4 revisions imported
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
{{dependencies|Template:!-}}
== Usage ==


==Description==
This is the {{tl|notice}} message box.
This template is used to create notice boxes located atop pages or sections denoting important information. It uses {{tl|Metabox}} as a base.


This is how this box looks.


==Parameters==
<pre>
The template accepts many of the same parameters as {{tl|Metabox}}. It sets some of its own custom parameters that override the default Metabox settings, and will be shown if the parameter is left blank. You can override this template's default values by specifying something in the parameter field.
{{notice|Include text here.}}
</pre>


<code>1</code> - This is the main text inside of the template. It is a ''mandatory'' parameter.
Which renders like this:


<code>text-color</code> - This is for the color of the text inside the template. If it is left empty, the text will default to white text. You can either type in an [https://web.archive.org/web/20160101113750/https://www.w3schools.com/html/html_colornames.asp HTML color name], or type in an HTML color code (without the #)
{{notice|Include text here.}}


<code>title</code> - This parameter adds a line of bolded text at the top of the template.
The '''header''' parameter works on talk pages too. But there is one parameter that only works on talk pages, the '''small''' parameter. Like this:


<code>title-color</code> - This changes the color of the title. The parameter <code>title</code> must be defined for this parameter to do anything. If it is left empty, the title will default to white text. You can either type in an [https://web.archive.org/web/20160101113750/https://www.w3schools.com/html/html_colornames.asp HTML color name], or type in an HTML color code (without the #)
<pre>
{{notice|small=yes|header=Header text|Include text here.}}
</pre>


<code>bordercolor</code> - The color of the border surrounding the template. If it is left empty, the border will default to a gray colour. You can either type in an [https://web.archive.org/web/20160101113750/https://www.w3schools.com/html/html_colornames.asp HTML color name], or type in an HTML color code (without the #)
{{notice|small=yes|header=Header text|Include text here.}}


<code>backgroundcolor</code> - The color of the background of the template. If left empty, it will default to a transparent background (usually matches the wiki background color). You can either type in an [https://web.archive.org/web/20160101113750/https://www.w3schools.com/html/html_colornames.asp HTML color name], or type in an HTML color code (without the #)
As you can see, "small=yes" causes a smaller right floating box with a smaller image and smaller text size.
<br clear=all>
Let's try the '''image''' parameter too. Like this:


<code>width</code> - The width of the entire template, measured in percentage. Type in a number (without the % sign). If left blank, it will default to 65%.
<pre>
{{notice|demospace=talk|small=yes|image=Stop hand nuvola.svg
  |header=Header text|Include text here.}}
</pre>


<code>size</code> - Only one recognized argument - "small". If defined, the template will display as a smaller, left-aligned box instead of the default center-aligned position.
{{notice|demospace=talk|small=yes|image=Stop hand nuvola.svg|header=Header text|Include text here.}}
<br clear=all>


<code>image</code> - Add the image name into this parameter to display the image. For example, <code>Example.jpg</code>. Do not include the <code><nowiki>[[File:</nowiki></code> and <code><nowiki>]]</nowiki></code> (the "File:" prefix and the square brackets); otherwise you will break the image. If left empty, it will display [[:File:Information.svg]].
<includeonly>
 
<!-- Categories below this line -->
<code>imagewidth</code> - Changes the width of the column where the image resides in. Leave blank for the default value. The parameter <code>image</code> must be defined in order for this parameter to work.
[[Category:Notice templates‎]]
 
</includeonly>
<code>imagesize</code> - Changes the size of the image in the template, measured in pixels. The parameter <code>image</code> must be defined in order for this parameter to work.
 
<code>imagelink</code> - If defined, the image will link to the name of the page you put into this parameter (e.g. adding <code>Foo</code> to this parameter will create a link to [[Foo]]). The parameter <code>image</code> must be defined in order for this parameter to work.
 
[[Category:Template documentation|{{PAGENAME}}]]

Latest revision as of 04:09, 27 May 2026

Dependencies:

Usage

This is the {{notice}} message box.

This is how this box looks.

{{notice|Include text here.}}

Which renders like this:

Notice Include text here.

The header parameter works on talk pages too. But there is one parameter that only works on talk pages, the small parameter. Like this:

{{notice|small=yes|header=Header text|Include text here.}}
Notice Notice: Header text
Include text here.

As you can see, "small=yes" causes a smaller right floating box with a smaller image and smaller text size.
Let's try the image parameter too. Like this:

{{notice|demospace=talk|small=yes|image=Stop hand nuvola.svg
  |header=Header text|Include text here.}}
Notice Notice: Header text
Include text here.