Template:Notice: Difference between revisions

From Inkipedia, the Splatoon wiki
(Adding vertical margin to prevent successive notices from touching)
(Revamping to be pretty and match styling of our other templates)
Line 1: Line 1:
{| align="{{{align|}}}" cellpadding="1px" style="padding: .3em; margin: .3em 0; border: 3px solid {{{border|rgb({{SiteColor|Generic}})}}}; {{#if:{{{width|}}}|width:{{{width}}}|}}; {{roundy}}"
<templatestyles src="Notice/styles.css" /><div class="notice notice-{{{color|green}}}" align="{{{align|}}}" style="text-align: {{{text-align|left}}};{{#if:{{{background-color|}}}|background-color:{{{background-color|}}};|}}{{#if:{{{border-color|}}}|border-color:{{{border-color|}}};|}}">
|style="padding:0px 0px 0px 3px; width:{{#if: {{{file|}}} | {{{filesize|48px}}} | 0%; display:none}};"|{{#if: {{{file|}}} | [[File:{{{file|}}}|{{{filesize|48px}}}|link=]]}}
{{#if: {{{file|}}} | <div class="notice-image">[[File:{{{file}}}|{{{filesize|48px}}}|link=]]</div> | }}<div class="notice-content">{{#if: {{{header|}}}|<div class="notice-header">{{{header}}}</div> | }}<div class="notice-description">{{{content|}}}</div></div></div><noinclude>
|style="padding:6px 6px 0px 6px; text-align: {{{text-align|left}}};"| {{#if: {{{header|}}}|<span style="font-size: 11pt; font-weight: bold;">{{{header|}}}</span><br> |}}<span style="font-size: 9pt;">{{{content|}}}</span>
|}<noinclude>


== Usage ==
== Usage ==
Line 10: Line 8:


{| class="wikitable sitecolor-generic"
{| class="wikitable sitecolor-generic"
| style="vertical-align:top" |<code>align</code>
| style="vertical-align:top" |<code>color</code>
| style="vertical-align:top" |Named, optional
| style="vertical-align:top" |Named, optional
| colspan="4" |The align attribute of the notice, e.g. <code>center</code>. Defaults to "" (unset)
| colspan="4" |The color preset for the background and border. Options are <code>green</code>, <code>blue</code>, <code>orange</code>, <code>pink</code>, and <code>maroon</code>. Defaults to <code>green</code>.
|-
|-
| style="vertical-align:top" |<code>text-align</code>
| style="vertical-align:top" |<code>text-align</code>
| style="vertical-align:top" |Named, optional
| style="vertical-align:top" |Named, optional
| colspan="4" |The text-align attribute of the header and content text, e.g. <code>center</code>. Defaults to left.
| colspan="4" |The text-align attribute of the header and content text, e.g. <code>center</code>. Defaults to <code>left</code>.
|-
| style="vertical-align:top" |<code>border</code>
| style="vertical-align:top" |Named, optional
| colspan="4" |The border attribute of the notice, e.g. <code>border=rgb(<nowiki>{{SiteColor|Splatoon}}</nowiki>)</code>. Defaults to <code>rgb(<nowiki>{{SiteColor|Generic}}</nowiki>)</code>
|-
| style="vertical-align:top" |<code>width</code>
| style="vertical-align:top" |Named, optional
| colspan="4" |The width attribute of the notice, e.g. <code>30%</code>. Defaults to unset (fit to contents).
|-
|-
| style="vertical-align:top" |<code>file</code>
| style="vertical-align:top" |<code>file</code>
Line 53: Line 43:
<code><nowiki>{{notice|file=Example.jpg|content=Small notice without a header.}}</nowiki></code>
<code><nowiki>{{notice|file=Example.jpg|content=Small notice without a header.}}</nowiki></code>
{{notice|file=Example.jpg|content=Small notice without a header.}}
{{notice|file=Example.jpg|content=Small notice without a header.}}
<code><nowiki>{{notice|file=Example.jpg|header=Green notice|color=green}}</nowiki></code>
{{notice|file=Example.jpg|header=Green notice|color=green}}
<code><nowiki>{{notice|file=Example.jpg|header=Blue notice|color=blue}}</nowiki></code>
{{notice|file=Example.jpg|header=Blue notice|color=blue}}
<code><nowiki>{{notice|file=Example.jpg|header=Orange notice|color=orange}}</nowiki></code>
{{notice|file=Example.jpg|header=Orange notice|color=orange}}
<code><nowiki>{{notice|file=Example.jpg|header=Pink notice|color=pink}}</nowiki></code>
{{notice|file=Example.jpg|header=Pink notice|color=pink}}
<code><nowiki>{{notice|file=Example.jpg|header=Maroon notice|color=maroon}}</nowiki></code>
{{notice|file=Example.jpg|header=Maroon notice|color=maroon}}


[[Category:Notice templates]]
[[Category:Notice templates]]
</noinclude>
</noinclude>

Revision as of 21:40, 14 May 2023

Usage

Use this template to create other Notice Templates.

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

color Named, optional The color preset for the background and border. Options are green, blue, orange, pink, and maroon. 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

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

Under Construction
This article is under construction.

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

Notice with header text only.

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

Small notice without a header.

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

Green notice

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

Blue notice

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

Orange notice

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

Pink notice

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

Maroon notice