Added second language and some translations

main
Timo Montalto 2025-03-24 11:38:32 +01:00
parent 85927861b9
commit d7a2f609f4
7 changed files with 70 additions and 4 deletions

View File

@ -195,6 +195,20 @@ a:hover {
border-color: #ffd700;
}
.translations-block {
background-color: var(--darkMaincolor);
color: #000;
}
.translations-block a {
color: #000;
border-bottom: 2px solid #000;
}
.translations-block a:hover {
background-color: #000;
color: var(--darkMaincolor);
}
.pagination li.active a {
background-color: var(--darkMaincolor);

View File

@ -435,3 +435,24 @@ table td{
.pagination li.disabled a:hover {
background: transparent;
}
.translations-block {
text-align: center;
margin: 20px 0;
padding: 10px;
background-color: var(--callouctcolor);
color: #fff;
border-radius: 5px;
}
.translations-block a {
color: #fff;
text-decoration: none;
margin: 0 10px;
border-bottom: 2px solid #fff;
}
.translations-block a:hover {
background-color: #fff;
color: var(--callouctcolor);
}

View File

@ -1,3 +1,6 @@
[translatedVersion]
other = "This post is also available in English"
[more]
other = "Mehr"

View File

@ -1,3 +1,6 @@
[translatedVersion]
other = "Dieser Beitrag ist auch auf Deutsch verfügbar"
[more]
other = "More"
@ -10,6 +13,21 @@ other = "Recent {{.Title }}"
[readMore]
other = "read more"
[next]
other = "Next"
[back]
other = "Back"
[publishedOn]
other = "Published on"
[pageNotFound]
other = "Nothing found here"
[EntriesTagged]
other = "All tagged"
[by]
other = "By"

View File

@ -12,6 +12,13 @@
<div class="title">
<h1 class="title">{{ .Title }}</h1>
<div class="meta">{{ i18n "publishedOn" }} {{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
{{ if .IsTranslated }}
<div class="translations-block">
{{ range .Translations }}
<a href="{{ .RelPermalink }}">{{ i18n "translatedVersion" }}</a>
{{ end }}
</div>
{{ end }}
</div>
{{ if isset .Params "tldr" }}
<div class="tldr">

View File

@ -16,6 +16,3 @@
{{ end }}
</div>
</footer>
{{ if not hugo.IsServer }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}

View File

@ -20,5 +20,11 @@
| <span id="dark-mode-toggle" onclick="toggleTheme()">{{template "feathericon" (dict "UseCDN" .Site.Params.useCDN "Icon" "sun") }}</span>
<script src="{{ absURL "js/themetoggle.js" }}"></script>
{{ end }}
<!-- Sprachumschalter -->
{{ if eq .Site.Language.Lang "de" -}}
| <a href="{{ .Site.BaseURL }}en/">EN</a>
{{ else -}}
| <a href="{{ .Site.BaseURL }}de/">DE</a>
{{ end }}
</nav>
</header>