mirror of
https://github.com/BBaoVanC/bobatheme.git
synced 2025-05-14 15:52:57 -05:00
Clean up navbar structure
This commit is contained in:
parent
7ac4908149
commit
c971faeb20
@ -383,25 +383,17 @@ h1 svg.icon {
|
|||||||
|
|
||||||
/* Navbar formatting {{{ */
|
/* Navbar formatting {{{ */
|
||||||
|
|
||||||
.topbar {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
flex-direction: row;
|
|
||||||
background-color: var(--background-1);
|
|
||||||
color: var(--text-1);
|
|
||||||
border-radius: 8px;
|
|
||||||
margin-top: 5px;
|
|
||||||
padding: 4px;
|
|
||||||
align-items: flex-start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
background-color: var(--background-1);
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-top: 5px;
|
||||||
|
padding: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a {
|
.navbar-item {
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -412,7 +404,7 @@ h1 svg.icon {
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.topbar .active {
|
.navbar-item.active {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,9 +10,7 @@
|
|||||||
|
|
||||||
<a id="top" name="top" aria-hidden="true"></a>
|
<a id="top" name="top" aria-hidden="true"></a>
|
||||||
|
|
||||||
<div class="top">
|
{{ partial "top.html" . }}
|
||||||
{{ partial "top.html" . }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{{ if not .IsHome }}
|
{{ if not .IsHome }}
|
||||||
{{ partial "breadcrumb.html" . }}
|
{{ partial "breadcrumb.html" . }}
|
||||||
|
@ -4,20 +4,18 @@
|
|||||||
</a>
|
</a>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="topbar">
|
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
|
||||||
<nav class="navbar" aria-label="{{ i18n "aria_navbar" }}">
|
{{ with .Site.Home }}
|
||||||
{{ with .Site.Home }}
|
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
|
||||||
<a class="navbar-item{{ if $.IsHome }} active{{ end }}" href="{{ .Permalink | absLangURL }}">{{ .Title | markdownify }}</a>
|
{{ end }}
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
{{ $isActive := false }}
|
{{ $isActive := false }}
|
||||||
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
{{ if or ($.HasMenuCurrent .Menu .) ($.IsMenuCurrent .Menu .) }}
|
||||||
{{ $isActive = true }}
|
{{ $isActive = true }}
|
||||||
{{ end }}
|
|
||||||
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
|
||||||
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
|
|
||||||
href="{{ .URL }}">{{ .Name }}</a>
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</nav>
|
<a class="navbar-item{{ if $isActive }} active{{ end }}"
|
||||||
</div>
|
{{ if strings.HasPrefix .URL "http" }}target="_blank" rel="noopener"{{ end }}
|
||||||
|
href="{{ .URL }}">{{ .Name }}</a>
|
||||||
|
{{ end }}
|
||||||
|
</nav>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user