feat: update for multilingual support
This commit is contained in:
parent
2f69479647
commit
a549526f88
|
@ -75,9 +75,11 @@ $navbar-dark-active-color: $link-color-dark;
|
|||
background: $body-overlay-dark;
|
||||
}
|
||||
|
||||
/*
|
||||
[data-dark-mode] body .dropdown-menu {
|
||||
@extend .dropdown-menu-dark;
|
||||
}
|
||||
*/
|
||||
|
||||
[data-dark-mode] body .navbar,
|
||||
[data-dark-mode] body .doks-subnavbar {
|
||||
|
@ -468,6 +470,10 @@ $navbar-dark-active-color: $link-color-dark;
|
|||
}
|
||||
*/
|
||||
|
||||
[data-dark-mode] .dropdown-item {
|
||||
color: $body-bg-dark;
|
||||
}
|
||||
|
||||
[data-dark-mode] body hr.text-black-50 {
|
||||
color: $gray-600 !important;
|
||||
}
|
||||
|
|
|
@ -431,3 +431,15 @@ button#doks-versions {
|
|||
.navbar-light .navbar-nav .active .nav-link {
|
||||
color: $primary;
|
||||
}
|
||||
|
||||
.dropdown-divider {
|
||||
border-top: 1px dashed $gray-200;
|
||||
}
|
||||
|
||||
.dropdown-item:hover {
|
||||
background: $gray-100;
|
||||
}
|
||||
|
||||
.dropdown-item:active {
|
||||
color: inherit;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ rssLimit = 10
|
|||
|
||||
# Multilingual
|
||||
defaultContentLanguage = "en"
|
||||
# disableLanguages = ["nl"]
|
||||
disableLanguages = ["de", "nl"]
|
||||
# defaultContentLanguageInSubdir = true
|
||||
|
||||
# add redirects/headers
|
||||
|
|
|
@ -5,6 +5,13 @@
|
|||
[en.params]
|
||||
languageISO = "EN"
|
||||
|
||||
[de]
|
||||
languageName = "German"
|
||||
contentDir = "content/de"
|
||||
weight = 15
|
||||
[de.params]
|
||||
languageISO = "DE"
|
||||
|
||||
[nl]
|
||||
languageName = "Nederlands"
|
||||
contentDir = "content/nl"
|
||||
|
|
|
@ -76,5 +76,5 @@ editPage = false
|
|||
highLight = true
|
||||
kaTex = false
|
||||
collapsibleSidebar = true
|
||||
multilingualMode = true
|
||||
multilingualMode = false
|
||||
docsVersioning = false # Not yet functional
|
||||
|
|
|
@ -8,4 +8,3 @@ draft: false
|
|||
images: []
|
||||
---
|
||||
|
||||
:cow:
|
||||
|
|
|
@ -57,28 +57,12 @@
|
|||
{{ end -}}
|
||||
|
||||
{{ if eq .Site.Params.options.multilingualMode true -}}
|
||||
<!--
|
||||
<div class="dropdown order-md-2">
|
||||
<button class="btn btn-doks-light dropdown-toggle" id="doks-languages" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static" aria-label="Toggle language menu">
|
||||
<span class="d-none d-lg-inline"></span>English
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="doks-languages">
|
||||
<li><a class="dropdown-item current" aria-current="true" href="/docs/5.0/">English</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="https://getbootstrap.com/docs/3.4/">Dutch</a></li>
|
||||
<li><a class="dropdown-item" href="https://getbootstrap.com/2.3.2/">Russian</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="dropdown-item" href="/docs/contributing/how-to-contribute/">Help Translate</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
|
||||
<div class="dropdown order-md-2">
|
||||
<button class="btn btn-doks-light dropdown-toggle" id="doks-languages" data-bs-toggle="dropdown" aria-expanded="false" data-bs-display="static">
|
||||
{{ .Site.Params.languageISO }}
|
||||
<span class="dropdown-caret"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu dropdown-menu-end" aria-labelledby="doks-languages">
|
||||
<ul class="dropdown-menu dropdown-menu-end shadow rounded border-0" aria-labelledby="doks-languages">
|
||||
|
||||
<li><a class="dropdown-item current" aria-current="true" href="{{ .RelPermalink }}">{{ .Site.Language.LanguageName }}</a></li>
|
||||
|
||||
|
@ -101,7 +85,6 @@
|
|||
-->
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{{ end -}}
|
||||
</nav>
|
||||
</header>
|
||||
|
|
Loading…
Reference in New Issue