2021-05-05 21:04:38 +00:00
|
|
|
{{- define "main" -}}
|
|
|
|
|
|
|
|
<h1>{{ .Title | markdownify }}</h1>
|
2021-12-28 01:22:25 +00:00
|
|
|
|
2022-12-07 18:31:53 +00:00
|
|
|
{{ .Content }}
|
|
|
|
|
2023-03-06 18:37:48 +00:00
|
|
|
{{- $page_params := .Params }}
|
|
|
|
{{- $translated_badges := index $.Site.Data.badges .Lang }}
|
2021-12-28 01:22:25 +00:00
|
|
|
|
2023-03-06 18:37:48 +00:00
|
|
|
<div class="service-badges">
|
|
|
|
{{ range $translated_badges.badges.active_badges }}
|
2021-12-28 01:22:25 +00:00
|
|
|
|
2023-03-06 18:37:48 +00:00
|
|
|
{{- $badge := index $translated_badges.badges.badges . }}
|
2023-04-02 21:16:34 +00:00
|
|
|
{{- $status_name := default "none" (index $page_params.service_badges .) -}}
|
|
|
|
{{- $status := index $translated_badges.status.status $status_name -}}
|
|
|
|
|
|
|
|
<div class="badge-icon badge-status-{{ $status_name }}">
|
2023-03-06 18:37:48 +00:00
|
|
|
{{ $svg := printf "static/static/img/badges/%s" $badge.icon }}
|
|
|
|
{{ $svg | readFile | safeHTML }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="badge-name">
|
|
|
|
{{ title $badge.name }}<br>
|
2023-04-02 21:16:34 +00:00
|
|
|
= {{ $status.name }}
|
2023-03-06 18:37:48 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="badge-description">
|
|
|
|
{{- $markdown := $badge.description | markdownify -}}
|
2021-12-28 01:22:25 +00:00
|
|
|
|
2023-03-06 18:37:48 +00:00
|
|
|
{{ if not ( findRE "<[h|p][^>]*>" $markdown ) }}
|
|
|
|
<p>{{ $markdown }}</p>
|
|
|
|
{{ else }}
|
|
|
|
{{ $markdown }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ end }}
|
|
|
|
</div>
|
2021-12-28 01:22:25 +00:00
|
|
|
|
2023-04-01 21:32:25 +00:00
|
|
|
{{ partial "status.html" . }}
|
|
|
|
|
2021-12-28 01:22:25 +00:00
|
|
|
{{- end -}}
|