You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.

Template:WDL-Bar

From MafiaWiki
Revision as of 00:24, 13 January 2022 by ProgoWoshua (talk | contribs) (Created page with "<includeonly>{| cellpadding="0" cellspacing="0" width="{{{size|250px}}}" {{#if {{{style}}} | style="{{{style}}}" }} | {| cellspacing="0" width="100%" {{#if: {{{caption|}}} | {...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
Name:
  • WDL-Bar
Type:
Sub-Template:
  • No
Designer:

Creates a percentage bar comparing the given numbers of wins, draws and losses. Like this:

Wins, Draws and Losses:
W:7 D:1 L:2

Syntax

{{WDL-Bar
| caption=
| wins=
| draws=
| losses=
| captioncolor=
| wincolor=
| drawcolor=
| losscolor=
| size=
| style=
}}

Parameters

{{{caption}}}

Will be displayed above the bar. Optional.

{{{wins}}}

Defines the number of wins. Defaults to 0.

{{{draws}}}

Defines the number of draws. Defaults to 0.

{{{losses}}}

Defines the number of losses. Defaults to 0.

{{{captioncolor}}}

Changes the color or the caption if there is one. Defaults to #000.

{{{wincolor}}}

Changes the color that represents the wins. Defaults to #0f0.

{{{drawcolor}}}

Changes the color that represents the draws. Defaults to #00f.

{{{losscolor}}}

Changes the color that represents the losses. Defaults to #f00.

{{{size}}}

Changes the width of the bar. Can be in pixels (px) or percentage of space (%). Defaults to 250px.

{{{style}}}

Sets the attribute style for the entire table, allowing for greater customization. Optional.

Examples

{{WDL-Bar}}
W:0 D:0 L:0
{{WDL-Bar
| wins=1
}}
W:1 D:0 L:0
{{WDL-Bar
| wins=9
| losses=2
}}
W:9 D:0 L:2
{{WDL-Bar
| wins=10
| draws=3
| losses=7
}}
W:10 D:3 L:7
{{WDL-Bar
| caption='''Wins, Draws and Losses:'''
| wins=10
| draws=3
| losses=7
}}
Wins, Draws and Losses:
W:10 D:3 L:7
{{WDL-Bar
| caption='''Wins, Draws and Losses:'''
| wins=10
| draws=3
| losses=7
| captioncolor=#005
| wincolor=#0ff
| drawcolor=#ff0
| losscolor=#f0f
}}
Wins, Draws and Losses:
W:10 D:3 L:7
{{WDL-Bar
| caption='''Wins, Draws and Losses:'''
| wins=10
| draws=3
| losses=7
| size=500px
}}
Wins, Draws and Losses:
W:10 D:3 L:7
{{WDL-Bar
| caption='''Wins, Draws and Losses:'''
| wins=10
| draws=3
| losses=7
| size=50%
}}
Wins, Draws and Losses:
W:10 D:3 L:7
{{WDL-Bar
| caption='''Wins, Draws and Losses:'''
| wins=10
| draws=3
| losses=7
| size=50%
| style=padding: 5px 5px 5px 5px; background:#ddd; border-style: solid; border-width: 2px; border-color:#000; margin: auto;
}}
Wins, Draws and Losses:
W:10 D:3 L:7