Template:NB: Difference between revisions

From VASP Wiki
No edit summary
No edit summary
Line 1: Line 1:
<!--
Creates a box with VASP color palette.
USAGE: {{BOX|style|message|firstword}}
style is one of: tip, deprecated, note, warning, important
otherwise draws just a black box.
-->
{{#switch: {{{1}}}
{{#switch: {{{1}}}
  | tip        = {{{!}} style="border: 3px solid #2FB5AB; padding: 10px; background: #F3FCFB"
  | tip        = {{{!}} style="border: 3px solid #2FB5AB; padding: 10px; background: #F3FCFB"
Line 26: Line 18:
   {{!}} {{{2}}}
   {{!}} {{{2}}}
   {{!}}}
   {{!}}}
}}
}}<noinclude>
== Purpose ==
This template draws various colored boxes which can be filled with user content.
 
== Parameters ==
 
<nowiki> {{BOX|<style>|<message>|<<firstword>>}}</nowiki>
 
* <code>style</code>: One of <code>tip,deprecated,note,warning,important</code>, selects the box style, i.e. the color and the first word (see examples below). If <code>style</code> is not any of the words in the list, a black box without first word is drawn.
* <code>message</code>: The content of the box (after the first word).
* <code>firstword</code>: ('''optional''') Overrides the default first word for any of the predefined styles.
 
 
== Examples ==
<nowiki> {{BOX|tip|This is a serious warning!}}
 
{{BOX|deprecated|This feature is deprecated and will be removed in the next release}}
 
{{BOX|note|You can manually set this via '''SOME_TAG'''}}
 
{{BOX|warning|Never do this at home!}}
 
{{BOX|important|You should really consider this!}}
 
{{BOX|none|Just a box.}}
 
{{BOX|warning|Really, really don't do this!|CAUTION!!!}}</nowiki>
will produce
{{BOX|tip|This is a serious warning!}}
 
{{BOX|deprecated|This feature is deprecated and will be removed in the next release}}
 
{{BOX|note|You can manually set this via '''SOME_TAG'''}}
 
{{BOX|warning|Never do this at home!}}
 
{{BOX|important|You should really consider this!}}
 
{{BOX|none|Just a box.}}
 
{{BOX|warning|Really, really don't do this!|CAUTION!!!}}
</noinclude>

Revision as of 22:21, 7 October 2021

{{{2}}}

Purpose

This template draws various colored boxes which can be filled with user content.

Parameters

 {{BOX|<style>|<message>|<<firstword>>}}
  • style: One of tip,deprecated,note,warning,important, selects the box style, i.e. the color and the first word (see examples below). If style is not any of the words in the list, a black box without first word is drawn.
  • message: The content of the box (after the first word).
  • firstword: (optional) Overrides the default first word for any of the predefined styles.


Examples

 {{BOX|tip|This is a serious warning!}}

 {{BOX|deprecated|This feature is deprecated and will be removed in the next release}}

 {{BOX|note|You can manually set this via '''SOME_TAG'''}}

 {{BOX|warning|Never do this at home!}}

 {{BOX|important|You should really consider this!}}

 {{BOX|none|Just a box.}}

 {{BOX|warning|Really, really don't do this!|CAUTION!!!}}

will produce

Tip: This is a serious warning!


Deprecated: This feature is deprecated and will be removed in the next release


Note: You can manually set this via SOME_TAG


Warning: Never do this at home!


Important: You should really consider this!


Just a box.


CAUTION!!! Really, really don't do this!