From e2141f3b443d5ecf7d939b31d411312369233a66 Mon Sep 17 00:00:00 2001 From: SerKo Date: Tue, 12 Apr 2022 01:33:08 +0800 Subject: [PATCH] feat: add nav bar menu items --- layouts/_default/baseof.html | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1bb2414..241fe4e 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,11 +14,29 @@ align-items:center ">
- Holy + Holy +
+ +
+ {{ $currentPage := . }} + {{ $active := "" }} + + {{ range .Site.Menus.main }} + {{ if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} + {{ $active = "active" }} + {{ end }} + + {{ .Name }} + + {{ end }}
- {{ $navBtn := `font:semibold px:8` }} - Home - About