Difference between revisions of "Template:Warning"

From relax wiki
Jump to navigation Jump to search
(Created a Warning template - this comes from the FlightGear project from the template of the same name: http://wiki.flightgear.org/Template:Warning .)
 
(Redesign of the template using the Template:MessageBox meta-template transclusion. Full documentation has also been added.)
Line 1: Line 1:
{| cellspacing="0" style="border: 1px solid #f42; border-left-width: 10px; margin: 1em auto; width: {{{width|90%}}}; background-color: #ffe0d0; padding: 2px;"
+
{{MessageBox
| style="padding-left:5px;"| '''<span class="smallcaps" style="font-variant:small-caps;">Warning</span>'''&ensp; {{{1|Add message}}}
+
| message = {{{message|Add message}}}
|}<noinclude>
+
| title  = Warning
 +
| border = thin solid #f42
 +
| bgcolor = #ffe0d0
 +
}}
 +
 
 +
<noinclude>
 +
 
 +
== Goal ==
 +
 
 +
To provide a clear warning to the reader.
 +
 
 +
== Usage ==
 +
 
 +
<nowiki>{{</nowiki>'''warning'''|''message=''<nowiki>}}</nowiki>
 +
 
 +
; message : The obligatory warning text.
 +
 
 +
== Example ==
 +
 
 +
<nowiki>{{Warning|message=This is a warning test message}}</nowiki>
 +
 
 +
{{Warning|message=This is a warning test message}}
 +
 
 +
== Informative Message Box Series ==
 +
 
 +
This idea of using a meta-template transclusion was suggested by [http://wiki.flightgear.org/User_talk:Johan_G#Using_the_messagebox_templates_for_an_external_project Johan G. on the FlightGear wiki].  The {{tl|tip}}, {{tl|note}}, {{tl|caution}}, and {{tl|warning}} message box colour scheme was also devised by Johan.
 +
 
 +
The following are part of series of message boxes for helping to inform the reader.  For example if you use:
 +
 
 +
<nowiki>{{tip|If you do it this way, your life will be easier.}}
 +
{{note|Do not forget to run this command.}}
 +
{{caution|If you run this command incorrectly, your harddrive will be erased.}}
 +
{{warning|Do not delete all FGAddon aircraft.}}</nowiki>
 +
 
 +
The result will be:
 +
 
 +
{{tip|If you do it this way, your life will be easier.}}
 +
{{note|Do not forget to run this command.}}
 +
{{caution|If you run this command incorrectly, your harddrive will be erased.}}
 +
{{warning|Do not delete all FGAddon aircraft.}}
 +
 
 +
</noinclude>

Revision as of 17:44, 15 October 2015

Warning  Add message


Goal

To provide a clear warning to the reader.

Usage

{{warning|message=}}
message 
The obligatory warning text.

Example

{{Warning|message=This is a warning test message}}


Warning  This is a warning test message


Informative Message Box Series

This idea of using a meta-template transclusion was suggested by Johan G. on the FlightGear wiki. The {{tip}}, {{note}}, {{caution}}, and {{warning}} message box colour scheme was also devised by Johan.

The following are part of series of message boxes for helping to inform the reader. For example if you use:

{{tip|If you do it this way, your life will be easier.}}
{{note|Do not forget to run this command.}}
{{caution|If you run this command incorrectly, your harddrive will be erased.}}
{{warning|Do not delete all FGAddon aircraft.}}

The result will be:


Tip  If you do it this way, your life will be easier.
Note  Do not forget to run this command.
Caution  If you run this command incorrectly, your harddrive will be erased.
Warning  Add message