Added a language menu

This commit is contained in:
Vrifox 2021-06-13 12:38:02 +02:00
parent 6193b2112e
commit 4d1437ea02
Signed by: vrifox
GPG key ID: D40098E5B60B2197
3 changed files with 102 additions and 47 deletions

View file

@ -109,6 +109,9 @@ header {
nav { nav {
display: flex; display: flex;
} }
aside {
margin-left: auto;
}
} }
footer { footer {
border-top: 1px solid var(--border); border-top: 1px solid var(--border);

View file

@ -1,16 +1,59 @@
baseURL: https://vrifox.cc/ baseURL: https://vrifox.cc/
languages: languages:
en:
languageName: English
languageCode: en-us
weight: 1
de: de:
#contentDir: /content/de/
languageName: Deutsch languageName: Deutsch
languageCode: de-de languageCode: de-de
title: DE
weight: 1
menu:
name:
- identifier: vrifox.cc
name: VrifoxCC
title: vrifox.cc
url: /
weight: 1
main:
- identifier: blog
name: Blog
title: blog
url: /blog/
weight: 2 weight: 2
title: "Vri's Cute Corner" - identifier: blogroll
enableRobotsTXT: true name: Blogroll
menu: title: blogroll
url: /blogroll/
weight: 3
- identifier: library
name: Bibliothek
url: /library/
weight: 4
- identifier: projects
name: Projekte
title: projects
url: /projects/
weight: 5
footer:
- identifier: privacy
name: Privacy
title: privacy
url: /privacy/
weight: 3
- identifier: feed
name: Feed (RSS)
title: rss-feed
url: /blog/index.xml
weight: 4
- identifier: sourcecode
name: Source Code
title: source code
url: https://code.cozy.town/vrifox/vrifox.cc
weight: 5
en:
languageName: English
languageCode: en-
weight: 2
menu:
name: name:
- identifier: vrifox.cc - identifier: vrifox.cc
name: VrifoxCC name: VrifoxCC
@ -53,6 +96,8 @@ menu:
title: source code title: source code
url: https://code.cozy.town/vrifox/vrifox.cc url: https://code.cozy.town/vrifox/vrifox.cc
weight: 5 weight: 5
title: "Vri's Cute Corner"
enableRobotsTXT: true
markup: markup:
highlight: highlight:
anchorLineNos: false anchorLineNos: false

View file

@ -8,4 +8,11 @@
<a href="{{ .URL }}">{{ .Name }}</a> <a href="{{ .URL }}">{{ .Name }}</a>
{{- end }} {{- end }}
</nav> </nav>
<aside>
{{- if .IsTranslated }}
{{- range .Translations }}
<a href="{{ .Permalink }}">{{ .Lang }}</a>
{{- end }}
{{- end }}
</aside>
</header> </header>