From b22de81f9ead229462a4d6c200bab9b2e68243c7 Mon Sep 17 00:00:00 2001 From: Will Faught Date: Fri, 7 Apr 2023 23:16:05 -0700 Subject: [PATCH] Add underline menu style --- README.md | 2 +- layouts/partials/paige/menu.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58ed4994..ea71a387 100644 --- a/README.md +++ b/README.md @@ -218,7 +218,7 @@ paige: math: false # Enable math typesetting menu: breakpoint: "sm" # Bootstrap breakpoint at which to display all menu items - style: "pills" # Must be "links" or "pills" + style: "pills" # Must be "links", "pills", or "underline" rss: hide_page: false managing_editor: "" diff --git a/layouts/partials/paige/menu.html b/layouts/partials/paige/menu.html index 92c5ea3b..77690312 100644 --- a/layouts/partials/paige/menu.html +++ b/layouts/partials/paige/menu.html @@ -3,6 +3,7 @@ {{ $basepath := path.Clean (urls.Parse site.BaseURL).Path }} {{ $breakpoint := $page.Param "paige.menu.breakpoint" | default "sm" }} {{ $pills := false }} +{{ $underline := false }} {{ if eq $basepath "/" }} {{ $basepath = "" }} @@ -13,6 +14,8 @@ {{ with $page.Param "paige.menu.style" }} {{ if eq . "pills" }} {{ $pills = true }} + {{ else if eq . "underline" }} + {{ $underline = true }} {{ else if ne . "links" }} {{ errorf "paige/menu: invalid menu style: %q" . }} {{ end }} @@ -26,7 +29,7 @@