Difference between revisions of "Template:CMF Messagebox"

From cluster wiki
Jump to navigation Jump to search
(Created page with "<includeonly><div class="biki-messagebox" style="background-color:{{{3|#025D00}}}"><!-- --><div>{{{2|i}}}</div><!-- --><div>{{#if:{{Trim|{{{1|}}}}}|{{Trim|{{{1|}}}}}|-Text not...")
 
 
Line 1: Line 1:
<includeonly><div class="biki-messagebox" style="background-color:{{{3|#025D00}}}"><!--
<includeonly>
<div class="biki-messagebox" style="background-color:{{{3|#025D00}}}"><!--
--><div>{{{2|i}}}</div><!--
--><div>{{{2|i}}}</div><!--
--><div>{{#if:{{Trim|{{{1|}}}}}|{{Trim|{{{1|}}}}}|-Text not defined-}}</div><!--
--><div>{{#if:{{{{1|}}}|{{{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].


== Usage ==
== Usage ==
Line 21: Line 26:
! Result
! Result
|-
|-
| <nowiki>{{Messagebox}}</nowiki>
| <nowiki>{{CMF Messagebox}}</nowiki>
| {{Messagebox}}
| {{CMF Messagebox}}
|-
| <nowiki>{{Messagebox|Hello there!}}</nowiki>
| {{Messagebox|Hello there!}}
|-
| <nowiki>{{Messagebox|Hello there!|✔}}</nowiki>
| {{Messagebox|Hello there!|✔}}
|-
| <nowiki>{{Messagebox|Hello there!|✔|orange}}</nowiki>
| {{Messagebox|Hello there!|✔|orange}}
|-
| <nowiki>{{Messagebox|Hello there!|✔|#CDF}}</nowiki>
| {{Messagebox|Hello there!|✔|#CDF}}
|-
| <nowiki>{{Messagebox|Yep|Unreadable!|#EEE}}</nowiki>
| {{Messagebox|Yep|Unreadable!|#EEE}}
|-
| <nowiki>{{Messagebox|Arma 3 logo|[[File:Arma 3_logo_black.png|300px|center]]|#888}}</nowiki>
| {{Messagebox|Arma 3 logo|[[File:Arma 3_logo_black.png|300px|center]]|#888}}
|-
|-
| <nowiki>{{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|Arma 3 logo|#333}}</nowiki>
| <nowiki>{{CMF Messagebox|Hello there!}}</nowiki>
| {{Messagebox|[[File:Arma 3_logo_black.png|300px|center]]|Arma 3 logo|#333}}
| {{CMF Messagebox|Hello there!}}
|-
|-
| <nowiki>{{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}</nowiki>
| <nowiki>{{CMF Messagebox|Hello there!|}}</nowiki>
| {{Messagebox|{{ofp}}<br>{{arma1}}<br>{{arma2}}<br>{{arma3}}|A|#333}}
| {{CMF Messagebox|Hello there!|}}
|-
|-
| <nowiki>{{Messagebox|{{arma3}}|a<br>b<br>c<br>d|#333}}</nowiki>
| <nowiki>{{CMF Messagebox|Hello there!||orange}}</nowiki>
| {{Messagebox|{{arma3}}|a<br>b<br>c<br>d|#333}}
| {{CMF Messagebox|Hello there!||orange}}
|-
|-
| <nowiki>{{Messagebox|One line text|{{arma3}}|#FDA}}</nowiki>
| <nowiki>{{CMF Messagebox|Hello there!||#CDF}}</nowiki>
| {{Messagebox|One line text|{{arma3}}|#FDA}}
| {{CMF Messagebox|Hello there!||#CDF}}
|-
|-
| <nowiki>{{Messagebox|{{Wiki|lorem}}|{{arma3}}|#FDA}}</nowiki>
| <nowiki>{{CMF Messagebox|Yep|Unreadable!|#EEE}}</nowiki>
| {{Messagebox|{{Wiki|lorem}}|{{arma3}}|#FDA}}
| {{CMF Messagebox|Yep|Unreadable!|#EEE}}
|}
|}


Line 66: Line 53:
</syntaxhighlight>
</syntaxhighlight>


[[Category:Templates|{{uc:messagebox}}]]
</noinclude>
</noinclude>

Latest revision as of 14:55, 17 December 2022


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
{{CMF Messagebox}}
i


{{CMF Messagebox|Hello there!}}
i
Hello there!


{{CMF Messagebox|Hello there!|✔}}
Hello there!


{{CMF Messagebox|Hello there!|✔|orange}}
Hello there!


{{CMF Messagebox|Hello there!|✔|#CDF}}
Hello there!


{{CMF Messagebox|Yep|Unreadable!|#EEE}}
Unreadable!
Yep


Source

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