Fix navbar

This commit is contained in:
BBaoVanC 2021-03-25 16:15:47 -05:00
parent 52316b6c9b
commit f3c564e297
Signed by: bbaovanc
GPG Key ID: 18089E4E3CCF1D3A
4 changed files with 19 additions and 17 deletions

View File

@ -2,14 +2,4 @@ baseURL = "https://bbaovanc.com/blog/"
languageCode = "en-us"
title = "bbaovanc's blog"
theme = "bbaovanc"
sectionPagesMenu = "navigation"
[menu]
[[menu.main]]
identifier = "home"
name = "Home"
url = "/"
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts"
sectionPagesMenu = "main"

9
disabled_config.toml Normal file
View File

@ -0,0 +1,9 @@
[menu]
[[menu.main]]
identifier = "home"
name = "Home"
url = "/"
[[menu.main]]
identifier = "posts"
name = "Posts"
url = "/posts"

View File

@ -1,4 +1,12 @@
<div class="header">
<h1>{{ .Site.Title }}</h1>
</div>
{{ partial "navbar.html" }}
<div class="navbar">
<a href="{{ .Site.BaseURL }}">Home</a>
{{ $currentPage := . }}
{{ range .Site.Menus.main }}
<a class="sidebar-nav-item{{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} active{{end}}" href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
{{ end }}
<a href="https://bbaovanc.com" rel="noreferrer" target="_blank">Main Site</a>
</div>

View File

@ -1,5 +0,0 @@
<div class="navbar">
<a href="/blog/">Home</a>
<a href="/blog/posts/">Posts</a>
<a href="https://bbaovanc.com" rel="noreferrer" target="_blank">Main Site</a>
</div>