website/themes/datacoop2020/layouts/services/single.html

43 lines
977 B
HTML
Raw Permalink Normal View History

{{- define "main" -}}
<h1>{{ .Title | markdownify }}</h1>
2022-12-07 18:31:53 +00:00
{{ .Content }}
{{- $page_params := .Params }}
{{- $translated_badges := index $.Site.Data.badges .Lang }}
<div class="service-badges">
{{ range $translated_badges.badges.active_badges }}
{{- $badge := index $translated_badges.badges.badges . }}
{{- $status := index $page_params.service_badges . -}}
<div class="badge-icon badge-status-{{ $status }}">
{{ $svg := printf "static/static/img/badges/%s" $badge.icon }}
{{ $svg | readFile | safeHTML }}
</div>
<div class="badge-name">
{{ title $badge.name }}<br>
= {{ i18n ($status | printf "service_badges_status_%s") }}
</div>
<div class="badge-description">
{{- $markdown := $badge.description | markdownify -}}
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }}
<p>{{ $markdown }}</p>
{{ else }}
{{ $markdown }}
{{ end }}
</div>
{{ end }}
</div>
{{ partial "status.html" . }}
{{- end -}}