Jump to content

Template:Page notice: Difference between revisions

Document template
m (Remove superfluous <div> elements meant to adjust spacing. Title is now optional)
(Document template)
Line 1: Line 1:
<includeonly><div><table style="width: 80%; margin: auto; border-radius: 10px; box-shadow: 0px -6px #0004 inset; padding: 0.4em 0.4em 1em; border: 2px solid {{{background|#808080}}}; {{#if: {{{foreground|}}} | background: {{{foreground|}}}; }}{{{style|}}}">
<includeonly><div><table style="width: 80%; margin: auto; border-radius: 10px; box-shadow: 0px -6px #0004 inset; padding: 0.4em 0.4em 0.6em; border: 2px solid {{{background|#808080}}}; {{#if: {{{foreground|}}} | background: {{{foreground|}}}; }}{{{style|}}}">
<tr>
<tr>
<td style="vertical-align: middle">
<td style="vertical-align: middle">
Line 7: Line 7:
</td>
</td>
{{#if: {{{image|}}} |
{{#if: {{{image|}}} |
<td style="width: 64px; height: 64px; overflow: hidden {{{imagestyle|}}}">
<td align="right">
<div style="overflow: hidden; max-width: 128px; {{{imagestyle|}}}">
{{{image|}}}
{{{image|}}}
</div>
</td>
</td>
}}
}}
</tr>
</tr>
</table></div></includeonly><noinclude>
</table></div></includeonly><noinclude>
This is a generic template for page notices and warnings.
== Example ==
<pre>
{{Page notice
|title=This is an example title.
|description=This is an example description.
|image=[[File:Odd_Bot.png|64px]]
}}
</pre>
yields:
{{Page notice
|title=This is an example title.
|description=This is an example description.
|image=[[File:Odd_Bot.png|64px]]
}}
== Parameters ==
* '''title''': Title for the notice. Optional.
* '''description''': Notice contents.
* '''image''': Image that supplements the notice. The image should be a size less than 128px. Optional.
* '''foreground''': Color within the notice.
* '''background''': Color for the border of the notice.
* '''titlestyle''': Specific styles for the title.
* '''imagestyle''': Specific styles for the image box.
* '''descriptionstyle''': Specific styles for the description box.
[[Template:Notice templates| ]]
</noinclude>
</noinclude>