progress.html 652 B

123456789101112131415161718192021222324
  1. {{- $value := default 0 (.Get "value") -}}
  2. {{- $title := .Get "title" -}}
  3. {{- $icon := .Get "icon" -}}
  4. <div class="gdoc-progress">
  5. <div class="gdoc-progress__label flex justify-between">
  6. <div class="gdoc-progress__label--name flex align-center">
  7. {{ with $icon -}}
  8. <svg class="gdoc-icon {{ . }}"><use xlink:href="#{{ . }}"></use></svg>
  9. {{- end }}
  10. {{ with $title }}<span>{{ . }}</span>{{ end }}
  11. </div>
  12. <div>{{ $value }}%</div>
  13. </div>
  14. <div class="gdoc-progress__wrap">
  15. <div
  16. class="gdoc-progress__bar"
  17. data-percent="{{ $value }}"
  18. style="width: {{ $value }}%;"
  19. ></div>
  20. </div>
  21. </div>