summaryrefslogtreecommitdiff
path: root/layouts/partials/header.html
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-27 11:50:19 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2023-08-27 11:50:19 +0530
commit4d53954be9a98d67531794956f6376bba01af86d (patch)
treea76071adc0101caf48ace9a9219c4c304ba7905a /layouts/partials/header.html
parent68abbb9eb2449a674ec4f8d47ecf44771c8c2ec6 (diff)
added 404 page
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html20
1 files changed, 19 insertions, 1 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index ba1869b..0d8ac71 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -2,7 +2,25 @@
<nav id="global-nav">
{{ range .Site.Params.navLinks }}
{{ $path := index . 1 }}
- <a href="{{ $path }}" {{ if $.Params.navPath }}{{ $p := printf "/%s" $.Params.navPath | printf "%s" }}{{ if eq $path $p }}id="nav-link-active"{{ end }}{{ else }}{{ $p := printf "/%s" $.Section | printf "%s" }}{{ if eq $path $p }}id="nav-link-active"{{ end }}{{ end }}>
+ <a href="{{ $path }}"
+ {{ if $.Params.navPath }}
+ {{ if ne $.Params.navPath "" }}
+ {{ $p := printf "/%s" $.Params.navPath | printf "%s" }}
+
+ {{ if eq $path $p }}
+ id="nav-link-active"
+ {{ end }}
+ {{ end }}
+ {{ else }}
+ {{ if ne $.Section "" }}
+ {{ $p := printf "/%s" $.Section | printf "%s" }}
+
+ {{ if eq $path $p }}
+ id="nav-link-active"
+ {{ end }}
+ {{ end }}
+ {{ end }}
+ >
{{ index . 0 }}
</a>
{{ end }}