|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
| <templatestyles src="Notice/styles.css" /><div class="notice notice-{{{color|green}}}" align="{{{align|}}}" style="text-align: {{{text-align|left}}}; width:{{{width|98%}}}"> | | <includeonly>{{#invoke:Notice|main}}</includeonly><noinclude> |
| {{#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>
| | Template invocation of [[Module:Notice]]. |
|
| |
|
| == Usage ==
| | {{:Module:Notice/doc}} |
| Use this template to create other [[:Category:Notice templates|Notice Templates]].
| |
| | |
| '''Syntax''': <code><nowiki>{{notice|align=|text-align=|width=|file=|filesize=|header=|content=}}</nowiki></code>
| |
| | |
| {| class="wikitable sitecolor-generic"
| |
| | style="vertical-align:top" |<code>color</code>
| |
| | style="vertical-align:top" |Named, optional
| |
| | colspan="4" |The color preset for the border. Options are <code>green</code>, <code>blue</code>, <code>teal</code>, <code>orange</code>, <code>yellow</code>, <code>red</code>, <code>maroon</code>, <code>pink</code>, and <code>gray</code>. Defaults to <code>green</code>.
| |
| |-
| |
| | style="vertical-align:top" |<code>text-align</code>
| |
| | 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 <code>left</code>.
| |
| |-
| |
| | style="vertical-align:top" |<code>file</code>
| |
| | style="vertical-align:top" |Named, optional
| |
| | colspan="4" |The file to show on the left-hand section as a filename. e.g. <code>Example.jpg</code>. Defaults to nothing shown.
| |
| |-
| |
| | style="vertical-align:top" |<code>filesize</code>
| |
| | style="vertical-align:top" |Named, optional
| |
| | colspan="4" |The file's size on the left-hand section. e.g. <code>30px</code>. Defaults to 48px if a file was specified, otherwise none.
| |
| |-
| |
| | style="vertical-align:top" |<code>header</code>
| |
| | style="vertical-align:top" |Named, optional
| |
| | colspan="4" |The header text. e.g. <code>Notice</code>. Defaults to nothing shown.
| |
| |-
| |
| | style="vertical-align:top" |<code>content</code>
| |
| | style="vertical-align:top" |Named, optional
| |
| | colspan="4" |The content text. e.g. <code>Test message</code>. Defaults to nothing shown.
| |
| |-
| |
| | 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 98% (about the horizontal window minus some gutter).
| |
| |}
| |
| | |
| === Examples ===
| |
| <code><nowiki>{{notice|file=Example.jpg|header=Under Construction|content=This article is under construction.}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Under Construction|content=This article is under construction.}}
| |
| | |
| <code><nowiki>{{notice|file=Example.jpg|header=Notice with header text only.}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Notice with header text only.}}
| |
| | |
| <code><nowiki>{{notice|file=Example.jpg|content=Small notice without a header.}}</nowiki></code>
| |
| {{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 with custom width|width=30%|color=blue}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Blue notice with custom width|width=30%|color=blue}}
| |
| | |
| <code><nowiki>{{notice|file=Example.jpg|header=Teal notice|color=teal}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Teal notice|color=teal}}
| |
| | |
| <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=Yellow notice|color=yellow}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Yellow notice|color=yellow}}
| |
| | |
| <code><nowiki>{{notice|file=Example.jpg|header=Red notice|color=red}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Red notice|color=red}}
| |
| | |
| <code><nowiki>{{notice|file=Example.jpg|header=Maroon notice|color=maroon}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Maroon notice|color=maroon}}
| |
| | |
| <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=Gray notice|color=gray}}</nowiki></code>
| |
| {{notice|file=Example.jpg|header=Gray notice|color=gray}}
| |
| | |
| [[Category:Notice templates]]
| |
| </noinclude> | | </noinclude> |
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.}}
This article is under construction.
{{notice|file=Example.jpg|header=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}}
{{notice|file=Example.jpg|header=Blue notice with custom width|width=30%|color=blue}}
{{notice|file=Example.jpg|header=Teal notice|color=teal}}
{{notice|file=Example.jpg|header=Orange notice|color=orange}}
{{notice|file=Example.jpg|header=Yellow notice|color=yellow}}
{{notice|file=Example.jpg|header=Red notice|color=red}}
{{notice|file=Example.jpg|header=Maroon notice|color=maroon}}
{{notice|file=Example.jpg|header=Pink notice|color=pink}}
{{notice|file=Example.jpg|header=Gray notice|color=gray}}
{{notice|file=Example.jpg|header=Custom color notice|color=slateblue|text-align=center}}