added standalone circular-progress component with size input option
This commit is contained in:
parent
3592db2880
commit
a2f2b0977b
1 changed files with 29 additions and 0 deletions
29
layouts/partials/misc/circular-progress.html
Normal file
29
layouts/partials/misc/circular-progress.html
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{{ if isset .ctx "percentage" }}
|
||||||
|
{{ $predefinedColor:= true}}
|
||||||
|
{{ if hasPrefix .ctx.color "#"}}
|
||||||
|
{{ $predefinedColor = false }}
|
||||||
|
{{ end }}
|
||||||
|
{{ $size := "" }}
|
||||||
|
{{ if .size }}
|
||||||
|
{{ $size = .size }}
|
||||||
|
{{ end }}
|
||||||
|
<div class="circular-progress circular-progress-{{ $size }} {{if $predefinedColor}}{{ .ctx.color }}{{end}}">
|
||||||
|
<span class="circular-progress-left">
|
||||||
|
<span
|
||||||
|
class="circular-progress-bar circular-progress-percentage-{{ .ctx.percentage }}"
|
||||||
|
{{ if not $predefinedColor }}
|
||||||
|
style="border-color: {{.ctx.color}};"
|
||||||
|
{{ end }}
|
||||||
|
></span>
|
||||||
|
</span>
|
||||||
|
<span class="circular-progress-right">
|
||||||
|
<span
|
||||||
|
class="circular-progress-bar"
|
||||||
|
{{ if not $predefinedColor }}
|
||||||
|
style="border-color: {{.ctx.color}};"
|
||||||
|
{{ end }}
|
||||||
|
></span>
|
||||||
|
</span>
|
||||||
|
<div class="circular-progress-value"></div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue