Module:Notice/doc: Difference between revisions

Gorasuhl (talk | contribs)
replaced missing image of thor's head with beans wearing a sombrero
Gorasuhl (talk | contribs)
added support for background-color
Line 2: Line 2:
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|align=|text-align=|width=|file=|filesize=|header=|content=}}</nowiki></code>
'''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 8:
| 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 23: Line 27:
| style="vertical-align:top" |<code>header</code>
| style="vertical-align:top" |<code>header</code>
| style="vertical-align:top" |Named, optional
| style="vertical-align:top" |Named, optional
| colspan="4" |The header text. e.g. <code>Notice</code>. Defaults to nothing shown.
| 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" |<code>content</code>
Line 38: Line 42:
{{notice|file=Beans.png|header=Under Construction|content=This article is under construction.}}
{{notice|file=Beans.png|header=Under Construction|content=This article is under construction.}}


<code><nowiki>{{notice|file=Beans.png|header=Notice with header text only.}}</nowiki></code>
<code><nowiki>{{notice|file=Beans.png|header=notice with header text only.}}</nowiki></code>
{{notice|file=Beans.png|header=Notice with header text only.}}
{{notice|file=Beans.png|header=notice with header text only.}}


<code><nowiki>{{notice|file=Beans.png|content=Small notice without a header.}}</nowiki></code>
<code><nowiki>{{notice|file=Beans.png|content=Small notice without a header.}}</nowiki></code>
Line 46: Line 50:
<code><nowiki>{{notice|file=Beans.png|header=Green notice|color=green}}</nowiki></code>
<code><nowiki>{{notice|file=Beans.png|header=Green notice|color=green}}</nowiki></code>
{{notice|file=Beans.png|header=Green notice|color=green}}
{{notice|file=Beans.png|header=Green notice|color=green}}
<code><nowiki>{{notice|file=Beans.png|header=Green notice with green background|color=green|colorBack=green}}</nowiki></code>
{{notice|file=Beans.png|header=Green notice|color=green|colorBack=green}}


<code><nowiki>{{notice|file=Beans.png|header=Blue notice with custom width|width=30%|color=blue}}</nowiki></code>
<code><nowiki>{{notice|file=Beans.png|header=Blue notice with custom width|width=30%|color=blue}}</nowiki></code>
Line 74: Line 81:
{{notice|file=Beans.png|header=Custom color notice|color=slateblue|text-align=center}}
{{notice|file=Beans.png|header=Custom color notice|color=slateblue|text-align=center}}


[[Category:Notice templates]]
[[Category:notice templates]]