Template:Infobox game mode: Difference between revisions

Template: infobox game mode
 
TeamSpec theme: colours move from inline styles to MediaWiki:Common.css classes
 
(3 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{| style="float:right;clear:right;width:300px;margin:0 0 12px 16px;border:1px solid #a2a9b1;background:#f8f9fa;color:#202122;font-size:90%;border-collapse:collapse;"
<includeonly>{| class="ts-infobox" style="float:right;clear:right;width:300px;max-width:100%;box-sizing:border-box;margin:0 0 12px 16px;font-size:90%;border-collapse:collapse;"
|-
|-
! colspan="2" style="background:#f3ecdc;padding:6px;font-size:115%;text-align:center;" | {{{name|{{PAGENAME}}}}}
! class="ts-infobox-title" colspan="2" style="padding:6px;font-size:115%;text-align:center;" | {{{name|{{PAGENAME}}}}}
{{#if:{{{image|}}}|
{{!}}-
{{!}} class="ts-infobox-image" colspan="2" style="padding:8px;text-align:center;" {{!}} [[File:{{{image}}}|250px|{{{name|{{PAGENAME}}}}}]]
}}
{{#if:{{{goal|}}}|
{{#if:{{{goal|}}}|
{{!}}-
{{!}}-
Line 7: Line 11:
{{!}} style="padding:4px 6px;" {{!}} {{{goal}}}
{{!}} style="padding:4px 6px;" {{!}} {{{goal}}}
}}
}}
{{#if:{{{teams|}}}|
{{#if:{{{prefix|}}}|
{{!}}-
{{!}} style="padding:4px 6px;vertical-align:top;font-weight:bold;width:40%;" {{!}} Teams
{{!}} style="padding:4px 6px;" {{!}} {{{teams}}}
}}
{{#if:{{{time|}}}|
{{!}}-
{{!}}-
{{!}} style="padding:4px 6px;vertical-align:top;font-weight:bold;width:40%;" {{!}} Time limit
{{!}} style="padding:4px 6px;vertical-align:top;font-weight:bold;width:40%;" {{!}} Map prefix
{{!}} style="padding:4px 6px;" {{!}} {{{time}}}
{{!}} style="padding:4px 6px;" {{!}} <code>{{{prefix}}}</code>
}}
}}
{{#if:{{{maps|}}}|
{{#if:{{{maps|}}}|
Line 23: Line 22:
}}
}}
|}</includeonly><noinclude>
|}</includeonly><noinclude>
The box at the top right of every game mode page.
The box at the top right of every game mode page. A game mode page holds only the mode's general rules; teams, time limits and other numbers belong to each map and go in [[Template:Infobox map]].


== Usage ==
== Usage ==
Line 30: Line 29:
| name = Payload
| name = Payload
| goal = Push the cart to the end of the track
| goal = Push the cart to the end of the track
| prefix = pl_
| maps = [[Kraken Pier]]
| maps = [[Kraken Pier]]
}}
}}
Line 36: Line 36:
== Parameters ==
== Parameters ==
* <code>name</code>: the title. Defaults to the page name.
* <code>name</code>: the title. Defaults to the page name.
* <code>goal</code>: goal
* <code>goal</code>: what a team plays for, in general terms.
* <code>teams</code>: teams
* <code>prefix</code>: the start of the file name of every map in this mode.
* <code>time</code>: time limit
* <code>maps</code>: maps that play this mode.
* <code>maps</code>: maps


Every parameter is optional; empty ones are left out. Needs the ParserFunctions extension for <code>#if</code>.
Every parameter is optional; empty ones are left out. Needs the ParserFunctions extension for <code>#if</code>.