Template:NB: Difference between revisions

From VASP Wiki
m (Singraber moved page Template:BOX to Template:NB)
No edit summary
Line 24: Line 24:
== Parameters ==
== Parameters ==


  <nowiki> {{BOX|<style>|<message>|<<firstword>>}}</nowiki>
  <nowiki> {{NB|<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>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.
Line 32: Line 32:


== Examples ==
== Examples ==
  <nowiki> {{BOX|tip|This is the clever way of doing it!}}
  <nowiki> {{NB|tip|This is the clever way of doing it!}}


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


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


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


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


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


  {{BOX|warning|Really, really don't do this!|CAUTION!!!}}</nowiki>
  {{NB|warning|Really, really don't do this!|CAUTION!!!}}</nowiki>
will produce
will produce
{{BOX|tip|This is the clever way of doing it!}}
{{NB|tip|This is the clever way of doing it!}}


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


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


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


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


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


{{BOX|warning|Really, really don't do this!|CAUTION!!!}}
{{NB|warning|Really, really don't do this!|CAUTION!!!}}
</noinclude>
</noinclude>

Revision as of 07:42, 12 October 2021

{{{2}}}

Purpose

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

Parameters

 {{NB|<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

 {{NB|tip|This is the clever way of doing it!}}

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

 {{NB|mind|You can manually set this via '''SOME_TAG'''}}

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

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

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

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

will produce

Tip: This is the clever way of doing it!


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


Mind: 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!