Template:Notice: Difference between revisions
m 1 revision imported |
Expanding on notice capabilities |
||
Line 1: | Line 1: | ||
<div class="notice" style="background-color: #f8f9fa; border: 1px solid #eaecf0; padding: 10px; margin: 10px 0;"> | <!-- Template:Notice --> | ||
<includeonly> | |||
<div class="notice" style="background-color: {{#switch: {{{severity|}}} | |||
| 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> | ||
</includeonly> | |||
<noinclude> | |||
== Usage == | |||
Basic usage (unchanged behavior): | |||
<pre> | |||
{{Notice|Your notice text here}} | |||
</pre> | |||
With severity level: | |||
<pre> | |||
{{Notice|severity=warning|Your warning text here}} | |||
{{Notice|severity=draft|Your draft notice here}} | |||
{{Notice|severity=error|Your error message here}} | |||
{{Notice|severity=success|Your success message here}} | |||
</pre> | |||
=== Severity Colors === | |||
* '''Default:''' Light gray background (#f8f9fa) | |||
* '''Warning:''' Light yellow background (#fff3cd) | |||
* '''Draft:''' Light blue background (#cfe2ff) | |||
* '''Error:''' Light red background (#f8d7da) | |||
* '''Success:''' Light green background (#d1e7dd) | |||
[[Category:Templates]] | |||
</noinclude> |