Template:Notice: Difference between revisions

mNo edit summary
Fixed the notices
Line 1: Line 1:
<!-- Template:Notice -->
<!-- Template:Notice -->
<includeonly>
<includeonly>
<div class="notice" style="background-color: {{#switch: {{{severity|}}}
<div class="notice" style="background-color: {{{color|#f8f9fa}}}; border: 1px solid #eaecf0; padding: 10px; margin: 10px 0;">
  | warning = #fff3cd
  | draft = #cfe2ff
  | error = #f8d7da
  | success = #d1e7dd
  | #f8f9fa
}}; border: 1px solid {{#switch: {{{severity|}}}
  | warning = #ffeeba
  | draft = #9ec5fe
  | error = #f5c2c7
  | success = #badbcc
  | #eaecf0
}}; padding: 10px; margin: 10px 0;">
{{{1}}}
{{{1}}}
</div>
</div>
Line 19: Line 7:
<noinclude>
<noinclude>
== Usage ==
== Usage ==
Basic usage (default gray box):
Basic usage:
<pre>
<pre>
{{Notice|Your notice text here}}
{{Notice|Your notice text here}}
</pre>
</pre>


With severity level:
With background color:
<pre>
<pre>
{{Notice|severity=warning|Your warning text here}}
{{Notice|color=#cfe2ff|Your blue notice here}}
{{Notice|severity=draft|Your draft notice here}}
{{Notice|color=#fff3cd|Your orange notice here}}
{{Notice|severity=error|Your error message here}}
{{Notice|color=#f8d7da|Your red notice here}}
{{Notice|severity=success|Your success message here}}
{{Notice|color=#d1e7dd|Your green notice here}}
</pre>
</pre>


=== Severity Colors ===
=== Live Examples ===
* '''Default:''' Light gray background (#f8f9fa)
Default notice:
* '''Warning:''' Light yellow background (#fff3cd)
{{Notice|This is a default notice}}
* '''Draft:''' Light blue background (#cfe2ff)
 
* '''Error:''' Light red background (#f8d7da)
Blue notice:
* '''Success:''' Light green background (#d1e7dd)
{{Notice|color=#cfe2ff|This is a blue notice}}
 
Orange notice:
{{Notice|color=#fff3cd|This is an orange notice}}
 
Red notice:
{{Notice|color=#f8d7da|This is a red notice}}
 
Green notice:
{{Notice|color=#d1e7dd|This is a green notice}}


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>