You are viewing the MafiaScum.net Wiki. To play the game, visit the forum.
Template:WDL-Bar: Difference between revisions
Jump to navigation
Jump to search
ProgoWoshua (talk | contribs) (Created page with "<includeonly>{| cellpadding="0" cellspacing="0" width="{{{size|250px}}}" {{#if {{{style}}} | style="{{{style}}}" }} | {| cellspacing="0" width="100%" {{#if: {{{caption|}}} | {...") |
ProgoWoshua (talk | contribs) No edit summary |
||
Line 1: | Line 1: | ||
<includeonly>{| cellpadding="0" cellspacing="0" width="{{{size|250px}}}" {{#if {{{style}}} | style="{{{style}}}" }} | <includeonly>{| cellpadding="0" cellspacing="0" width="{{{size|250px}}}" {{#if {{{style}}} | style="{{#ifeq: {{{style}}} | basic | background:#eee; border-style: solid; border-width: 1px; border-color: #000; padding:5px; margin: 10px auto 10px auto; | {{{style}}} }}" }} | ||
| | | | ||
{| cellspacing="0" width="100%" | {| cellspacing="0" width="100%" | ||
Line 26: | Line 26: | ||
Creates a percentage bar comparing the given numbers of wins, draws and losses. Like this: | Creates a percentage bar comparing the given numbers of wins, draws and losses. Like this: | ||
{{WDL-Bar|caption='''Wins, Draws and Losses:'''|wins=7|draws=1|losses=2|style= | {{WDL-Bar|caption='''Wins, Draws and Losses:'''|wins=7|draws=1|losses=2|style=basic}} | ||
== Syntax == | == Syntax == | ||
Line 48: | Line 48: | ||
Will be displayed above the bar. Optional. | Will be displayed above the bar. Optional. | ||
=== {{{wins}}} === | === {{{wins}}}, {{{draws}}} and {{{losses}}} === | ||
Changes the values to be computed. All default to <code>0</code>. | |||
=== {{{captioncolor}}} === | === {{{captioncolor}}} === | ||
Line 64: | Line 56: | ||
Changes the color or the caption if there is one. Defaults to <code><span style="color:#000">#000</span></code>. | Changes the color or the caption if there is one. Defaults to <code><span style="color:#000">#000</span></code>. | ||
=== {{{wincolor}}} === | === {{{wincolor}}}, {{{drawcolor}}} and {{{losscolor}}} === | ||
Changes the color | Changes the color will represent the wins, draws and losses, respectivelly. The defaults are <code><span style="color:#0f0">#0f0</span></code> for wins, <code><span style="color:#00f">#00f</span></code> for draws and <code><span style="color:#f00">#f00</span></code> for losses. | ||
=== {{{size}}} === | === {{{size}}} === | ||
Line 82: | Line 66: | ||
=== {{{style}}} === | === {{{style}}} === | ||
If this is set to <code>basic</code>, it will give the box a basic formating. Otherwise, it sets the attribute <code>style="{{{style}}}"</code>, allowing for greater customization. Optional. | |||
== Examples == | == Examples == | ||
Line 159: | Line 143: | ||
| losses=7 | | losses=7 | ||
| size=50% | | size=50% | ||
| style=padding: 5px 5px 5px 5px; background:# | | style=basic | ||
}}</pre> | |||
{{WDL-Bar|caption='''Wins, Draws and Losses:'''|wins=10|draws=3|losses=7|size=50%|style=basic}} | |||
<pre>{{WDL-Bar | |||
| caption='''Wins, Draws and Losses:''' | |||
| wins=10 | |||
| draws=3 | |||
| losses=7 | |||
| size=50% | |||
| style=padding: 5px 5px 5px 5px; background:#ddf; border-style: solid; border-width: 5px; border-color:#004; margin: auto; | |||
}}</pre> | }}</pre> | ||
{{WDL-Bar|caption='''Wins, Draws and Losses:'''|wins=10|draws=3|losses=7|size=50%|style=padding: 5px 5px 5px 5px; background:# | {{WDL-Bar|caption='''Wins, Draws and Losses:'''|wins=10|draws=3|losses=7|size=50%|style=padding: 5px 5px 5px 5px; background:#ddf; border-style: solid; border-width: 5px; border-color:#004; margin: auto;}}</noinclude> |
Latest revision as of 02:53, 14 January 2022
|
Creates a percentage bar comparing the given numbers of wins, draws and losses. Like this:
|
||||
|
Syntax
{{WDL-Bar | caption= | wins= | draws= | losses= | captioncolor= | wincolor= | drawcolor= | losscolor= | size= | style= }}
Parameters
Will be displayed above the bar. Optional.
{{{wins}}}, {{{draws}}} and {{{losses}}}
Changes the values to be computed. All default to 0
.
Changes the color or the caption if there is one. Defaults to #000
.
{{{wincolor}}}, {{{drawcolor}}} and {{{losscolor}}}
Changes the color will represent the wins, draws and losses, respectivelly. The defaults are #0f0
for wins, #00f
for draws and #f00
for losses.
{{{size}}}
Changes the width of the bar. Can be in pixels (px
) or percentage of space (%
). Defaults to 250px
.
{{{style}}}
If this is set to basic
, it will give the box a basic formating. Otherwise, it sets the attribute style="{{{style}}}"
, allowing for greater customization. Optional.
Examples
{{WDL-Bar}}
|
||||
|
{{WDL-Bar | wins=1 }}
|
||||
|
{{WDL-Bar | wins=9 | losses=2 }}
|
||||
|
{{WDL-Bar | wins=10 | draws=3 | losses=7 }}
|
||||
|
{{WDL-Bar | caption='''Wins, Draws and Losses:''' | wins=10 | draws=3 | losses=7 }}
|
||||
|
{{WDL-Bar | caption='''Wins, Draws and Losses:''' | wins=10 | draws=3 | losses=7 | captioncolor=#005 | wincolor=#0ff | drawcolor=#ff0 | losscolor=#f0f }}
|
||||
|
{{WDL-Bar | caption='''Wins, Draws and Losses:''' | wins=10 | draws=3 | losses=7 | size=500px }}
|
||||
|
{{WDL-Bar | caption='''Wins, Draws and Losses:''' | wins=10 | draws=3 | losses=7 | size=50% }}
|
||||
|
{{WDL-Bar | caption='''Wins, Draws and Losses:''' | wins=10 | draws=3 | losses=7 | size=50% | style=basic }}
|
||||
|
{{WDL-Bar | caption='''Wins, Draws and Losses:''' | wins=10 | draws=3 | losses=7 | size=50% | style=padding: 5px 5px 5px 5px; background:#ddf; border-style: solid; border-width: 5px; border-color:#004; margin: auto; }}
|
||||
|