mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat(blox): optionally hide skill percent
when `percent` field is empty As requested in https://discord.com/channels/722225264733716590/1213513275069960263/1213513275069960263
This commit is contained in:
parent
b13d437838
commit
cee6e1e3e1
2 changed files with 4 additions and 0 deletions
|
@ -59,9 +59,11 @@
|
|||
{{ .name | markdownify | emojify }}
|
||||
{{ with .description }}<p class="skills-description">{{ . | markdownify | emojify }}</p>{{ end }}
|
||||
</span>
|
||||
{{ if .percent }}
|
||||
<div class="skills-wrapper" {{with $color_border}}{{ (printf "style=\"border-color: %s\"" .) | safeHTMLAttr }}{{end}}>
|
||||
<div class="skills-percent" style="width: {{ (printf "%s" (cast.ToString (.percent | default 100))) | safeCSS }}%; {{with $color}}{{ (printf "background-color: %s" .) | safeCSS }}{{end}}"></div>
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue