Template:Box: Difference between revisions
Appearance
No edit summary |
make it match community wiki |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<div class="alert {{{4}}}"> | <div class="alert {{#if: {{{4| }}} | mw-message-box-{{{4}}} | mw-message-box }} mw-message-box"> | ||
{{#if: {{{3|}}} | {{{3}}} }} | |||
< | <div> | ||
< | <strong>{{{2}}}</strong> | ||
<div>{{{1}}}</div> | |||
</div> | |||
</div> | </div> | ||
<noinclude> | <noinclude> | ||
Line 12: | Line 13: | ||
# The text of the main body of the box | # The text of the main body of the box | ||
# The title of the box | # The title of the box | ||
# An image file to be displayed in the top left of the box - the image size should be 40 x 40 | # An image file to be displayed in the top left of the box - the image size should be 40 x 40 (optional) | ||
# The | # The color: | ||
#* default | #* the default gives gray | ||
#* 'warning' gives yellow | |||
#* ' | #* 'error' gives red | ||
#* ' | |||
Example: {{ | Example: | ||
{{ | <tt><nowiki>{{Box|1=This is an example box|2=Example|3=[[Image:Note-box-icon.png|left|40px|link=]]|4=warning}}</nowiki></tt> | ||
{{Box|1=This is an example box|2=Example|3=[[Image:Note-box-icon.png|left|40px|link=]]|4=warning}} | |||
Please avoid using this template directly in pages. If you need something that doesn't already exist, consider making a new template based on this template. That way it will be much easier to maintain TechBase, and the risk of introducing unintended effects on your page is reduced considerably. | Please avoid using this template directly in pages. If you need something that doesn't already exist, consider making a new template based on this template. That way it will be much easier to maintain TechBase, and the risk of introducing unintended effects on your page is reduced considerably. |
Latest revision as of 16:48, 10 October 2023
Use this template for content that needs to be specially emphasized. Syntax:
{{Box1|2=Title|3=Image|4=color|1=text}}
The template takes four arguments:
- The text of the main body of the box
- The title of the box
- An image file to be displayed in the top left of the box - the image size should be 40 x 40 (optional)
- The color:
- the default gives gray
- 'warning' gives yellow
- 'error' gives red
Example: {{Box|1=This is an example box|2=Example|3=[[Image:Note-box-icon.png|left|40px|link=]]|4=warning}}
Please avoid using this template directly in pages. If you need something that doesn't already exist, consider making a new template based on this template. That way it will be much easier to maintain TechBase, and the risk of introducing unintended effects on your page is reduced considerably.
Existing templates based on this template: Template:Info, Template:Note, Template:Tip, Template:Warning, Template:Remember.