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
enableGitInfo: true
# See: https://gohugo.io/content-management/multilingual/
languages:

View File

@ -11,4 +11,4 @@ service_badges:
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]
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 = "<u>vores</u> data i <u>vores</u> hænder"

View File

@ -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"

View File

@ -62,6 +62,7 @@ $body-color: $datacoop-purple;
@import "bootstrap/bootstrap";
@import "tables";
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="sticky-bottom">
{{ with (now) | printf "%s" }}
{{ with now }}
{{ i18n "generated_date" . }}
{{ end }}
</div>

View File

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

View File

@ -1,14 +1,88 @@
{{- define "main" -}}
<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>
<small class="text-secondary">
{{ $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 }})
</small>
{{ partial "tags" . }}
</p>
{{ .Content }}
{{- end -}}
{{- end -}}