website/themes/datacoop2020/layouts/partials/badges.html
Benjamin Bach 6a940401dd
All checks were successful
continuous-integration/drone/pr Build is passing
WIP: Align items of service badges
2023-03-06 09:43:17 +01:00

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>