Difference between revisions of "Template:Alerts"

From Arks-Visiphone
Jump to navigation Jump to search
Line 1: Line 1:
{{#switch: {{{alert|}}}
+
{{#switch: {{{1|}}}
 
| warning =  
 
| warning =  
<div class="alert alert-warning" role="alert">{{#if: {{{1|}}}|<h4 class="alert-heading">{{{1|}}}</h4>|}}<p>{{{2|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">&times;</span></div></div>
+
<div class="alert alert-warning" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{2|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">&times;</span></div></div>
 
| danger =  
 
| danger =  
<div class="alert alert-danger" role="alert">{{#if: {{{1|}}}|<h4 class="alert-heading">{{{1|}}}</h4>|}}<p>{{{2|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">&times;</span></div></div>
+
<div class="alert alert-danger" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{2|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">&times;</span></div></div>
 
| dark =  
 
| dark =  
<div class="alert alert-dark" role="alert">{{#if: {{{1|}}}|<h4 class="alert-heading">{{{1|}}}</h4>|}}<p>{{{2|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">&times;</span></div></div>
+
<div class="alert alert-dark" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{2|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">&times;</span></div></div>
 
|#default =  
 
|#default =  
<div class="alert alert-light" role="alert"><p>{{{2|}}}</p></div>
+
<div class="alert alert-light" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{2|}}}</p></div>
 
}}
 
}}
 
<noinclude>
 
<noinclude>
Line 33: Line 33:
 
<p>Wiki code:</p>
 
<p>Wiki code:</p>
 
<pre>{{Alerts|Test message}}</pre>
 
<pre>{{Alerts|Test message}}</pre>
{{Alerts|alert|Test message}}
+
{{Alerts|Test message}}
  
 
</div>
 
</div>

Revision as of 08:15, 30 April 2020

Template Documentation

Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages.

Usage


This template can be used to provide an alert textbox in 4 contextual cases with 3 of them having a close/dismiss button. This template can display the following alerts:

  1. A warning alert
  2. A danger alert
  3. A dark alert
  4. And a normal alert

Examples


The Classic Light Alert

The following displays the light alert text box. You can follow this with whatever text/images/markup you like.

Wiki code:

{{Alerts|Test message}}