Template:Message box: Difference between revisions

m (FantasyTeddy moved page Template:Msgbox to Template:Message box)
No edit summary
 
Line 1: Line 1:
<includeonly>
<includeonly><div class="alert {{{class|}}}" style="background-color: {{{bgcol|#D9EDF7}}}; border-color: {{{linecol|#BCE8F1}}}; color: {{{textcol|#3A87AD}}}; {{{css|}}}">{{#if: {{{icon|}}} | <div class="icon-{{{icon|}}} icon-2x" style="vertical-align: middle; padding-right: 10px;"></div>}}<div style="vertical-align: middle; display: inline-block;">{{#if: {{{title|}}} | '''{{{title}}}'''<br />}}{{{text}}}</div></div>{{#if: {{{nocat|}}} || {{#ifeq: {{NAMESPACE}} | Template | [[Category:Notice templates|{{BASEPAGENAME}}]] }} }}</includeonly><noinclude>
<div class="alert {{ #if: {{{type|}}} | {{#switch: {{{type}}} | danger = alert-danger | error = alert-danger | success = alert-success | warning = alert-warning|info = alert-info}} | alert-info }}">{{{text}}}</div><!--
--></includeonly><noinclude>[[Category:Notice templates|{{BASEPAGENAME}}]]
{{documentation}}</noinclude>
{{documentation}}</noinclude>

Latest revision as of 16:14, 1 August 2015

[view | edit | history | purge]Documentation
Shortcut
msgbox

This template is used to add consistent styling to message boxes.

Basic usage

{{msgbox
| title = This is a normal message box
| text = With helpful and descriptive subtext
}}

Will result in:

This is a normal message box
With helpful and descriptive subtext


An icon can be added to indicate the type of the message:

{{msgbox
| icon = info-sign
| text = This is a message box with an information icon
}}

Will result in:

This is a message box with an information icon

The Font Awesome Icons are used here (without the icon- prefix).

Advanced usage

{{msgbox
| bgcol = #eef
| linecol = #ddf
| textcol = #336
| icon = flag
| title = This is a purple message box
| text = It is customized with some extra CSS
| css = box-shadow: 0px 0px 6px #888;
}}

Will result in:

This is a purple message box
It is customized with some extra CSS

Category

This template automatically adds templates that use it to Category:Notice templates. To prevent that, simply set the parameter {{{nocat}}}

[view | edit | history | purge]The above documentation is transcluded from Template:Message box/doc.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Need wiki hosting?

Do you need a wiki for your Minecraft mod/gaming wiki? We'll host it for free! Contact us.

Other wikis

Indie-game wikis
Powered by Indie Wikis