Template:Notice: Difference between revisions

From Inkipedia, the Splatoon wiki
m (Preventing an apostrophe from appearing when a header is not specified)
(making into module invocation)
Tag: Replaced
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{| align="center" cellpadding="1px" style="border: 3px solid {{{border|rgb({{Sitecolor|Generic}})}}}; width:{{{width|60%}}}; {{roundy}}"
<includeonly>{{#invoke:Notice|main}}</includeonly><noinclude>
|style="padding:0px 0px 0px 5px; width:{{#if: {{{file|}}} | {{{filesize|60px}}} | 0%; display:none}};"|{{#if: {{{file|}}} | [[File:{{{file|}}}|{{{filesize|60px}}}|link=]]}}
Template invocation of [[Module:Notice]].
|style="padding:8px 8px 0px 8px;"|<span style="font-size: 12pt; font-weight: bold;">{{{header|}}}</span><br>
<span style="font-size: 10pt;">{{{content|}}}</span>
|}<noinclude>


== Usage ==
{{:Module:Notice/doc}}
'''Syntax''': <code><nowiki>{{notice|border=|width=|file=|filesize=|header=|content=}}</nowiki></code>
 
'''Example''': <code><nowiki>{{notice|file=Example.jpg|filesize=60px|header=Under Construction|content=This article is under construction.}}</nowiki></code>
 
Use this template to create other [[:Category:Notice Templates|Notice Templates]].
 
'''width''' is an optional parameter that defines the width of the notice box. Defaults to 60%.
 
[[Category:Notice Templates]]
</noinclude>
</noinclude>

Latest revision as of 00:16, 13 September 2023

Template invocation of Module:Notice.

Usage

Use this template to create other Notice Templates.

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

color Named, optional The color preset for the border. Defined options are green, blue, teal, orange, yellow, red, maroon, pink, and gray. However, if a color is a known CSS color, it can be used. 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.
width Named, optional The width attribute of the notice, e.g. 30%. Defaults to unwritten (inherit).

Examples

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

Example.jpg
Under Construction
This article is under construction.

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

Example.jpg
Notice with header text only.

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

Example.jpg
Small notice without a header.

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

Example.jpg
Green notice

{{notice|file=Example.jpg|header=Blue notice with custom width|width=30%|color=blue}}

Example.jpg
Blue notice with custom width

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

Example.jpg
Teal notice

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

Example.jpg
Orange notice

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

Example.jpg
Yellow notice

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

Example.jpg
Red notice

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

Example.jpg
Maroon notice

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

Example.jpg
Pink notice

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

Example.jpg
Gray notice

{{notice|file=Example.jpg|header=Custom color notice|color=slateblue|text-align=center}}

Example.jpg
Custom color notice