Messagebox – Template

From Bohemia Interactive Community
Jump to navigation Jump to search
(Use CSS class)
m (Text replacement - "{{arma}}" to "{{arma1}}")
Line 45: Line 45:
| {{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|Arma 3 logo|#333}}
| {{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|Arma 3 logo|#333}}
|-
|-
| <nowiki>{{Messagebox|{{ofp}}<br>{{arma}}<br>{{arma2}}<br>{{arma3}}|A|#333}}</nowiki>
| <nowiki>{{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}</nowiki>
| {{Messagebox|{{ofp}}<br>{{arma}}<br>{{arma2}}<br>{{arma3}}|A|#333}}
| {{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}
|-
|-
| <nowiki>{{Messagebox|{{arma3}}|a<br>b<br>c<br>d|#333}}</nowiki>
| <nowiki>{{Messagebox|{{arma3}}|a<br>b<br>c<br>d|#333}}</nowiki>

Revision as of 06:44, 26 December 2020

Displays a standardised message box. Base of messageboxes, used by many other templates.

Usage

{{Messagebox|message|icon|colour}}

  • message: the message to display
  • icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format [[File]])
  • colour: (Optional, default #025D00) box HTML colour, can be one of:
    • HTML colour name - red, darkgrey, etc.
    • HTML colour format - #RGB or #RRGGBB
    • rgb format - rgb(255, 0, 0)
    • rgba format - rgba(255, 0, 0, 0.5)
    • hsl format - hsl(120, 100%, 50%)
    • hsla format - hsla(120, 60%, 70%, 0.3)
Examples
Code Result
{{Messagebox}}
i
-Text not defined-
{{Messagebox|Hello there!}}
i
Hello there!
{{Messagebox|Hello there!|✔}}
Hello there!
{{Messagebox|Hello there!|✔|orange}}
Hello there!
{{Messagebox|Hello there!|✔|#CDF}}
Hello there!
{{Messagebox|Yep|Unreadable!|#EEE}}
Unreadable!
Yep
{{Messagebox|Arma 3 logo|[[File:Arma 3_logo_black.png|300px|center]]|#888}}
Arma 3 logo black.png
Arma 3 logo
{{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|Arma 3 logo|#333}}
Arma 3 logo
Arma 3 logo black.png
{{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}
A
Operation Flashpoint
Armed Assault
Arma 2
Arma 3
{{Messagebox|{{arma3}}|a<br>b<br>c<br>d|#333}}
a
b
c
d
Arma 3
{{Messagebox|One line text|{{arma3}}|#FDA}}
Arma 3
One line text
{{Messagebox|{{Lorem}}|{{arma3}}|#FDA}}

Source

<div class="messagebox" style="background-color: {{{3|#025D00}}}><!--
--><div>{{{2|i}}}</div><!--
--><div>{{{1|-Text not defined-}}}</div><!--
--></div>