website_rasmus/themes/datacoop2020/layouts/partials/badges.html

42 lines
874 B
HTML

<h2>{{ i18n "badges_headline" }}</h2>
<dl class="badge-definitions">
{{ range $badge_key, $badge := $.Site.Data.badges.da.badges.badges }}
<dt>
<span class="badge-icon">
{{$svg := printf "static/static/img/badges/%s" .icon}}
{{ $svg | readFile | safeHTML }}
</span>
<span class="badge-name">{{ title .name }}</span>
</dt>
<dd>
{{/* Hugo is insane some times: https://github.com/gohugoio/hugo/issues/3040 */}}
{{- $markdown := .description | markdownify -}}
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }}
<p>{{ $markdown }}</p>
{{ else }}
{{ $markdown }}
{{ end }}
<dd>
{{ end }}
</dl>
<h2>{{ i18n "status_headline" }}</h2>
<dl class="status-definitions">
{{ range $.Site.Data.badges.da.status.status }}
<dt>{{ title .name }}</dt>
<dd>
{{ markdownify .description }}
</dd>
{{ end }}
</dl>