Added second language and some translations
parent
85927861b9
commit
d7a2f609f4
|
|
@ -195,6 +195,20 @@ a:hover {
|
||||||
border-color: #ffd700;
|
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 {
|
.pagination li.active a {
|
||||||
background-color: var(--darkMaincolor);
|
background-color: var(--darkMaincolor);
|
||||||
|
|
|
||||||
|
|
@ -435,3 +435,24 @@ table td{
|
||||||
.pagination li.disabled a:hover {
|
.pagination li.disabled a:hover {
|
||||||
background: transparent;
|
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]
|
[more]
|
||||||
other = "Mehr"
|
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]
|
[more]
|
||||||
other = "More"
|
other = "More"
|
||||||
|
|
||||||
|
|
@ -10,6 +13,21 @@ other = "Recent {{.Title }}"
|
||||||
[readMore]
|
[readMore]
|
||||||
other = "read more"
|
other = "read more"
|
||||||
|
|
||||||
|
[next]
|
||||||
|
other = "Next"
|
||||||
|
|
||||||
|
[back]
|
||||||
|
other = "Back"
|
||||||
|
|
||||||
|
[publishedOn]
|
||||||
|
other = "Published on"
|
||||||
|
|
||||||
|
[pageNotFound]
|
||||||
|
other = "Nothing found here"
|
||||||
|
|
||||||
|
[EntriesTagged]
|
||||||
|
other = "All tagged"
|
||||||
|
|
||||||
[by]
|
[by]
|
||||||
other = "By"
|
other = "By"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,13 @@
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h1 class="title">{{ .Title }}</h1>
|
<h1 class="title">{{ .Title }}</h1>
|
||||||
<div class="meta">{{ i18n "publishedOn" }} {{ dateFormat ":date_medium" .Date }}{{ if .Draft }} <span class="draft-label">DRAFT</span> {{ end }}</div>
|
<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>
|
</div>
|
||||||
{{ if isset .Params "tldr" }}
|
{{ if isset .Params "tldr" }}
|
||||||
<div class="tldr">
|
<div class="tldr">
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,3 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</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>
|
| <span id="dark-mode-toggle" onclick="toggleTheme()">{{template "feathericon" (dict "UseCDN" .Site.Params.useCDN "Icon" "sun") }}</span>
|
||||||
<script src="{{ absURL "js/themetoggle.js" }}"></script>
|
<script src="{{ absURL "js/themetoggle.js" }}"></script>
|
||||||
{{ end }}
|
{{ 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>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue