Messagebox – Template
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{arma}}" to "{{arma1}}") |
Lou Montana (talk | contribs) (Remove forced background colour) |
||
(11 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly><div class="messagebox" style="background-color: {{{3 | <includeonly><div class="biki-messagebox{{#if:{{{class|}}}|<nowiki/> {{{class}}}}}"{{#if:{{{3|}}}|<nowiki/> style{{=}}"background-color:{{{3}}}}}"><!-- | ||
--><div>{{{2|i}}}</div><!-- | --><div>{{{2|i}}}</div><!-- | ||
--><div>{{#if:{{Trim|{{{1|}}}}}|{{Trim|{{{1|}}}}}|-Text not defined-}}</div><!-- | --><div>{{#if:{{Trim|{{{1|}}}}}|{{Trim|{{{1|}}}}}|-Text not defined-}}</div><!-- | ||
--></div></includeonly><noinclude>Displays a standardised message box. Base of messageboxes, used by <span class="plainlinks">[{{SERVER}}/wiki?title=Special%3AWhatLinksHere&target=Template%3AMessagebox&namespace=10 many other templates]. | --></div></includeonly><noinclude>Displays a standardised message box. | ||
Base of messageboxes, used by <span class="plainlinks">[{{SERVER}}/wiki?title=Special%3AWhatLinksHere&target=Template%3AMessagebox&namespace=10 many other templates]</span>. | |||
== Usage == | == Usage == | ||
{{<nowiki/>Messagebox|'''''message'''''|'''''icon'''''|'''''colour'''''}} | {{<nowiki/>Messagebox|'''''message'''''|'''''icon'''''|'''''colour'''''|'''''class='''''}} | ||
* message: the message to display | * message: the message to display | ||
* icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format <nowiki> | * icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format {{hl|[[<nowiki/>File]]) | ||
* colour: (Optional, default #025D00) box HTML colour, can be one of: | * colour: (Optional, default #025D00) box HTML colour, can be one of: | ||
** HTML colour name - ''red'', ''darkgrey'', etc. | ** HTML colour name - ''red'', ''darkgrey'', etc. | ||
Line 15: | Line 16: | ||
** hsl format - '''hsl(120, 100%, 50%)''' | ** hsl format - '''hsl(120, 100%, 50%)''' | ||
** hsla format - '''hsla(120, 60%, 70%, 0.3)''' | ** hsla format - '''hsla(120, 60%, 70%, 0.3)''' | ||
* class: (Optional, default none) makes it possible to add a CSS class | |||
{| class="wikitable" | {| class="wikitable" | ||
Line 35: | Line 37: | ||
| <nowiki>{{Messagebox|Hello there!|✔|#CDF}}</nowiki> | | <nowiki>{{Messagebox|Hello there!|✔|#CDF}}</nowiki> | ||
| {{Messagebox|Hello there!|✔|#CDF}} | | {{Messagebox|Hello there!|✔|#CDF}} | ||
|- | |||
| <nowiki>{{Messagebox|Text:</nowiki><br>Hello there!<br>General Kenobi!<br><nowiki>}}</nowiki> | |||
| {{Messagebox|Text: | |||
Hello there! | |||
General Kenobi! | |||
}} | |||
|- | |||
| <nowiki>{{Messagebox|Text:</nowiki><br>Hello there!<br><br>General Kenobi!<br><nowiki>}}</nowiki> | |||
| {{Messagebox|Text: | |||
Hello there! | |||
General Kenobi! | |||
}} | |||
|- | |||
| | |||
; Known Issues | |||
<pre> | |||
{{Feature|informative|Before}} | |||
* First | |||
: {{Feature|informative|indented}} | |||
: {{Feature|informative| {{GVI|arma3}}indented | |||
two lines}} | |||
* {{Feature|informative|Second, | |||
line return, | |||
double line return}} | |||
* {{Feature|informative| | |||
Third, | |||
line return, | |||
double line return}} | |||
* list {{Feature|informative| | |||
* list 1 | |||
* list 2 | |||
}} | |||
: {{Feature|informative|Indented messagebox list: | |||
* indented 1 | |||
* indented 2 | |||
}} | |||
* Last | |||
{{Feature|informative| | |||
* After 1 | |||
* After 2 | |||
}} | |||
</pre> | |||
| | |||
{{Feature|informative|Before}} | |||
* First | |||
: {{Feature|informative|indented}} | |||
: {{Feature|informative| {{GVI|arma3}}indented | |||
two lines}} | |||
* {{Feature|informative|Second, | |||
line return, | |||
double line return}} | |||
* {{Feature|informative| | |||
Third, | |||
line return, | |||
double line return}} | |||
* list {{Feature|informative| | |||
* list 1 | |||
* list 2 | |||
}} | |||
: {{Feature|informative|Indented messagebox list: | |||
* indented 1 | |||
* indented 2 | |||
}} | |||
* Last | |||
{{Feature|informative| | |||
* After 1 | |||
* After 2 | |||
}} | |||
|- | |- | ||
| <nowiki>{{Messagebox|Yep|Unreadable!|#EEE}}</nowiki> | | <nowiki>{{Messagebox|Yep|Unreadable!|#EEE}}</nowiki> | ||
| {{Messagebox|Yep|Unreadable!|#EEE}} | | {{Messagebox|Yep|Unreadable!|#EEE}} | ||
|- | |- | ||
| <nowiki>{{Messagebox| | | <nowiki>{{Messagebox|{{arma3}} logo|[[File:Arma 3_logo_black.png|300px|center]]|#888}}</nowiki> | ||
| {{Messagebox| | | {{Messagebox|{{arma3}} logo|[[File:Arma 3_logo_black.png|300px|center]]|#888}} | ||
|- | |- | ||
| <nowiki>{{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]| | | <nowiki>{{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|{{arma3}} logo|#333}}</nowiki> | ||
| {{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]| | | {{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|{{arma3}} logo|#333}} | ||
|- | |- | ||
| <nowiki>{{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}</nowiki> | | <nowiki>{{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}</nowiki> | ||
Line 54: | Line 129: | ||
| {{Messagebox|One line text|{{arma3}}|#FDA}} | | {{Messagebox|One line text|{{arma3}}|#FDA}} | ||
|- | |- | ||
| <nowiki>{{Messagebox|{{ | | <nowiki>{{Messagebox|{{Wiki|lorem}}|{{arma3}}|#FDA}}</nowiki> | ||
| {{Messagebox|{{ | | {{Messagebox|{{Wiki|lorem}}|{{arma3}}|#FDA}} | ||
|} | |} | ||
== Source == | == Source == | ||
<syntaxhighlight lang="html"> | <syntaxhighlight lang="html"> | ||
<div class="messagebox" style="background-color: {{{3|#025D00}}}><!-- | <div class="biki-messagebox{{#if:{{{class|}}}|<nowiki/> {{{class}}}}}" style="background-color:{{{3|#025D00}}}"><!-- | ||
--><div>{{{2|i}}}</div><!-- | --><div>{{{2|i}}}</div><!-- | ||
--><div>{{{1|-Text not defined- | --><div>{{#if:{{Trim|{{{1|}}}}}|{{Trim|{{{1|}}}}}|-Text not defined-}}</div><!-- | ||
--></div> | --></div> | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 18:03, 30 October 2024
Displays a standardised message box. Base of messageboxes, used by many other templates.
Usage
{{Messagebox|message|icon|colour|class=}}
- message: the message to display
- icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format {{hl|[[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)
- class: (Optional, default none) makes it possible to add a CSS class
Code | Result |
---|---|
{{Messagebox}} | |
{{Messagebox|Hello there!}} | |
{{Messagebox|Hello there!|✔}} | |
{{Messagebox|Hello there!|✔|orange}} | |
{{Messagebox|Hello there!|✔|#CDF}} | |
{{Messagebox|Text: Hello there! General Kenobi! }} |
|
{{Messagebox|Text: Hello there! General Kenobi! }} |
|
{{Feature|informative|Before}} * First : {{Feature|informative|indented}} : {{Feature|informative| {{GVI|arma3}}indented two lines}} * {{Feature|informative|Second, line return, double line return}} * {{Feature|informative| Third, line return, double line return}} * list {{Feature|informative| * list 1 * list 2 }} : {{Feature|informative|Indented messagebox list: * indented 1 * indented 2 }} * Last {{Feature|informative| * After 1 * After 2 }} |
line return, double line returnline return, double line return
|
{{Messagebox|Yep|Unreadable!|#EEE}} | |
{{Messagebox|{{arma3}} logo|[[File:Arma 3_logo_black.png|300px|center]]|#888}} | |
{{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|{{arma3}} logo|#333}} | |
{{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}} | |
{{Messagebox|{{arma3}}|a<br>b<br>c<br>d|#333}} | |
{{Messagebox|One line text|{{arma3}}|#FDA}} | |
{{Messagebox|{{Wiki|lorem}}|{{arma3}}|#FDA}} |
Source
<div class="biki-messagebox{{#if:{{{class|}}}|<nowiki/> {{{class}}}}}" style="background-color:{{{3|#025D00}}}"><!--
--><div>{{{2|i}}}</div><!--
--><div>{{#if:{{Trim|{{{1|}}}}}|{{Trim|{{{1|}}}}}|-Text not defined-}}</div><!--
--></div>