Added second language and some translations
parent
85927861b9
commit
d7a2f609f4
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
[translatedVersion]
|
||||
other = "This post is also available in English"
|
||||
|
||||
[more]
|
||||
other = "Mehr"
|
||||
|
||||
|
|
|
|||
18
i18n/en.toml
18
i18n/en.toml
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -16,6 +16,3 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</footer>
|
||||
{{ if not hugo.IsServer }}
|
||||
{{ template "_internal/google_analytics.html" . }}
|
||||
{{ end }}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in New Issue