Difference between revisions of "Template:Messagebox"
Jump to navigation
Jump to search
Lou Montana (talk | contribs) (Template creation) |
Lou Montana (talk | contribs) m (Fix default value) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><div style="background-color: {{{3|#380}}}; color: #FFF; display: flex; align-items: center; margin: | + | <includeonly><div style="background-color: {{{3|#380}}}; color: #FFF; border-radius: 0.5em; box-shadow: 0 0 .5em .25em rgba(0,0,0,0.25); display: flex; align-items: center; margin: 1em .5em"><!-- |
--><div style="min-width: 28px; max-width: 60px; min-height: 28px; max-height: 44px; font-size: 28px; margin: 0 8px; overflow: hidden; text-align: center;">{{{2|i}}}</div><!-- | --><div style="min-width: 28px; max-width: 60px; min-height: 28px; max-height: 44px; font-size: 28px; margin: 0 8px; overflow: hidden; text-align: center;">{{{2|i}}}</div><!-- | ||
− | --><div style="background-color: #FFF; color: #333; flex-grow: 1; height: 100%; margin: 0.25em 0.25em 0.25em 0; padding: 0.5em;">{{{1|-Text not defined-}}}</div><!-- | + | --><div style="background-color: #FFF; color: #333; border-radius: 0.25em; flex-grow: 1; height: 100%; margin: 0.25em 0.25em 0.25em 0; padding: 0.5em; min-width: 15em">{{{1|-Text not defined-}}}</div><!-- |
--></div></includeonly><noinclude> | --></div></includeonly><noinclude> | ||
Displays a standardised message box. | Displays a standardised message box. | ||
Line 9: | Line 9: | ||
* 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>[[File]]</nowiki>) | * icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format <nowiki>[[File]]</nowiki>) | ||
− | * colour: (Optional, default # | + | * colour: (Optional, default #380) box HTML colour, can be one of: |
** HTML colour name - ''red'', ''darkgrey'', etc. | ** HTML colour name - ''red'', ''darkgrey'', etc. | ||
** HTML colour format - '''#RGB''' or '''#RRGGBB''' | ** HTML colour format - '''#RGB''' or '''#RRGGBB''' |
Latest revision as of 20:14, 10 February 2020
Displays a standardised message box.
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 #380) 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)
Code | Result |
---|---|
{{Messagebox}} | -Text not defined- |
{{Messagebox|Hello there!}} | Hello there! |
{{Messagebox|Hello there!|✔}} | Hello there! |
{{Messagebox|Hello there!|✔|orange}} | Hello there! |
{{Messagebox|Hello there!|✔|#CDF}} | Hello there! |
{{Messagebox|Yep|Unreadable!|#EEE}} | Yep |