From efb448a8f9379917e1ff0ae3cf96b25acf62a953 Mon Sep 17 00:00:00 2001 From: Benjamin Bach Date: Tue, 28 Dec 2021 02:22:25 +0100 Subject: [PATCH] Display git log information on service pages, add partially finished table of different statuses --- config.yaml | 1 + content/services/nextcloud.da.md | 2 +- i18n/da.toml | 28 ++++++ i18n/en.toml | 3 + .../datacoop2020/assets/static/css/style.scss | 1 + .../assets/static/css/tables.scss | 8 ++ .../datacoop2020/layouts/_default/baseof.html | 2 +- .../datacoop2020/layouts/_default/single.html | 3 +- .../datacoop2020/layouts/services/single.html | 86 +++++++++++++++++-- 9 files changed, 125 insertions(+), 9 deletions(-) create mode 100644 themes/datacoop2020/assets/static/css/tables.scss diff --git a/config.yaml b/config.yaml index 74032e9..7a1368e 100644 --- a/config.yaml +++ b/config.yaml @@ -7,6 +7,7 @@ theme: datacoop2020 DefaultContentLanguage: da +enableGitInfo: true # See: https://gohugo.io/content-management/multilingual/ languages: diff --git a/content/services/nextcloud.da.md b/content/services/nextcloud.da.md index 0d1f3c2..6a57e82 100644 --- a/content/services/nextcloud.da.md +++ b/content/services/nextcloud.da.md @@ -11,4 +11,4 @@ service_badges: logging: negative --- -Nextcould blah blah \ No newline at end of file +Gem dine filer, din kalender og dine kontakter i skyen og tilgå alt fra alle dine enheder. diff --git a/i18n/da.toml b/i18n/da.toml index 7d2844a..1b0af0e 100644 --- a/i18n/da.toml +++ b/i18n/da.toml @@ -7,5 +7,33 @@ other = "Generateret med Hugo d. {{ . }}" [services_status] other = "Tjeneste Status" +[service_badges_status_positive] +other = "Positiv" +[service_badges_status_negative] +other = "Negativ" +[service_badges_status_partial] +other = "Delvis" + +[service_badge_stability] +other = "Stabilitet" + +[service_badge_connection_security] +other = "Sikker forbindelse" + +[service_badge_connection_anonymous] +other = "Anonym adgang" + +[service_badge_storage_encrypted] +other = "Krypteret opbevaring af data" + +[service_badge_zero_knowledge] +other = "Zero knowledge" + +[service_badge_storage_backup] +other = "Backup" + +[service_badge_logging] +other = "Logning" + [tagline] other = "vores data i vores hænder" diff --git a/i18n/en.toml b/i18n/en.toml index 2bfcee4..f54ab3f 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -7,5 +7,8 @@ other = "Generated by Hugo on {{ . }}" [services_status] other = "Services Status" +[service_badges_stability_negative] +other = "Negative" + [tagline] other = "our data in our hands" diff --git a/themes/datacoop2020/assets/static/css/style.scss b/themes/datacoop2020/assets/static/css/style.scss index e5e7f7b..f92d1f7 100644 --- a/themes/datacoop2020/assets/static/css/style.scss +++ b/themes/datacoop2020/assets/static/css/style.scss @@ -62,6 +62,7 @@ $body-color: $datacoop-purple; @import "bootstrap/bootstrap"; +@import "tables"; html { diff --git a/themes/datacoop2020/assets/static/css/tables.scss b/themes/datacoop2020/assets/static/css/tables.scss new file mode 100644 index 0000000..44550ac --- /dev/null +++ b/themes/datacoop2020/assets/static/css/tables.scss @@ -0,0 +1,8 @@ +table { + border-collapse: collapse; + td, th { + border: 2px solid $datacoop-purple; + padding: 5px; + } + +} diff --git a/themes/datacoop2020/layouts/_default/baseof.html b/themes/datacoop2020/layouts/_default/baseof.html index 443d40d..97cc289 100644 --- a/themes/datacoop2020/layouts/_default/baseof.html +++ b/themes/datacoop2020/layouts/_default/baseof.html @@ -15,7 +15,7 @@
- {{ with (now) | printf "%s" }} + {{ with now }} {{ i18n "generated_date" . }} {{ end }}
diff --git a/themes/datacoop2020/layouts/_default/single.html b/themes/datacoop2020/layouts/_default/single.html index e36e02d..48d24ce 100644 --- a/themes/datacoop2020/layouts/_default/single.html +++ b/themes/datacoop2020/layouts/_default/single.html @@ -3,4 +3,5 @@

{{ .Title | markdownify }}

{{ .Content }} -{{- end -}} \ No newline at end of file + +{{- end -}} diff --git a/themes/datacoop2020/layouts/services/single.html b/themes/datacoop2020/layouts/services/single.html index 9e34d6c..37860ea 100644 --- a/themes/datacoop2020/layouts/services/single.html +++ b/themes/datacoop2020/layouts/services/single.html @@ -1,14 +1,88 @@ {{- define "main" -}}

{{ .Title | markdownify }}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {{ i18n "service_badge_stability" }} + + {{ with .Params.service_badges.stability | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ {{ i18n "service_badge_connection_security" }} + + {{ with .Params.service_badges.connection_security | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ {{ i18n "service_badge_connection_anonymous" }} + + {{ with .Params.service_badges.connection_anonymous | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ {{ i18n "service_badge_storage_encrypted" }} + + {{ with .Params.service_badges.storage_encrypted | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ {{ i18n "service_badge_zero_knowledge" }} + + {{ with .Params.service_badges.zero_knowledge | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ {{ i18n "service_badge_storage_backup" }} + + {{ with .Params.service_badges.storage_backup | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ {{ i18n "service_badge_logging" }} + + {{ with .Params.service_badges.logging | printf "service_badges_status_%s" }} + {{ i18n . }} + {{ end }} +
+ +{{ .Content }} +

- {{ $customDateFormat := "January 2, 2006" }} - {{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }} - {{ .PublishDate.Format $customDateFormat }}{{ if gt .Lastmod .PublishDate }}, updated {{ .Lastmod.Format $customDateFormat }}{{ end }} + "{{ .Title }}" was last updated on {{ .Lastmod.Format "January 2, 2006" }}: {{ .GitInfo.Subject }} ({{ .GitInfo.AbbreviatedHash }}) {{ partial "tags" . }}

-{{ .Content }} - -{{- end -}} \ No newline at end of file +{{- end -}}