Implement links in NavBar

This commit is contained in:
Pau 2022-12-23 01:28:38 +01:00
parent b93e3da93e
commit aa4e158d16
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@ theme = "sophie-lewis"
[params]
#navbar = ["about", "writing", "get-in-touch"]
navbar = ["home", "about", "writing", "videos", "audio", "events", "get-in-touch"]
navbar = ["about", "writing", "videos", "audio", "events", "get-in-touch"]
[params.header]
name = "Sophie Lewis"

View File

@ -1,14 +1,14 @@
<nav>
<div class="tabs is-fullwidth nav-tabs is-uppercase">
<ul>
<li{{ if eq $.Page.Params.Title "index" }} class="is-active"{{ end }}><a href="/">Home</a></li>
{{ range $nav_tab := site.Params.navbar }}
{{ $nav_title := replace $nav_tab "-" " " | title }}
{{ if eq $.Page.Params.title $nav_title }}
{{ $nav_title := replace $nav_tab "-" " " | title }}
{{ if eq $.Page.Params.title $nav_title }}
<li class="is-active"><a href="/{{$nav_tab}}">{{ $nav_title }}</a></li>
{{ else }}
{{else}}
<li><a href="/{{$nav_tab}}">{{ $nav_title }}</a></li>
{{ end }}
{{ end }}
{{/* <li><a>About</a></li>
<li><a>Writing</a></li>