mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org.git
synced 2025-01-15 13:26:37 +00:00
Merge pull request 'New lang selector' (#157) from nevfy/selfprivacy.org:fix-lang-sel into master
Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy.org/pulls/157
This commit is contained in:
commit
73327e6fa9
|
@ -49,7 +49,7 @@
|
|||
</li>
|
||||
{{ end -}}
|
||||
{{ if (gt (len .Site.Home.Translations) 0) -}}
|
||||
<li class="nav-item dropdown d-none d-lg-block">
|
||||
<li class="nav-item">
|
||||
{{ partial "navbar-lang-selector.html" . -}}
|
||||
</li>
|
||||
{{ end -}}
|
||||
|
|
|
@ -23,9 +23,9 @@
|
|||
{{- if .Site.Params.ui.sidebar_menu_foldable }} foldable-nav{{ end -}}
|
||||
" id="td-section-nav">
|
||||
{{ if (gt (len .Site.Home.Translations) 0) -}}
|
||||
<div class="td-sidebar-nav__section nav-item dropdown d-block d-lg-none">
|
||||
<!-- <div class="td-sidebar-nav__section nav-item dropdown d-block d-lg-none">
|
||||
{{ partial "navbar-lang-selector.html" . }}
|
||||
</div>
|
||||
</div> -->
|
||||
{{ end -}}
|
||||
{{ $navRoot := cond (and (ne .Params.toc_root true) (eq .Site.Home.Type "docs")) .Site.Home .FirstSection -}}
|
||||
{{ $ulNr := 0 -}}
|
||||
|
|
|
@ -204,3 +204,8 @@ a, a.btn-link {
|
|||
#sp-logo-keyhole {
|
||||
fill: $yellow
|
||||
}
|
||||
|
||||
.lang-selector > ul > .nav-item > .nav-link {
|
||||
padding: .5rem !important;
|
||||
text-transform: uppercase;
|
||||
}
|
|
@ -8,7 +8,7 @@ ul.ul-2>.td-sidebar-nav__section-title a {
|
|||
}
|
||||
|
||||
ul.ul-2 {
|
||||
padding: 0 2rem;
|
||||
padding: 0 0 0 2rem;
|
||||
&>.td-sidebar-nav__section-title a:hover {
|
||||
color: $primary !important;
|
||||
background-color: #7EB07F11;
|
||||
|
@ -17,6 +17,10 @@ ul.ul-2 {
|
|||
}
|
||||
}
|
||||
|
||||
.td-sidebar-nav__section.ul-0 {
|
||||
padding: 0 1.5rem;
|
||||
}
|
||||
|
||||
ul.ul-0 li a.tree-root,
|
||||
h5.taxonomy-title {
|
||||
display: none !important;
|
||||
|
|
|
@ -1,12 +1,14 @@
|
|||
{{/* Link directly to documentation etc., if possible. */}}
|
||||
{{ $langPage := cond (gt (len .Translations) 0) . .Site.Home }}
|
||||
<div class="dropdown">
|
||||
<a role="button" class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
<i class="fas fa-globe ms-2"></i>
|
||||
</a>
|
||||
<ul class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
|
||||
{{ $currentLang := .Language.Lang }}
|
||||
<div class="lang-selector">
|
||||
<ul class="d-flex">
|
||||
{{ range $langPage.AllTranslations }}
|
||||
<li><a class="dropdown-item" href="{{ .RelPermalink }}">{{ .Language.LanguageName }}</a></li>
|
||||
{{ if eq $currentLang .Language.Lang }}
|
||||
<li class="nav-item"><a class="nav-link active" href="{{ .RelPermalink }}">{{ .Language.Lang }}</a></li>
|
||||
{{ else }}
|
||||
<li class="nav-item"><a class="nav-link" href="{{ .RelPermalink }}">{{ .Language.Lang }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</div>
|
Loading…
Reference in a new issue