Template:Message box: Difference between revisions

From The Deadlock Wiki
Jump to navigation Jump to search
added support for changing the icon size. added automatically setting alt text for the icons with the image parameter. LMK IF I BROKE IT
fixed long standing bug of the image being wrapped in p tags
Line 1: Line 1:
<onlyinclude><div style="display: flex; justify-content: center;">
<onlyinclude><div style="display: flex; justify-content: center;">
<div style="border: 1px solid #ccc; width: 80%; min-width: 310px;">
<div style="border: 1px solid #ccc; width: 80%; min-width: 310px;">
<div style="display: flex; align-items: center; padding: 7px; {{#if:{{{border|none}}}|border-left: 10px solid {{{border|#e1d2b3}}};}}">
<div style="display: flex; align-items: center; padding: 7px; {{#if:{{{border|none}}}|border-left: 10px solid {{{border|#e1d2b3}}};}}"><!--
{{#if:{{{image|}}}|[[File:{{{image}}}|{{{image-size|50px}}}|link=|alt={{{image|}}}]]|}}
-->{{#if:{{{image|}}}|[[File:{{{image}}}|{{{image-size|50px}}}|link=|alt={{{image|}}}]]|}}
<div style="display: block; margin-left: 15px;">
<div style="display: block; margin-left: 15px;">
{{#if:{{{quote|}}}|<div style="font-size: 90%; font-weight: bold; font-style: italic;">“{{{quote}}}”</div>}}<!--
{{#if:{{{quote|}}}|<div style="font-size: 90%; font-weight: bold; font-style: italic;">“{{{quote}}}”</div>}}<!--

Revision as of 20:07, 11 April 2026

Template documentation [view] [edit] [history] [purge]

Usage

This template is used to create message boxes for articles. It should be used as a meta template to build other message box templates, but it can be used standalone. For a list of related templates, see Category:Message box templates.

Example

{{Message box
| image   = Bebop MM.png
| notice  = Primary notice text.
| notice2 = Secondary notice text.
| notes   = Additional notes.
}}
Bebop MM.png
Primary notice text.
Secondary notice text.
Notes: Additional notes.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
borderborder

Hex color for the left border.

Suggested values
none
Default
#e1d2b3
Stringoptional
imageimage

Image to be displayed.

Fileoptional
quotequote

Character quote.

Contentoptional
noticenotice

Primary notice text.

Contentrequired
notice2notice2

Secondary notice text.

Contentoptional
notesnotes

Additional notes.

Contentoptional
image-sizeimage-size

Size for the image.

Default
50px
Stringoptional