fix(website): block out link and highlight current page in nav bar

pull/177/head
TorchedSammy 2022-06-22 15:18:57 -04:00
parent 2e0eabbac7
commit a6aa58f8fb
Signed by: sammyette
GPG Key ID: 904FC49417B44DCD
2 changed files with 26 additions and 26 deletions

View File

@ -7,17 +7,17 @@ theme = 'hsh'
[[menu.nav]]
identifier = 'home'
name = 'Home'
url = '/'
pageref = '/'
weight = 1
[[menu.nav]]
identifier = 'install'
name = 'Install'
url = '/install'
pageref = '/install/'
weight = 2
[[menu.nav]]
identifier = 'docs'
name = 'Docs'
url = '/docs'
pageref = '/docs/'
weight = 3
[markup.goldmark.renderer]

View File

@ -1,7 +1,7 @@
<header>
<nav class="navbar navbar-expand-md sticky-top bg-light">
<div class="container-fluid">
<a class="navbar-brand" href="#">
<a class="navbar-brand" href="/Hilbish">
<img src="/Hilbish/hilbish-flower.png" alt="" height="24" class="d-inline-block align-text-top">
Hilbish
</a>
@ -13,7 +13,7 @@
{{ $currentPage := . }}
{{ range .Site.Menus.nav }}
<li class="nav-item">
<a href="{{ .URL }}" class="nav-link {{ if $currentPage.HasMenuCurrent "nav" . }}active{{ end }}">
<a {{ if not ($currentPage.IsMenuCurrent "nav" .) }}href="{{ .URL }}"{{ end }} class="nav-link {{ if $currentPage.IsMenuCurrent "nav" . }}active{{ end }}">
{{ .Name }}
</a>
</li>