{{/* Hugo Blox: Awards */}} {{/* Documentation: https://hugoblox.com/blocks/ */}} {{/* License: https://github.com/HugoBlox/hugo-blox-builder/blob/main/LICENSE.md */}} {{/* Initialise */}} {{ $page := .wcPage }} {{ $block := .wcBlock }} {{ $author := $block.content.username | default "me" }} {{ $profile := partial "functions/get_author_profile" $author }} {{ $awards := $profile.awards }}
{{ $block.content.title | markdownify | emojify }}
{{ with $block.content.text }}

{{ . | markdownify | emojify }}

{{ end }}
{{ if $awards }} {{ range $idx, $key := sort $awards ".date" "desc" }}
{{- $icon := .icon }} {{with .url}}{{end}}
{{ with $icon }} {{ partial "functions/get_icon" (dict "name" . "attributes" "class='w-6 h-6'") }} {{ end }} {{.title | markdownify | emojify}}
{{with .url}}
{{end}}
{{ .awarder }} ∙ {{ if .date }} {{ (time .date) | time.Format ($block.design.date_format | default "January 2006") }} {{ else if .date_start }} {{ (time .date_start) | time.Format ($block.design.date_format | default "January 2006") }} {{ else }} {{ i18n "present" | default "Present" }} {{ end }}
{{with .summary}}
{{. | markdownify | emojify}}
{{end}} {{ with .certificate_url }} {{ i18n "see_certificate" | default "See certificate" }} {{ end }}
{{end}} {{end}}