Template:Messagebox/doc: Difference between revisions

From Vintage Story Wiki
m (replace the messagebox category with notice templates)
m (We don't use forums for recruiting anymore.)
 
Line 69: Line 69:
|title=This page is a stub.
|title=This page is a stub.
|text=This page does not contain as much information as we would like.
|text=This page does not contain as much information as we would like.
If you do wish to contribute, please request wiki edit access on the [https://www.vintagestory.at/forums/topic/267-wiki-discussion/ forum] or the [https://discord.gg/Tndr3w8 Discord].
If you do wish to contribute, please request wiki edit access on the [https://discord.gg/Tndr3w8 Discord].
|image=Icon Sign.png
|image=Icon Sign.png
|imagesize=64px}}</pre>
|imagesize=64px}}</pre>
Line 76: Line 76:
|title=This page is a stub.
|title=This page is a stub.
|text=This page does not contain as much information as we would like.
|text=This page does not contain as much information as we would like.
If you do wish to contribute, please request wiki edit access on the [https://www.vintagestory.at/forums/topic/267-wiki-discussion/ forum] or the [https://discord.gg/Tndr3w8 Discord].
If you do wish to contribute, please request wiki edit access on the [https://discord.gg/Tndr3w8 Discord].
|image=Icon Sign.png
|image=Icon Sign.png
|imagesize=64px}}
|imagesize=64px}}

Latest revision as of 02:30, 15 June 2024

This template produces a wide message box capable of displaying various amounts of information in both its' title and body text along with an optional image. Generally used as a top-of-page notification informing the reader of the pages' or subject of interests' condition.

This is the base template that all other message box templates should inherit from, as it allows for cascading style changes i.e. any CSS changes made here will affect all children templates, preventing excessive work when a change is needed. It should generally only be used for making new templates, unless a single article has an edge case use for it.

Category:Notice_templates shows all notice templates.

Usage

{{Messagebox
|bgcol= The background color
|linecol= The border line color
|mini= If the template is miniature
|width= The width of the template relative to the article
|image= An image to display on the left
|imagesize= The size of the image
|title= The title to display
|text= The text to display
|discuss= If a talk link should be appended to the title
|css= Any supplemental CSS to apply to the main div
}}
Parameters Description Type Required
bgcol The color for the background string no
line col The color of the border string no
mini If the template should switch to mini mode boolean no
width The width in % of the template relative to the article string no
image The image to show on the left side of the message box file no
imagesize The size of the image to display string no
title Text to display as a title, above the body text content suggested
text Text to display in the body text, below the title content suggested
discuss If Template:Discuss should be appended to the title boolean no
css Extra CSS to apply to the message box's main body string no

Examples

Code Result
{{Messagebox
|image= Grid_Copper_anvil.png
|title= This is a message box!
|text= With some descriptive text added as a subtitle
|discuss= true
}}
Grid Copper anvil.png

This is a message box![discuss]
With some descriptive text added as a subtitle

{{Messagebox
|bgcol= rgba(120,90,60,0.4)
|title=This page is a stub.
|text=This page does not contain as much information as we would like.
If you do wish to contribute, please request wiki edit access on the [https://discord.gg/Tndr3w8 Discord].
|image=Icon Sign.png
|imagesize=64px}}
Icon Sign.png

This page is a stub.
This page does not contain as much information as we would like. If you do wish to contribute, please request wiki edit access on the Discord.

{{Messagebox
|bgcol= #cccccc
|linecol= #88acf5
|text= This is a mini message box, complete with some extra CSS.
|mini= true
|css= box-shadow: 5px 5px 1px #787878;
}}

This is a mini message box, complete with some extra CSS.