Add translation links to navigation
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2020-11-24 13:09:45 +01:00
parent af681798f5
commit b3d3a80c01
3 changed files with 17 additions and 0 deletions

View File

@ -67,6 +67,15 @@ figure {
@media screen and (min-width: 800px) { @media screen and (min-width: 800px) {
flex-direction: row; flex-direction: row;
hr {
margin: 0 0.5em !important;
align-self: center;
}
}
hr {
margin: 0.5em 40%;
} }
.nav-logo { .nav-logo {

View File

@ -3,6 +3,8 @@ title = "franconian"
[languages] [languages]
[languages.en] [languages.en]
languageName = "English"
[languages.de] [languages.de]
languageName = "Deutsch"
[taxonomies] [taxonomies]

View File

@ -14,6 +14,12 @@
<header> <header>
<nav class="nav"> <nav class="nav">
<a class="nav-logo" href="{{ .Site.LanguagePrefix }}/"><img src="https://styleguide.rc3.world/Logo/Logo%20Set%203/SVG/Logo%20SD%20blue.svg" alt="Blue version of the rC3 logo"></a> <a class="nav-logo" href="{{ .Site.LanguagePrefix }}/"><img src="https://styleguide.rc3.world/Logo/Logo%20Set%203/SVG/Logo%20SD%20blue.svg" alt="Blue version of the rC3 logo"></a>
{{ if .IsTranslated }}
{{ range .Translations }}
<a class="nav-link" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
{{ end }}
<hr>
{{ end }}
{{ $currentPage := . }} {{ $currentPage := . }}
{{ range .Site.Menus.main }} {{ range .Site.Menus.main }}
<a class="nav-link{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a> <a class="nav-link{{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} nav-link-active{{ end }}" href="{{ .URL }}">{{ .Name }}</a>