Module:Notice/doc: Difference between revisions
m Fix the image examples |
removed notice box of the issue (issue is fixed) Tag: Manual revert |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Doc/start}} | |||
An Module to create a Notice box with image (optional). | |||
== Usage == | == Usage == | ||
Use this template to create other [[:Category:Notice templates|Notice Templates]]. | Use this template to create other [[:Category:Notice templates|Notice Templates]]. | ||
'''Syntax''': <code><nowiki>{{notice| | '''Syntax''': <code><nowiki>{{notice|color=|colorBack=|text-align=|width=|file=|filesize=|header=|content=}}</nowiki></code> | ||
{| class="wikitable sitecolor-generic" | {| class="wikitable sitecolor-generic" | ||
Line 8: | Line 11: | ||
| style="vertical-align:top" |Named, optional | | style="vertical-align:top" |Named, optional | ||
| colspan="4" |The color preset for the border. Defined 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>. However, if a color is a known CSS color, it can be used. Defaults to <code>green</code>. | | colspan="4" |The color preset for the border. Defined 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>. However, if a color is a known CSS color, it can be used. Defaults to <code>green</code>. | ||
|- | |||
| style="vertical-align:top" |<code>colorBack</code> | |||
| style="vertical-align:top" |Named, optional | |||
| colspan="4" |The color preset for the background color. Defined 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> with 0.2 for alpha channel. However, if a color is a known CSS color, it can be used. Defaults to <code>none</code>. | |||
|- | |- | ||
| style="vertical-align:top" |<code>text-align</code> | | style="vertical-align:top" |<code>text-align</code> | ||
Line 35: | Line 42: | ||
=== Examples === | === Examples === | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Under Construction|content=This article is under construction.}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Under Construction|content=This article is under construction.}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Notice with header text only.}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Notice with header text only.}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|content=Small notice without a header.}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|content=Small notice without a header.}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Green notice|color=green}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Green notice|color=green}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Green notice with green background|color=green|colorBack=green}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Green notice|color=green|colorBack=green}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Blue notice with custom width|width=30%|color=blue}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Blue notice with custom width|width=30%|color=blue}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Teal notice|color=teal}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Teal notice|color=teal}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Orange notice|color=orange}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Orange notice|color=orange}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Yellow notice|color=yellow}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Yellow notice|color=yellow}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Red notice|color=red}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Red notice|color=red}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Maroon notice|color=maroon}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Maroon notice|color=maroon}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Pink notice|color=pink}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Pink notice|color=pink}} | ||
<code><nowiki>{{notice|file= | <code><nowiki>{{notice|file=Beans.png|header=Gray notice|color=gray}}</nowiki></code> | ||
{{notice|file= | {{notice|file=Beans.png|header=Gray notice|color=gray}} | ||
<code><nowiki>{{notice|file=Beans.png|header=Custom color notice|color=slateblue|text-align=center}}</nowiki></code> | |||
{{notice|file=Beans.png|header=Custom color notice|color=slateblue|text-align=center}} | |||
[[Category:Notice templates]] | [[Category:Notice templates]] | ||
{{clear}} | |||
{{Doc/end}} |
Latest revision as of 23:05, 21 March 2025
An Module to create a Notice box with image (optional).
Usage
Use this template to create other Notice Templates.
Syntax: {{notice|color=|colorBack=|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 .
| |||
colorBack
|
Named, optional | The color preset for the background color. Defined options are green , blue , teal , orange , yellow , red , maroon , pink , and gray with 0.2 for alpha channel. However, if a color is a known CSS color, it can be used. Defaults to none .
| |||
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=Beans.png|header=Under Construction|content=This article is under construction.}}

{{notice|file=Beans.png|header=Notice with header text only.}}

{{notice|file=Beans.png|content=Small notice without a header.}}

{{notice|file=Beans.png|header=Green notice|color=green}}

{{notice|file=Beans.png|header=Green notice with green background|color=green|colorBack=green}}

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

{{notice|file=Beans.png|header=Teal notice|color=teal}}

{{notice|file=Beans.png|header=Orange notice|color=orange}}

{{notice|file=Beans.png|header=Yellow notice|color=yellow}}

{{notice|file=Beans.png|header=Red notice|color=red}}

{{notice|file=Beans.png|header=Maroon notice|color=maroon}}

{{notice|file=Beans.png|header=Pink notice|color=pink}}

{{notice|file=Beans.png|header=Gray notice|color=gray}}

{{notice|file=Beans.png|header=Custom color notice|color=slateblue|text-align=center}}
