Template:Page notice: Difference between revisions
-u ndefined- (talk | contribs) m (Remove superfluous <div> elements meant to adjust spacing. Title is now optional) |
-u ndefined- (talk | contribs) m (Use class attribute and move style to MediaWiki:Common.css. Insert more clarification) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div><table style=" | <includeonly><div><table class="notice" style="border-color: {{{background|#808080}}}; {{#if: {{{foreground|}}} | background: {{{foreground|}}}; }}{{{style|}}}"> | ||
<tr> | <tr> | ||
<td style="vertical-align: middle"> | <td style="vertical-align: middle"> | ||
{{#if: {{{title|}}} | | {{#if: {{{title|}}} | | ||
<div style="font-size: 150%; {{{titlestyle|}}}">'''{{{title}}}'''</div> | <div style="font-size: 150%; {{{titlestyle|}}}; margin-bottom: 0.2em">'''{{{title}}}'''</div> | ||
}}<div style="{{{descriptionstyle|}}}"> {{{description}}} </div> | }}<div style="{{{descriptionstyle|}}}"> {{{description}}} </div> | ||
</td> | </td> | ||
{{#if: {{{image|}}} | | {{#if: {{{image|}}} | | ||
<td style=" | <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''': Valid CSS color within the notice. | |||
* '''background''': Valid CSS color for the border of the notice. | |||
* '''titlestyle''': Specific CSS styles for the title. | |||
* '''imagestyle''': Specific CSS styles for the image box. | |||
* '''descriptionstyle''': Specific CSS styles for the description box. | |||
[[Category:Notice templates| ]] | |||
[[Category:Templates| ]] | |||
</noinclude> | </noinclude> |
Latest revision as of 16:55, 1 August 2025
This is a generic template for page notices and warnings.
Example
{{Page notice |title=This is an example title. |description=This is an example description. |image=[[File:Odd_Bot.png|64px]] }}
yields:
This is an example title. This is an example description.
|
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: Valid CSS color within the notice.
- background: Valid CSS color for the border of the notice.
- titlestyle: Specific CSS styles for the title.
- imagestyle: Specific CSS styles for the image box.
- descriptionstyle: Specific CSS styles for the description box.