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

42 lines
874 B
HTML
Raw Normal View History

2023-01-21 18:44:02 +00:00
<h2>{{ i18n "badges_headline" }}</h2>
2023-03-06 08:43:17 +00:00
<dl class="badge-definitions">
2023-01-21 18:44:02 +00:00
{{ range $badge_key, $badge := $.Site.Data.badges.da.badges.badges }}
2023-03-06 08:43:17 +00:00
<dt>
2023-01-23 12:08:41 +00:00
<span class="badge-icon">
{{$svg := printf "static/static/img/badges/%s" .icon}}
{{ $svg | readFile | safeHTML }}
</span>
2023-03-06 08:43:17 +00:00
<span class="badge-name">{{ title .name }}</span>
</dt>
2023-01-21 18:44:02 +00:00
2023-03-06 08:43:17 +00:00
<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>
2023-01-21 18:44:02 +00:00
{{ end }}
2023-03-06 08:43:17 +00:00
</dl>
2023-01-21 18:44:02 +00:00
<h2>{{ i18n "status_headline" }}</h2>
2023-03-06 08:43:17 +00:00
<dl class="status-definitions">
2023-01-21 18:44:02 +00:00
{{ range $.Site.Data.badges.da.status.status }}
2023-03-06 08:43:17 +00:00
<dt>{{ title .name }}</dt>
2023-01-21 18:44:02 +00:00
2023-03-06 08:43:17 +00:00
<dd>
{{ markdownify .description }}
2023-03-06 08:43:17 +00:00
</dd>
2023-01-21 18:44:02 +00:00
{{ end }}
2023-03-06 08:43:17 +00:00
</dl>