Difference between revisions of "Template:Alerts"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
{{#switch: {{{1|}}} | {{#switch: {{{1|}}} | ||
| warning = | | warning = | ||
− | <div class="alert alert-warning" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{ | + | <div class="alert alert-warning" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{1|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">×</span></div></div> |
| danger = | | danger = | ||
− | <div class="alert alert-danger" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{ | + | <div class="alert alert-danger" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{1|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">×</span></div></div> |
| dark = | | dark = | ||
− | <div class="alert alert-dark" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{ | + | <div class="alert alert-dark" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{1|}}}</p><div type="button" class="close" data-dismiss="alert" aria-label="Close" style="cursor: pointer;"><span aria-hidden="true">×</span></div></div> |
|#default = | |#default = | ||
− | <div class="alert alert-light" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{ | + | <div class="alert alert-light" role="alert">{{#if: {{{title|}}}|<h4 class="alert-heading">{{{title|}}}</h4>|}}<p>{{{1|}}}</p></div> |
}} | }} | ||
<noinclude> | <noinclude> |
Revision as of 08:16, 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:
- A warning alert
- A danger alert
- A dark alert
- 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}}
Test message