Jump to content

Template:Security Warning: Difference between revisions

From NixOS Wiki
imported>Samueldr
Created page with "<noinclude>{{Template}}{{DISPLAYTITLE:Template:security warning}} == Usage == <nowiki>{{security warning|reason|heading=Teplacement Title}}</nowiki> == Example == <nowik..."
 
DoggoBit (talk | contribs)
No edit summary
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Template}}{{DISPLAYTITLE:Template:security warning}}
<includeonly>{{Notice
 
  |color={{#switch:{{{type|hiPrio}}}
== Usage ==
    |hiPrio
 
    |critical = var(--color-error)
<nowiki>{{security warning|reason|heading=Teplacement Title}}</nowiki>
    |lowPrio
 
    |warning = var(--border-color-warning)
== Example ==
    |secure = var(--color-success)
 
    |#default = var(--color-progressive)
<nowiki>{{security warning|This is just a demonstration template.}}</nowiki>
  }}
 
  |background={{#switch:{{{type|hiPrio}}}
{{Security Warning|This is just a demonstration template.}}
    |hiPrio
 
    |critical = var(--background-color-error-subtle)
</noinclude><includeonly>{{META Message
    |lowPrio
|border = #ED1515
    |warning = var(--background-color-warning-subtle)
|signal          = [[File:Breeze-security-low.png|link=]]
    |secure = var(--background-color-success-subtle)
|heading        = {{{heading|Warning}}}
    |#default = var(--background-color-progressive-subtle)
|message        = {{{1|{{{message}}}}}}
  }}
}}[[Category:Pages or sections flagged with Template:Expansion]]</includeonly>
  |icon=🛡&#xFE0E;
  |'''{{{heading|Security information:}}}''' {{{1|{{{message}}}}}}
}}{{#ifeq:{{{category|yes}}}|yes|[[Category:Pages or sections flagged with Template:Security Warning]][[Category:Articles that contain security information]]|}}</includeonly><noinclude>{{merge|Template:Warning|reason=This template is a semantically-specific reimplementation of [[Template:Warning]] and [[Template:Notice]].}}{{Documentation}}</noinclude>

Latest revision as of 21:09, 6 June 2025

⤟︎
This article or section is a candidate for merging with Template:Warning. This template is a semantically-specific reimplementation of Template:Warning and Template:Notice. Further information may be found in the relevant discussion page.

Template Documentation [edit source| uses| help]

This notice can be used to display security information to the reader, in a way that disrupts the normal reading flow. This can be especially useful to convey critical information the user should read before proceeding.

🛡︎︎
Security information: This template is not secure

Usage

Simply including this template, alongside a message to be displayed, would suffice in producing a notice like the one above:

{{Security Warning|This template is not secure}}

There are three distinct levels you can specify for a security warning's type. Each level, along with an example and the resulting output can be seen in the table below:

Type Example Output
critical
{{Security Warning
  |type=critical
  |This information is critical!
}}
🛡︎︎
Security information: This information is critical!
warning
{{Security Warning
  |type=warning
  |This is your last warning!
}}
🛡︎︎
Security information: This is your last warning!
secure
{{Security Warning
  |type=secure
  |All clear.
}}
🛡︎︎
Security information: All clear.
info
{{Security Warning
  |type=info
  |For your information.
}}
🛡︎︎
Security information: For your information.

You can also specify some text to replace the "Security information" in the notice:

{{Security Warning|type=info|heading=Important info:|This security notice is important.}}
🛡︎︎
Important info: This security notice is important.