Template:Notice: Difference between revisions

From MiiWiki
Jump to navigationJump to search
(Created page with "{| class="{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}|{{#ifeq:{{{small|}}}|yes|small|standard}}-talk}} messagebox" style="text-align:justify; margin: .5em 2%; padding: 0 1em; border:...")
 
m (evidently there's some sort of whitespace trimming in the parser here, using nbsp to bypass that)
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{| class="{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}|{{#ifeq:{{{small|}}}|yes|small|standard}}-talk}} messagebox" style="text-align:justify; margin: .5em 2%; padding: 0 1em; border: 3px solid #FAF191; background:#FFE423; border-radius:15px;
<includeonly><!--
| {{#if:{{{header|}}}|rowspan="2"}} align="center" style="width:35px;"|[[{{{image|}}}|{{{width|}}}|{{{alt-text|}}}]]
--><div style="background-color: {{{bg|#ffe423}}}; background-image: linear-gradient(transparent, {{#switch:{{{textcolor|#000}}}|#fff|#fffff|#FFF|#FFFFF = rgba(255,255,255,.15)|rgba(0,0,0,.15)}}); border-radius: 15px; max-width: -moz-fit-content; max-width: {{{maxwidth|fit-content}}}; min-width: 300px; overflow: hidden; margin-bottom: 5px;">
{{#if:{{{header|}}}|
<div class="{{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}|{{#ifeq:{{{small|}}}|yes|small|standard}}-talk}} messagebox" style="background: transparent; display: flex; gap: 10px; align-items: center; border-radius: 15px; border: 3px solid rgba(255,255,255,.5); color: {{{textcolor|#000}}}; padding: 5px 10px; margin: 0">
<!-- -->! Notice: {{{header}}}
<div>[[File:{{{image|Needed.png}}}|{{{width|50px}}}|{{{alt-text|}}}]]</div>
<!-- -->{{!-}}
<div><!--
-->{{#if:{{{header|}}}|'''{{#if:{{{suppressnotice|}}}||Notice:&nbsp;}}{{{header}}}'''<br>|}}<!--
-->{{{message|}}}
</div>
</div>
</div><!--
--></includeonly>
<!--
 
spacing between template and doc
 
--><noinclude>
{{notice
|header=Building
|message=This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
}}
}}
|align="left"|{{{message|}}}
<div style="display: flex; gap: 25px">
|}<noinclude>
<div>
===Template parameters===
{| class="wikitable table-yellow"
! Parameter
! Description
! Default
|-
| style="text-align: center; width: 33.33333%" | <code>bg</code>
| style="width: 33.33333%" | The color of the background. This will affect the border color automatically.
| style="text-align: center; width: 33.33333%" | <code>#ffe423</code>
|-
| style="text-align: center" | <code>textcolor</code>
| The color of the text. Change to <code>#fff</code> (white) if the background is dark.
| style="text-align: center" | <code>#000</code>
|-
| style="text-align: center" | <code>maxwidth</code>
| Maximum width of the notice. Preferable to avoid percentage-based values.
| style="text-align: center" | <code>fit-content</code>
|-
| style="text-align: center" | <code>image</code>
| Image of the notice.
| style="text-align: center" | <code>Needed.png</code>
|-
| style="text-align: center" | <code>width</code>
| Width of the image.
| style="text-align: center" | <code>50px</code>
|-
| style="text-align: center" | <code>alt-text</code>
| Alt text of the image.
| class="text-align: center" | None
|-
| style="text-align: center" | <code>header</code>
| Header of the notice.
| style="text-align: center" | None
|-
| style="text-align: center" | <code>message</code>
| Message of the notice.
| style="text-align: center" | None
|-
| style="text-align: center" | <code>suppressnotice</code>
| Removes "Notice: " from the header if filled out.
| style="text-align: center" | None
|}
</div>
<div>
===Color examples===
{{notice
|bg=#1886f9
|textcolor=#fff
|header=Building
|message=This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
}}
{{notice
|bg=#f91818
|textcolor=#fff
|header=Building
|message=This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
}}
{{notice
|bg=#45f918
|header=Building
|message=This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
}}
{{notice
|bg=#44fff6
|header=Building
|message=This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
}}
{{notice
|bg=#000000
|textcolor=#fff
|header=Building
|message=This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
}}
</div>
</div>
===Raw code===
<pre>
{{Notice
|bg=
|textcolor=
|maxwidth=
|image=
|width=
|alt-text=
|header=
|message=
|suppressnotice=
}}
</pre>
[[Category:Meta-templates]]
[[Category:Meta-templates]]
</noinclude>
</noinclude>

Latest revision as of 15:43, 4 January 2024


Needed.png
Notice: Building
This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.

Template parameters

Parameter Description Default
bg The color of the background. This will affect the border color automatically. #ffe423
textcolor The color of the text. Change to #fff (white) if the background is dark. #000
maxwidth Maximum width of the notice. Preferable to avoid percentage-based values. fit-content
image Image of the notice. Needed.png
width Width of the image. 50px
alt-text Alt text of the image. None
header Header of the notice. None
message Message of the notice. None
suppressnotice Removes "Notice: " from the header if filled out. None

Color examples

Needed.png
Notice: Building
This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
Needed.png
Notice: Building
This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
Needed.png
Notice: Building
This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
Needed.png
Notice: Building
This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.
Needed.png
Notice: Building
This article or section is under construction. Therefore, please excuse its informal appearance while it's being worked on. We hope to have it completed as soon as possible.

Raw code

{{Notice
|bg=
|textcolor=
|maxwidth=
|image=
|width=
|alt-text=
|header=
|message=
|suppressnotice=
}}