Template:SiteNotice

Revision as of 17:20, 16 July 2023 by ink>Heddy (Added explanation of how this template is technically different from Template:Notice.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Use this template to create notices on MediaWiki:Sitenotice. For non-sitenotice usage, please use Template:Notice or other notice templates instead.

This template is intended to be almost identical to Template:Notice, with the exception that this template uses in-line CSS instead of a TemplateStyles CSS stylesheet. In-line CSS is necessary because TemplateStyles CSS only works within .mw-parser-output, and the sitenotice is outside of .mw-parser-output.

Usage

Syntax: {{SiteNotice|text-align=|border=|width=|file=|filesize=|header=|content=}}

color Named, optional The color preset for the border. Options are green, blue, teal, orange, yellow, red, maroon, pink, and gray. Defaults to green.
text-align Named, optional The text-align attribute of the header and content text, e.g. center. Defaults to left.
file Named, optional The file to show on the left-hand section as a filename. e.g. Example.jpg. Defaults to nothing shown.
filesize Named, optional The file's size on the left-hand section. e.g. 30px. Defaults to 48px if a file was specified, otherwise none.
header Named, optional The header text. e.g. Notice. Defaults to nothing shown.
content Named, optional The content text. e.g. Test message. Defaults to nothing shown.

Examples

{{SiteNotice|file=Example.jpg|header=Under Construction|content=This article is under construction.}}

Example.jpg
Under Construction
This article is under construction.

{{SiteNotice|file=Example.jpg|header=Notice with header text only.}}

Example.jpg
Notice with header text only.

{{SiteNotice|file=Example.jpg|content=Small notice without a header.}}

Example.jpg
Small notice without a header.

{{SiteNotice|file=Example.jpg|header=Green notice|color=green}}

Example.jpg
Green notice

{{SiteNotice|file=Example.jpg|header=Blue notice|color=blue}}

Example.jpg
Blue notice

{{SiteNotice|file=Example.jpg|header=Teal notice|color=teal}}

Example.jpg
Teal notice

{{SiteNotice|file=Example.jpg|header=Orange notice|color=orange}}

Example.jpg
Orange notice

{{SiteNotice|file=Example.jpg|header=Yellow notice|color=yellow}}

Example.jpg
Yellow notice

{{SiteNotice|file=Example.jpg|header=Red notice|color=red}}

Example.jpg
Red notice

{{SiteNotice|file=Example.jpg|header=Maroon notice|color=maroon}}

Example.jpg
Maroon notice

{{SiteNotice|file=Example.jpg|header=Pink notice|color=pink}}

Example.jpg
Pink notice

{{SiteNotice|file=Example.jpg|header=Gray notice|color=gray}}

Example.jpg
Gray notice