Template:Ambox

From Overwatch Wiki
Jump to: navigation, search
Template-info.png Documentation

An article message box, or ambox, can be added to notify users of specific messages regarding the article. The {{cleanup}} template is an example of an ambox.

Usage

{{Ambox
| color = 
| image = 
| sound = 
| quote = 
| subject = 
| optional = 
| footnote = 
}}

Example

This can be used literally everywhere, but in most cases serves maintenance.

Quote here
This message serves as example.
This is optimal supplementary text.
Value information what to do now. For example improve the documentation.
{{Ambox
| color = orange
| image = 
| sound = 
| quote = Quote here
| subject = This message serves as example.
| optional = This is optimal supplementary text.
| footnote = Value information what to do now. For example [[Template:Ambox/doc|improve]] the documentation.
}}

TemplateData

No description.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Colorcolor background

Defines the highlight color.

Example
#F3F3F3
Stringsuggested
Imageimage

Places an image on the left of the message box. Size is fixed to 56px.

Example
Imagefile.png
Filesuggested
Soundsound

A soundfile that fits the theme.

Example
Soundfile.mp3
Filesuggested
Quotequote

An Overwatch related quote that fits the theme.

Stringsuggested
Subjectsubject

The main topic this message is about.

Stringrequired
Optionaloptional

Some optional text that may or may not be used.

Stringsuggested
Footnotefootnote

Some space for a small sized foot note.

Stringsuggested


The template with site CSS instead of inline CSS:
<div class="ambox" style="{{#if:{{{width|}}}|max-width: {{{width|}}};}} border-left: 10px solid {{{color|{{{background|}}}}}}; margin: auto;">
{{#if:{{{image|}}}|<div class="ambox-image">[[File:{{{image}}}|56x56px]]</div>}}
<div class="ambox-content">
{{#if:{{{sound|}}}{{{quote|}}}|<div class="ambox-quote">{{#if:{{{sound|}}}|<sm2>{{{sound}}}</sm2> }}{{#if:{{{quote|}}}|<q>{{{quote}}}</q>}}</div>}}
<div class="ambox-subject">{{{subject|}}}</div>
<div class="ambox-optional">{{{optional|}}}</div>
<div class="ambox-footnote">{{{footnote|}}}</div>
</div>
</div>

Site CSS:
/*
* Ambox styles ([[Template:Ambox]])
*/

.ambox {
    width: 80%;
    display: flex;
    align-items: center;
    margin: 0 auto 2px auto;
    padding: 0.5em;
    background-color: rgba(8,27,43,0.9)
    border-left: 10px solid #eeeeee;
    font-size: 95%;
}

.ambox-image {
    padding-right: 0.5em;
    width: 56px;
    text-align: center;
}

.ambox-quote {
    font-style: italic;
}

.ambox-subject {
    font-weight: bold;
}

.ambox-quote,
.ambox-footnote {
    font-size: 85%;
}