Template:Banner: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(Internal = branch; External = channel.)
No edit summary
 
(36 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<div style="height: 50px; background: {{{bgcolor}}};">
<div style="clear: both; display: flex; flex-flow: row nowrap; justify-content: space-between; max-width: 100%; height: 50px; background-color: {{{bgcolor|#CCC}}}; color: {{{color|black}}}; font-size: 90%; font-weight: bold;">
<div style="float: left; width: 50%;">[[File:{{{logo}}}]]</div>
<div style="float: left; order: 1; flex: 2 0; width: 34%; min-width: 200px;">{{#if:{{{logo|}}}|[[File:{{{logo}}}|link=]]|<span style="display: inline-block; width: 200px; height: 50px;">&nbsp;</span>}}</div>
<div style="float: left; width: 50%; padding: 5px 0px 0px 0px; font-size: 90%; font-weight: bold; color: {{{color}}};">{{#ifeq:{{{type|merge}}}|release|Released on {{{release_date}}}|{{#if:{{{current_channel|}}}|Currently in {{{current_channel}}} channel<br />|}}Moves to {{{next_channel|another}}} channel {{#if:{{{merge_date|}}}|on {{{merge_date}}}|{{#if:{{{merge_week|}}}|during week of {{{merge_week}}}|next}}}}}}</div>
<div style="float: left; order: 2; flex: 1; width: 22%; padding: 5px 0px 0px 30px;">{{#if:{{{product|}}}|{{{product}}}{{#if:{{{version|}}}|&nbsp;{{{version}}}|}}<br />|}}{{#if:{{{gecko|}}}|Based on Gecko&nbsp;{{{gecko}}}<br />|}}</div>
</div>
<div style="float: right; order: 3; flex: 1; width: 35%; padding: 5px 0px 0px 0px;">{{#ifeq:{{{type|merge}}}|release|Released on {{{release_date}}}|{{#if:{{{current_channel|}}}|Currently in {{{current_channel}}} channel<br />|}}{{#if:{{{merge_date|}}}{{{merge_week|}}}|Moves to {{{next_channel|another}}} {{#if:{{{merge_date|}}}|on {{{merge_date}}}|{{#if:{{{merge_week|}}}| week of {{{merge_week}}}|next}}}}}}}}</div>
</div><noinclude>
{{documentation}}
<!-- Add categories to the /doc subpage, not here! -->
</noinclude>

Latest revision as of 23:41, 5 August 2015

 
Documentation icon Template documentation[view] [edit] [history] [purge]

Usage

Mozilla product banner
templates
FIREFOX
{{FxBanner}} (base)
{{FxBannerRelease}}
{{FxBannerBeta}}
{{FxBannerAurora}}
{{FxBannerNightly}}
FIREFOX OS
{{FxOSBanner}} (base)
{{FxOSBannerRelease}}
{{FxOSBannerBeta}}
{{FxOSBannerAurora}}
{{FxOSBannerNightly}}
SEAMONKEY
{{SMBanner}} (base)
{{SMBannerRelease}}
{{SMBannerBeta}}
{{SMBannerAurora}}
{{SMBannerNightly}}
THUNDERBIRD
{{TbBanner}} (base)
{{TbBannerRelease}}
{{TbBannerBeta}}
{{TbBannerAurora}}
{{TbBannerNightly}}

{{banner}} is a metatemplate for creating banner template bases, that in turn can be used to create banner templates informing on official Mozilla product releases. See the list of templates to the right for existing banner templates based on this metatemplate.

Stop (medium size).png
Look for existing product banner templates first!
Don't use this template unless you are making a banner base template for a Mozilla product which doesn't yet have a release banner of it own, and you explicitly have been given that assignment by a team leader for that product. See the list to the right for existing product banner templates. If you just wish to create a message box, go to #See also for template alternatives.

Parameters

There are 13 parameters in total, all named and none of which is required for the template to work.

List of parameters
Template parameters
Element Parameter Description Default value
Box bgcolor Background colour #ccc
color Text colour black
Image logo Product logotype null
Text product Mozilla product null
version Product version null
gecko Gecko version null
type Product release type merge
release_date Release date null
merge_date Date of merging null
merge_week Week of merging null
current_channel Current channel in the development chain null
next_channel Next channel in the development chain another

Syntax

The template's syntax is

{{banner|bgcolor= |color= |logo= |product= |version= |gecko= |type= |release_date= |current_channel= |merge_date= |merge_week= |next_channel= }}

When creating a new product banner base, you should include all relevant parameters, even those you may not need to use for the base template itself. You might need the extra options in subsequent templates.

See also

  • {{admon}}: four messagebox templates for four different message types.
    1. {{admon/caution}}
    2. {{admon/important}}
    3. {{admon/note}}
    4. {{admon/tip}}
  • {{message}}: base template for creating a custom message box.
  • {{message/box}}: a more complex, but also more versatile version of {{message}}.
  • {{label}}: for important information. Use with caution!
  • {{warning}}: for warning messages. Use with caution!
  • {{blackboxwarning}}: for extremely important warning messages. Use only if absolutely necessary!