Template:Message Box: Difference between revisions
(added revert-layer defaults to border colors) |
(add documentation and slight cleanup) |
||
Line 1: | Line 1: | ||
<div {{#if:{{{class}}}|class="{{{class|messagebox}}}"}} style="width: {{#if:{{{width|}}}|{{{width}}}|80%}}; {{#if:{{{Background color|}}}|background-color: {{{Background color}}};}} | <includeonly><div {{#if:{{{class}}}|class="{{{class|messagebox}}}"}} style="width: {{#if:{{{width|}}}|{{{width}}}|80%}}; {{#if:{{{Background color|}}}|background-color: {{{Background color}}};}} | ||
border-top: 1px solid; border-top-color: {{#if:{{{Border color|}}}|{{{Border color}}}|revert-layer}}; | border-top: 1px solid; border-top-color: {{#if:{{{Border color|}}}|{{{Border color}}}|revert-layer}}; | ||
border-bottom: 1px solid; border-bottom-color: {{#if:{{{Border color|}}}|{{{Border color}}}|revert-layer}}; | border-bottom: 1px solid; border-bottom-color: {{#if:{{{Border color|}}}|{{{Border color}}}|revert-layer}}; | ||
Line 5: | Line 5: | ||
border-left: 12px solid {{#if:{{{Flag color|}}}|{{{Flag color}}}|#aaaaaa}}; margin: 0.5em auto 0.5em;"> | border-left: 12px solid {{#if:{{{Flag color|}}}|{{{Flag color}}}|#aaaaaa}}; margin: 0.5em auto 0.5em;"> | ||
{| | {| | ||
{{#if:{{{ | {{#if:{{{image|}}}|{{!}}style="width:93px; text-align:center; vertical-align:middle; padding-top:1px;padding-bottom:7px" {{!}} {{{image}}} }} | ||
|style="vertical-align:middle;padding-left:3px;padding-top:10px;padding-bottom:10px;padding-right:10px; background-color: {{#if:{{{Background color}}}{{!}}{{{Background color}}}{{!}}#f5f5f5}};" | {{{Message text|}}} | |style="vertical-align:middle;padding-left:3px;padding-top:10px;padding-bottom:10px;padding-right:10px; background-color: {{#if:{{{Background color}}}{{!}}{{{Background color}}}{{!}}#f5f5f5}};" | {{{Message text|}}} | ||
|} | |} | ||
</div><noinclude>[[Category:Notice templates]]</noinclude> | </div></includeonly><noinclude> | ||
==Purpose== | |||
Standarization template for all article notices. Ripped from Miraheze and will be repara'd come Lua support on MW upgrade. | |||
==Parameter List== | |||
<pre> | |||
{{Message Box | |||
|Message text <!-- The desired text on the message box. --> | |||
|class <!-- A desired CSS class. --> | |||
|image <!-- A desired image/text string to be displayed on the left side of the banner. Untested. --> | |||
|width <!-- The desired width. --> | |||
|Background color <!-- The desired CSS background-color. --> | |||
|Border color <!-- The desired CSS border color. --> | |||
|Flag color <!-- The desired CSS left-border color. --> | |||
}} | |||
</pre> | |||
==Examples== | |||
===Simple Message Box=== | |||
<pre>{{Message Box|Message text=<b>This page is for the Ultimate version of this mission.</b><div>The page for the C to S4 difficulties can be found [[Protectors η|here]].</div>}}</pre> | |||
{{Message Box|Message text=<b>This page is for the Ultimate version of this mission.</b><div>The page for the C to S4 difficulties can be found [[Protectors η|here]].</div>}} | |||
===Simple Warning Box=== | |||
<pre>{{Message Box|class=warningbox|Message text=<b>This section requires manual verification.</b><div>If any errors are found, please post them in the #wiki-channel channel in the Clementine Discord.</div>}}</pre> | |||
{{Message Box|class=warningbox|Message text=<b>This section requires manual verification.</b><div>If any errors are found, please post them in the #wiki-channel channel in the Clementine Discord.</div>}} | |||
[[Category:Notice templates]]</noinclude> |
Latest revision as of 15:50, 29 December 2023
Purpose
Standarization template for all article notices. Ripped from Miraheze and will be repara'd come Lua support on MW upgrade.
Parameter List
{{Message Box |Message text <!-- The desired text on the message box. --> |class <!-- A desired CSS class. --> |image <!-- A desired image/text string to be displayed on the left side of the banner. Untested. --> |width <!-- The desired width. --> |Background color <!-- The desired CSS background-color. --> |Border color <!-- The desired CSS border color. --> |Flag color <!-- The desired CSS left-border color. --> }}
Examples
Simple Message Box
{{Message Box|Message text=<b>This page is for the Ultimate version of this mission.</b><div>The page for the C to S4 difficulties can be found [[Protectors η|here]].</div>}}
Simple Warning Box
{{Message Box|class=warningbox|Message text=<b>This section requires manual verification.</b><div>If any errors are found, please post them in the #wiki-channel channel in the Clementine Discord.</div>}}
This section requires manual verification. If any errors are found, please post them in the #wiki-channel channel in the Clementine Discord.
|