Difference between revisions of "Template:Note"

From DFM Wiki
(Added heading for the admonition box.)
(Fix image pixel dimensions)
Tag: 2017 source edit
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div class="messagebox note" style="background-color: #f9f6b7; border: 1px solid #c4c295; color: black; padding: 5px; margin: 1ex 0; min-height: {{#expr:{{{imgwidth|40}}}+20}}px; padding-left: {{#expr:{{{imgwidth|40}}}+20}}px;">
+
<div class="messagebox note" style="display:table; background-color: {{{bgcolor|lightblue}}}; border: 1px solid {{{bordercolor|royalblue}}; color: black; margin: 1ex 0; min-height: {{#expr:{{{imgwidth|60}}}+20}}px; width:100%">
<div style="float:left; margin-left: -{{#expr:{{{imgwidth|40}}}+10}}px;">[[Image:{{{image|Idea.png}}}|{{{imgwidth|40}}}px|link=]]</div>
+
<div style="display:table-cell; width: {{#expr:{{{imgwidth|60}}}+20}}px; vertical-align:top;">[[Image:{{{image|Information icon.svg}}}|{{{imgwidth|60}}}px|link=]]</div>
<div><h4 style="margin:5px 0">{{{title|Note}}}</h4><p style="margin:5px 0">{{{text|Note}}}</p></div></div>
+
<div style="display:table-cell; vertical-align:middle; padding-left:1em; padding-right:1em;"><big><b>{{{title|Note}}}</b></big><BR>{{{text|Note}}}</div></div><noinclude>
<noinclude>
 
 
<templatedata>
 
<templatedata>
  
Line 10: Line 9:
 
"label": "image width",
 
"label": "image width",
 
"description": "the width of the image, in pixels",
 
"description": "the width of the image, in pixels",
"default": "40"
+
"default": "60"
 
},
 
},
 
"image": {
 
"image": {
 
"label": "image",
 
"label": "image",
"description": "An inline image (lightbulb by default)",
+
"description": "An inline image (information icon by default)",
"default": "Idea.png"
+
"default": "Information icon.svg"
 
},
 
},
 
"text": {
 
"text": {
Line 26: Line 25:
 
"type": "string",
 
"type": "string",
 
"suggested": true
 
"suggested": true
 +
},
 +
"bgcolor": {
 +
"label": "Background colour",
 +
"description": "Background colour for the info box. Use a CSS colour.",
 +
"default": "lightblue"
 +
},
 +
"bordercolor": {
 +
"label": "Border colour",
 +
"description": "Colour of the info box border. Use a CSS colour.",
 +
"default": "royalblue"
 
}
 
}
 
},
 
},

Latest revision as of 13:40, 29 November 2021

Information icon.svg
Note
Note

Template to add a box containing an image (lightbulb by default) and text note.

Template parameters

ParameterDescriptionTypeStatus
image widthimgwidth

the width of the image, in pixels

Default
60
Unknownoptional
imageimage

An inline image (information icon by default)

Default
Information icon.svg
Unknownoptional
Texttext

text of the note

Unknownrequired
Titletitle

Title to be printed at the top of the message box

Stringsuggested
Background colourbgcolor

Background colour for the info box. Use a CSS colour.

Default
lightblue
Unknownoptional
Border colourbordercolor

Colour of the info box border. Use a CSS colour.

Default
royalblue
Unknownoptional