Benjamin Bach
f5f40320b8
All checks were successful
continuous-integration/drone/pr Build is passing
43 lines
977 B
HTML
43 lines
977 B
HTML
{{- define "main" -}}
|
|
|
|
<h1>{{ .Title | markdownify }}</h1>
|
|
|
|
{{ .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 -}}
|