Difference between revisions of "Template:LeagueTableSlot"

From QWiki
m
m (Increasing height of each row to 35px (was 31))
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<includeonly>|-{{#if: {{{bg|}}}|style="background-color:{{Color|{{{bg}}}}};"|}}
 
<includeonly>|-{{#if: {{{bg|}}}|style="background-color:{{Color|{{{bg}}}}};"|}}
 
!style="width: 16px;{{#if: {{{pbg|}}}| background-color:{{Color|{{{pbg}}}}};|}}"|{{{place|X}}}. <!-- show place number in header cell -->
 
!style="width: 16px;{{#if: {{{pbg|}}}| background-color:{{Color|{{{pbg}}}}};|}}"|{{{place|X}}}. <!-- show place number in header cell -->
| colspan="2" style="text-align:{{{align|left}}};{{#if: {{{bg|}}}|background-color:{{Color|{{{bg}}}}};|}}"| {{{1}}} <!-- show the player name with the correct colspan -->
+
| colspan="2" style="height:35px;padding-left:12px;text-align:{{{align|left}}};{{#if: {{{bg|}}}|background-color:{{Color|{{{bg}}}}};|}}"| {{{1}}} <!-- show the player name with the correct colspan -->
{{#if: {{{win_m|0}}} <!-- Count total games played -->
+
|style="width: 1em;"|{{#iferror:{{#expr: {{{win_m|0}}}+{{{lose_m|0}}}}}|}}
    |{{!}}style="width: 1em;"{{!}}{{#expr: {{{win_m|0}}}+{{{lose_m|0}}}}}}}
 
 
|style="width: 35px; text-align:center;"|{{{win_m|0}}}
 
|style="width: 35px; text-align:center;"|{{{win_m|0}}}
 
|style="width: 35px; white-space: pre; text-align:center;"|{{{lose_m|0}}}
 
|style="width: 35px; white-space: pre; text-align:center;"|{{{lose_m|0}}}
 
|style="width: 35px; white-space: pre; text-align:center;"|{{{win_g|0}}}
 
|style="width: 35px; white-space: pre; text-align:center;"|{{{win_g|0}}}
 
|style="width: 35px; white-space: pre; text-align:center;"|{{{lose_g|0}}}
 
|style="width: 35px; white-space: pre; text-align:center;"|{{{lose_g|0}}}
|style="white-space: pre;text-align:center;"|{{{win_f|0}}}
+
|style="width: 35px; white-space: pre;text-align:center;"|{{{win_f|0}}}
|style="white-space: pre;text-align:center;"|{{{lose_f|0}}}
+
|style="width: 35px; white-space: pre;text-align:center;"|{{{lose_f|0}}}
|style="white-space: pre;text-align:center;"|{{#expr: {{{win_f|0|0}}}-{{{lose_f|0|0}}}}}
+
|style="width: 35px; white-space: pre;text-align:center;"|{{#iferror:{{#expr: {{{win_f|}}}-{{{lose_f|}}}}}|}}
|style="width: 32px; white-space: pre; text-align:center;"|'''<i>{{#iferror:{{#expr:{{{win_m|}}}+{{{win_g|}}}}}|0|}}</i>'''
+
|style="width: 32px; white-space: pre; text-align:center;"|'''<i>{{#iferror:{{#expr:{{{win_m|}}}+{{{lose_m|}}}+{{{win_g|}}}}}|}}</i>'''
 
</includeonly><noinclude>{{documentation}}[[Category:Templates]]</noinclude>
 
</includeonly><noinclude>{{documentation}}[[Category:Templates]]</noinclude>

Latest revision as of 09:26, 9 April 2021

Documentation (view - edit)

This template is for a row inside a group table. It is used together with the templates {{LeagueTableStart}} and {{LeagueTableEnd}}

Parameters

The following parameters can be used in this template

first parameter
The first parameter in this template (technically the {{{1}}} field) is used as the team name. This can be even a template call like Europe Slackers.
|place=...
(optional) The place number to shown. If this parameter is not set the value X is used.
|bg=...
(optional) The background color for the slot. This can be every CSS color values, but the following color names has been added to the template for easy use:
|bg=proceed
|bg=up
Use a light green background to indicate that this position is a proceeding place inside the group.
|bg=drop
|bg=down
Use a light red background to indicate that this position will drop the team from the group.
|pbg=...
(optional) The background color for the place column. This can be every CSS color, but the following color names has been added to the template for easy use:
|pbg=proceed
|pbg=up
Use a light green background to indicate that this position is a proceeding place inside the group.
|pbg=drop
|pbg=down
Use a light red background to indicate that this position will drop the team from the group.
Show the given content instead.
|win_m=...
|lose_m=...
(optional) Specify the number of matches the team has won/lost. If not present the default value 0 is used.
|win_g=...
|lose_g=...
Specify the number of maps the team has won/lost (like in a Bo3 match). If not present no games score is shown.

Example

{{LeagueTableStart}}
{{LeagueTableSlot|Player/Team |place=1|win_m=5|lose_m=1|win_g=10|lose_g=4|win_f=445|lose_f=132|bg=up}}
{{LeagueTableEnd}}

This will result in the following group table:

# Team Games Maps Frags Points
Tot Won Lost Won Lost For Against Diff
1. Player/Team 6 5 1 10 4 445 132 313 16


Adapted from Liquipedia