×
Create a new article
Write your page title here:
We currently have 3,089 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
3,089Articles

Template:ProgressBar: Difference between revisions

(change background-color to background)
(use darker blue color)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<div style="width:100%;" class="{{{class|}}}">
<div style="max-width:500px;" class="{{{class|}}}">
<div>{{{1|46}}} / {{{2|200}}} ({{#expr: ({{{1|46}}} / {{{2|200}}}) * 100 round 0 }}%)</div>
<div>{{{1|46}}} / {{{2|200}}} ({{#expr: ({{{1|46}}} / {{{2|200}}}) * 100 round 0 }}%)</div>
<div style="background-color:none; width:100%; height:{{{height|2em}}}; border:1px black solid; box-sizing:border-box;>
<div style="background-color:none; width:100%; height:{{{height|2em}}}; border:1px black solid; box-sizing:border-box;>
<div style="background:{{{color|cyan}}}; height:100%; border-right:1px black solid; box-sizing:border-box; width:{{#expr: ({{{1|46}}} / {{{2|200}}}) * 100 round 0 }}%" class="{{{bar_class|}}}">
<div style="background:{{{color|#36c}}}; height:100%; border-right:1px black solid; box-sizing:border-box; width:{{#expr: ({{{1|46}}} / {{{2|200}}}) * 100 round 0 }}%" class="{{{bar_class|}}}">
</div></div>
</div></div>
</div><noinclude>
</div><noinclude>
Line 32: Line 32:
"type": "string",
"type": "string",
"description": "Customise the color of the bar.",
"description": "Customise the color of the bar.",
"default": "cyan"
"default": "#36c"
},
},
"class": {
"class": {

Latest revision as of 01:41, 19 December 2024

46 / 200 (23%)

Shows a progress bar, comparing one value to a total.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
1st value1

The first value.

Numberrequired
Total2

The total.

Numberrequired
Heightheight

Customise the height of the bar.

Default
2em
Stringoptional
Bar colorcolor

Customise the color of the bar.

Default
#36c
Stringoptional
CSS classclass

Add CSS classes to the main div containing all parts of the bar, including the preceding number label.

Stringoptional
Bar CSS classbar_class

Add CSS classes to the colored part of the bar.

Stringoptional