Template:Security Warning: Difference between revisions

Overhaul security template
DoggoBit (talk | contribs)
No edit summary
Line 1: Line 1:
<noinclude>{{Template}}
<includeonly>{{Notice
 
  |color={{#switch:{{{type|hiPrio}}}
== Usage ==
    |hiPrio
 
    |critical = var(--color-error)
{{ic|<nowiki>{{Security Warning|This configuration may be unsafe.}}</nowiki>}}
    |lowPrio
 
    |warning = var(--border-color-warning)
{{ic|<nowiki>{{Security Warning|Stop what you're doing!|heading=This is dangerous!}}</nowiki>}}
    |secure = var(--color-success)
 
    |#default = var(--color-progressive)
{{ic|<nowiki>{{Security Warning|Don't do anything that you might regret!|type=lowPrio}}</nowiki>}}
  }}
 
  |background={{#switch:{{{type|hiPrio}}}
{{ic|<nowiki>{{Security Warning|This is safe by default!|type=secure}}</nowiki>}}
    |hiPrio
 
    |critical = var(--background-color-error-subtle)
== Example ==
    |lowPrio
{{Security Warning|This configuration may be unsafe.}}
    |warning = var(--background-color-warning-subtle)
{{Security Warning|Stop what you're doing!|heading=This is dangerous!}}
    |secure = var(--background-color-success-subtle)
{{Security Warning|Don't do anything that you might regret!|type=lowPrio}}
    |#default = var(--background-color-progressive-subtle)
{{Security Warning|This is safe by default!|type=secure}}
  }}
</noinclude>
  |icon=🛡
<includeonly>{{META Message
  |'''{{{heading|Security information:}}}''' {{{1|{{{message}}}}}}
|border = {{#ifeq: hiPrio | {{{type|hiPrio}}} | #ED1515 }}
}}{{#ifeq:{{{category|yes}}}|yes|[[Category:Pages or sections flagged with Template:Security Warning]][[Category:Articles that contain security information]]|}}</includeonly><noinclude>{{Documentation}}</noinclude>
          {{#ifeq: lowPrio | {{{type|hiPrio}}} | #FFC35A }}
          {{#ifeq: secure | {{{type|hiPrio}}} | #78DA06 }}
|signal = [[File:Breeze-security-{{#ifeq: hiPrio | {{{type|hiPrio}}} |low}}{{#ifeq: lowPrio | {{{type|hiPrio}}} |medium}}{{#ifeq: secure | {{{type|hiPrio}}} |high}}.svg|link=]]
|heading = {{#ifeq: hiPrio | {{{type|hiPrio}}} | {{{heading|Warning}}}}}
          {{#ifeq: lowPrio | {{{type|hiPrio}}} | {{{heading|Caution}}}}}
          {{#ifeq: secure | {{{type|hiPrio}}} | {{{heading|Security Information}}}}}
|message = {{{1|{{{message}}}}}}
}}[[Category:Pages or sections flagged with Template:Security Warning]]</includeonly>