Template:Ambox: Difference between revisions

From SimRail Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
/* {{pp|small=y}} */
<includeonly>{{Languages|Template:Ambox}}</includeonly>
.ambox {
{{Mbox templates}}
border: 1px solid #a2a9b1;
{{Documentation subpage}}
/* @noflip */
{{High-use|8000}}
border-left: 10px solid #36c;  /* Default "notice" blue */
{{Lua|Module:Message box{{\sandbox}}}}
background-color: #fbfbfb;
box-sizing: border-box;
}
 
/* Single border between stacked boxes. Take into account base templatestyles,
* user styles, and Template:Dated maintenance category.
* remove link selector when T200206 is fixed
*/
.ambox + link + .ambox,
.ambox + link + style + .ambox,
.ambox + link + link + .ambox,
/* TODO: raise these as "is this really that necessary???". the change was Dec 2021 */
.ambox + .mw-empty-elt + link + .ambox,
.ambox + .mw-empty-elt + link + style + .ambox,
.ambox + .mw-empty-elt + link + link + .ambox {
margin-top: -1px;
}
 
/* For the "small=left" option. */
/* must override .ambox + .ambox styles above */
html body.mediawiki .ambox.mbox-small-left {
/* @noflip */
margin: 4px 1em 4px 0;
overflow: hidden;
width: 238px;
border-collapse: collapse;
font-size: 88%;
line-height: 1.25em;
}
 
.ambox-speedy {
/* @noflip */
border-left: 10px solid #b32424;    /* Red */
background-color: #fee7e6;          /* Pink */
}


.ambox-delete {
This is the {{Tl|Ambox}} or '''Article message box''' meta-template.
/* @noflip */
border-left: 10px solid #b32424;    /* Red */
}


.ambox-content {
MobileFrontend will treat this template as a page issue. If you don't want that MobileFrontend does so, you may use a different message box template. See also [[Reading/Web/Projects/Mobile Page Issues|this page]].
/* @noflip */
border-left: 10px solid #f28500;    /* Orange */
}


.ambox-style {
== Parameters ==
/* @noflip */
=== <code>type</code> ===
border-left: 10px solid #fc3;      /* Yellow */
The <code>type</code> parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below.
}
{{Ambox{{\sandbox}}
| nocat = true
| type  = speedy
| text  = type=<u>speedy</u> — Speedy deletion issues, such as {{tl|speedy}}.
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = delete
| text  = type=<u>delete</u> — Deletion issues, such as {{tl|delete}}.
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = content
| text  = type=<u>content</u> — Content issues, such as {{tl|Update}} and {{tl|Expand}}.
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = style
| text  = type=<u>style</u> — Style issues, such as {{tl|cleanup}} and {{tl|Documentation needed}}.
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = notice
| text  = type=<u>notice</u> — Notices, such as {{tl|Extension exception}} and {{tl|Translating}}.
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = move
| text  = type=<u>move</u> — Merge, split and transwiki proposals, such as {{tl|Merge}} and {{tl|Move to Commons}}.
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = protection
| text  = type=<u>protection</u> — Protection notices, such as {{tl|Pp-cascading}} and {{tl|protectedinterface}}.
}}


.ambox-move {
If no <code>type</code> parameter is given the template defaults to {{para|type|notice}}.
/* @noflip */
border-left: 10px solid #9932cc;    /* Purple */
}


.ambox-protection {
=== <code>small=left</code> ===
/* @noflip */
{{Ambox{{\sandbox}}
border-left: 10px solid #a2a9b1;    /* Gray-gold */
| nocat = true
}
| type  = speedy
| text  = type=<u>speedy</u> — Speedy deletion issues, such as {{tl|speedy}}.
| small = left
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = delete
| text  = type=<u>delete</u> — Deletion issues, such as {{tl|delete}}.
| small = left
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = content
| text  = type=<u>content</u> — Content issues, such as {{tl|Update}} and {{tl|Expand}}.
| small = left
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = style
| text  = type=<u>style</u> — Style issues, such as {{tl|cleanup}} and {{tl|Documentation needed}}.
| small = left
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = notice
| text  = type=<u>notice</u> — Notices, such as {{tl|Extension exception}} and {{tl|Translating}}.
| small = left
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = move
| text  = type=<u>move</u> — Merge, split and transwiki proposals, such as {{tl|Merge}} and {{tl|Move to Commons}}.
| small = left
}}
{{Ambox{{\sandbox}}
| nocat = true
| type  = protection
| text  = type=<u>protection</u> — Protection notices, such as {{tl|Pp-cascading}} and {{tl|protectedinterface}}.
| small = left
}}


.ambox .mbox-text {
== See also ==
border: none;
{{Mbox templates}}
/* @noflip */
Other pages:
padding: 0.25em 0.5em;
* [[w:Template:Mbox]]
width: 100%;
* [[w:Wikipedia:Ambox CSS classes]] — Describes how to use the ambox CSS classes directly in [[Help:Table|wikitable]]s and [[w:HTML element#Tables|HTML tables]].
}
* [[w:Wikipedia:Article message boxes]] — The style guideline for creating article message boxes.
 
* [[w:Wikipedia talk:Article message boxes]] — For discussion about these matters.
.ambox .mbox-image {
border: none;
/* @noflip */
padding: 2px 0 2px 0.5em;
text-align: center;
}
 
.ambox .mbox-imageright {
border: none;
/* @noflip */
padding: 2px 0.5em 2px 0;
text-align: center;
}
 
/* An empty narrow cell */
.ambox .mbox-empty-cell {
border: none;
padding: 0;
width: 1px;
}
 
.ambox .mbox-image-div {
width: 52px;
}
 
/* Hack around MobileFrontend being opinionated */
html.client-js body.skin-minerva .mbox-text-span {
margin-left: 23px !important;
}


@media (min-width: 720px) {
== TemplateData ==
.ambox {
<!--{{TemplateData header}}-->
margin: 0 10%;                  /* 10% = Will not overlap with other elements */
{{Mbox/TemplateData}}
<!--templatedata>
{
"params": {
"type": {
"type": "line",
"suggestedvalues": [
"speedy",
"delete",
"content",
"style",
"notice",
"move",
"protection"
]
},
"text": {
"type": "string",
"suggested": true
}
},
"description": {
"en": "This is a generic article message box.",
"cs": "Toto je obecné okno se zprávou článku."
}
}
}
}
</templatedata-->
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Mbox templates{{#translation:}}]]
}}</includeonly>

Revision as of 14:26, 17 April 2023

Template:Mbox templates Template:Documentation subpage Template:High-use Template:Lua

This is the Template:Tl or Article message box meta-template.

MobileFrontend will treat this template as a page issue. If you don't want that MobileFrontend does so, you may use a different message box template. See also this page.

Parameters

type

The type parameter defines the colour of the left bar, and the image that is used by default. The type is chosen not on aesthetics but is based on the type of issue that the template describes. The seven available types and their default images are shown below. {{AmboxTemplate:\sandbox | nocat = true | type = speedy | text = type=speedy — Speedy deletion issues, such as Template:tl. }} {{AmboxTemplate:\sandbox | nocat = true | type = delete | text = type=delete — Deletion issues, such as Template:tl. }} {{AmboxTemplate:\sandbox | nocat = true | type = content | text = type=content — Content issues, such as Template:tl and Template:tl. }} {{AmboxTemplate:\sandbox | nocat = true | type = style | text = type=style — Style issues, such as Template:tl and Template:tl. }} {{AmboxTemplate:\sandbox | nocat = true | type = notice | text = type=notice — Notices, such as Template:tl and Template:tl. }} {{AmboxTemplate:\sandbox | nocat = true | type = move | text = type=move — Merge, split and transwiki proposals, such as Template:tl and Template:tl. }} {{AmboxTemplate:\sandbox | nocat = true | type = protection | text = type=protection — Protection notices, such as Template:tl and Template:tl. }}

If no type parameter is given the template defaults to Template:para.

small=left

{{AmboxTemplate:\sandbox | nocat = true | type = speedy | text = type=speedy — Speedy deletion issues, such as Template:tl. | small = left }} {{AmboxTemplate:\sandbox | nocat = true | type = delete | text = type=delete — Deletion issues, such as Template:tl. | small = left }} {{AmboxTemplate:\sandbox | nocat = true | type = content | text = type=content — Content issues, such as Template:tl and Template:tl. | small = left }} {{AmboxTemplate:\sandbox | nocat = true | type = style | text = type=style — Style issues, such as Template:tl and Template:tl. | small = left }} {{AmboxTemplate:\sandbox | nocat = true | type = notice | text = type=notice — Notices, such as Template:tl and Template:tl. | small = left }} {{AmboxTemplate:\sandbox | nocat = true | type = move | text = type=move — Merge, split and transwiki proposals, such as Template:tl and Template:tl. | small = left }} {{AmboxTemplate:\sandbox | nocat = true | type = protection | text = type=protection — Protection notices, such as Template:tl and Template:tl. | small = left }}

See also

Template:Mbox templates Other pages:

TemplateData

Template:Mbox/TemplateData