Display git log information on service pages, add partially finished table of different statuses

This commit is contained in:
Benjamin Bach 2021-12-28 02:22:25 +01:00
parent 9a4b12de76
commit efb448a8f9
Signed by: benjaoming
GPG key ID: 7D49441634585664
9 changed files with 125 additions and 9 deletions

View file

@ -7,6 +7,7 @@ theme: datacoop2020
DefaultContentLanguage: da DefaultContentLanguage: da
enableGitInfo: true
# See: https://gohugo.io/content-management/multilingual/ # See: https://gohugo.io/content-management/multilingual/
languages: languages:

View file

@ -11,4 +11,4 @@ service_badges:
logging: negative logging: negative
--- ---
Nextcould blah blah Gem dine filer, din kalender og dine kontakter i skyen og tilgå alt fra alle dine enheder.

View file

@ -7,5 +7,33 @@ other = "Generateret med Hugo d. {{ . }}"
[services_status] [services_status]
other = "Tjeneste 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] [tagline]
other = "<u>vores</u> data i <u>vores</u> hænder" other = "<u>vores</u> data i <u>vores</u> hænder"

View file

@ -7,5 +7,8 @@ other = "Generated by Hugo on {{ . }}"
[services_status] [services_status]
other = "Services Status" other = "Services Status"
[service_badges_stability_negative]
other = "Negative"
[tagline] [tagline]
other = "our data in our hands" other = "our data in our hands"

View file

@ -62,6 +62,7 @@ $body-color: $datacoop-purple;
@import "bootstrap/bootstrap"; @import "bootstrap/bootstrap";
@import "tables";
html html
{ {

View file

@ -0,0 +1,8 @@
table {
border-collapse: collapse;
td, th {
border: 2px solid $datacoop-purple;
padding: 5px;
}
}

View file

@ -15,7 +15,7 @@
<div class="col-md-1 datacoop-sidebar-gutter d-print-none d-none d-md-flex"> <div class="col-md-1 datacoop-sidebar-gutter d-print-none d-none d-md-flex">
<div class="sticky-bottom"> <div class="sticky-bottom">
{{ with (now) | printf "%s" }} {{ with now }}
{{ i18n "generated_date" . }} {{ i18n "generated_date" . }}
{{ end }} {{ end }}
</div> </div>

View file

@ -3,4 +3,5 @@
<h1>{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
{{ .Content }} {{ .Content }}
{{- end -}} {{- end -}}

View file

@ -1,14 +1,88 @@
{{- define "main" -}} {{- define "main" -}}
<h1>{{ .Title | markdownify }}</h1> <h1>{{ .Title | markdownify }}</h1>
<table>
<tr>
<th>
{{ i18n "service_badge_stability" }}
</th>
<td>
{{ with .Params.service_badges.stability | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
<tr>
<th>
{{ i18n "service_badge_connection_security" }}
</th>
<td>
{{ with .Params.service_badges.connection_security | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
<tr>
<th>
{{ i18n "service_badge_connection_anonymous" }}
</th>
<td>
{{ with .Params.service_badges.connection_anonymous | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
<tr>
<th>
{{ i18n "service_badge_storage_encrypted" }}
</th>
<td>
{{ with .Params.service_badges.storage_encrypted | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
<tr>
<th>
{{ i18n "service_badge_zero_knowledge" }}
</th>
<td>
{{ with .Params.service_badges.zero_knowledge | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
<tr>
<th>
{{ i18n "service_badge_storage_backup" }}
</th>
<td>
{{ with .Params.service_badges.storage_backup | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
<tr>
<th>
{{ i18n "service_badge_logging" }}
</th>
<td>
{{ with .Params.service_badges.logging | printf "service_badges_status_%s" }}
{{ i18n . }}
{{ end }}
</td>
</tr>
</table>
{{ .Content }}
<p> <p>
<small class="text-secondary"> <small class="text-secondary">
{{ $customDateFormat := "January 2, 2006" }} "{{ .Title }}" was last updated on {{ .Lastmod.Format "January 2, 2006" }}: {{ .GitInfo.Subject }} ({{ .GitInfo.AbbreviatedHash }})
{{ with .Site.Params.customDateFormat }}{{ $customDateFormat = . }}{{ end }}
{{ .PublishDate.Format $customDateFormat }}{{ if gt .Lastmod .PublishDate }}, updated {{ .Lastmod.Format $customDateFormat }}{{ end }}
</small> </small>
{{ partial "tags" . }} {{ partial "tags" . }}
</p> </p>
{{ .Content }}
{{- end -}} {{- end -}}