2023-04-01 21:32:25 +00:00
|
|
|
<h2 id="badges">{{ i18n "badges_headline" }}</h2>
|
2023-01-21 18:44:02 +00:00
|
|
|
|
2023-03-06 11:10:09 +00:00
|
|
|
<section class="badge-definitions">
|
2023-03-06 18:37:48 +00:00
|
|
|
{{- $translated_badges := index $.Site.Data.badges .Lang }}
|
|
|
|
{{ range $badge_key, $badge := $translated_badges.badges.badges }}
|
2023-01-21 18:44:02 +00:00
|
|
|
|
2023-03-06 11:10:09 +00:00
|
|
|
<div class="badge-icon">
|
2023-07-29 14:56:29 +00:00
|
|
|
{{ $svg := printf "static/static/img/badges/%s" .icon }}
|
|
|
|
{{ $svg | readFile | safeHTML }}
|
2023-03-06 11:10:09 +00:00
|
|
|
</div>
|
|
|
|
<div class="badge-name">{{ title .name }}</div>
|
2023-01-21 18:44:02 +00:00
|
|
|
|
2023-03-06 11:10:09 +00:00
|
|
|
<div class="badge-description">
|
2023-03-06 08:43:17 +00:00
|
|
|
{{/* 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 }}
|
2023-03-06 11:10:09 +00:00
|
|
|
</div>
|
2023-01-21 18:44:02 +00:00
|
|
|
|
|
|
|
{{ end }}
|
2023-03-06 11:10:09 +00:00
|
|
|
</section>
|