Template:Progress ring: Difference between revisions
mNo edit summary |
m (text background color change) |
||
Line 7: | Line 7: | ||
-->{{#vardefine:time|{{#rmatch:{{{anim-time|0.5}}}|^\d+\.?\d*$|$0}}}}<!-- |
-->{{#vardefine:time|{{#rmatch:{{{anim-time|0.5}}}|^\d+\.?\d*$|$0}}}}<!-- |
||
-->{{#vardefine:bColor|{{#rmatch:{{{background-color|#d6dadc}}}|^#(?:[0-9a-fA-F]{3}){1,2}${{!}}\D+|$0}}}}<!-- |
-->{{#vardefine:bColor|{{#rmatch:{{{background-color|#d6dadc}}}|^#(?:[0-9a-fA-F]{3}){1,2}${{!}}\D+|$0}}}}<!-- |
||
-->{{#vardefine:cColor|{{#rmatch:{{{center-color|# |
-->{{#vardefine:cColor|{{#rmatch:{{{center-color|#E0DCD4}}}|^#(?:[0-9a-fA-F]{3}){1,2}${{!}}\D+|$0}}}}<!-- |
||
-->{{#vardefine:tColor|{{#rmatch:{{{text-color|{{#var:color}}}}}|^#(?:[0-9a-fA-F]{3}){1,2}${{!}}\D+|$0}}}}<!-- |
-->{{#vardefine:tColor|{{#rmatch:{{{text-color|{{#var:color}}}}}|^#(?:[0-9a-fA-F]{3}){1,2}${{!}}\D+|$0}}}}<!-- |
||
--><div class="progress-ring" data-progress="{{#var:per}}"> |
--><div class="progress-ring" data-progress="{{#var:per}}"> |
Revision as of 07:40, 25 December 2020
Creates a progress ring
Template style in Template:Progress_ring/ProgressRing.css
Usage
{{Progress ring|radius=40|width=8|color=green|percentage=0|id=anything}}
For more parameters, see TemplateData.
NB! Setting an ID is Recommended if there are more than one rings on the same page
Template data
Creates a progress ring
Parameter | Description | Type | Status | |
---|---|---|---|---|
ID | id | Set an ID unique to this particular ring (NO SPACES!) | String | suggested |
Percentage | percentage | The percentage displayed, enter without %
| Number | required |
Radius | radius | Sets the radius of the circle (total diameter will be radius * 2)
| Number | optional |
Ring width | width | Width of the progress ring itself
| Number | optional |
Color | color | Sets the progress bar's color
| Unknown | optional |
Animation time | anim-time | The time in seconds it takes for the ring to fill up (normalized based on percentage)
| Number | optional |
Text Size | size | Set's the percentage text size (default: adaptive) | Number | optional |
Background color | background-color | Background progress ring color
| Unknown | optional |
Text Background Color | center-color | Percentage background text color
| Unknown | optional |
Text Color | text-color | Percentage text color (default: percentage color)
| Unknown | optional |