mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2024-12-22 12:13:19 -06:00
Move the langbar to be part of the navbar - TODO: dropdown
This commit is contained in:
parent
b9879729bf
commit
42f0046747
@ -118,7 +118,7 @@ footer {
|
|||||||
|
|
||||||
|
|
||||||
/* Navbar formatting */
|
/* Navbar formatting */
|
||||||
.navbar, .langbar {
|
.topbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -127,33 +127,28 @@ footer {
|
|||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
padding: 4px;
|
padding: 4px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar, .langpicker {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
flex-grow: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-item, .langbar-item {
|
.navbar a, .langpicker a {
|
||||||
/*flex-grow: 1;*/
|
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*.navbar-item:first-child,
|
.navbar-item:hover, .langpicker-item:hover {
|
||||||
.langbar-item:first-child {
|
|
||||||
border-top-left-radius: 8px;
|
|
||||||
border-bottom-left-radius: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar-item:last-child,
|
|
||||||
.langbar-item:last-child {
|
|
||||||
border-top-right-radius: 8px;
|
|
||||||
border-bottom-right-radius: 8px;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
.navbar-item:hover, .langbar-item:hover {
|
|
||||||
background-color: #444;
|
background-color: #444;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar-item.active, .langbar-item.active {
|
.topbar .active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
|
<a href="{{ .Site.Home.Permalink | absLangURL }}">{{ .Site.Title | markdownify }}</a>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
<div class="topbar">
|
||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
{{ with .Site.Home }}
|
{{ with .Site.Home }}
|
||||||
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title }}</a>
|
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title }}</a>
|
||||||
@ -20,9 +21,10 @@
|
|||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{{ if .Site.IsMultiLingual }}
|
{{ if .Site.IsMultiLingual }}
|
||||||
<nav class="langbar">
|
<nav class="langpicker">
|
||||||
{{ range .Site.Home.AllTranslations }}
|
{{ range .Site.Home.AllTranslations }}
|
||||||
<a class="langbar-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
<a class="langpicker-item{{ if eq .Language $.Site.Language }} active{{ end }}" href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
</nav>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user