From 536494b1e9bd5eda363837faacbed0ad46bfc5ae Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Tue, 23 Dec 2025 13:47:44 -0330 Subject: theme: css and nav --- themes/aoidh/layouts/_partials/head/css.html | 10 ++-------- themes/aoidh/layouts/_partials/menu.html | 25 +++++++------------------ 2 files changed, 9 insertions(+), 26 deletions(-) (limited to 'themes/aoidh/layouts/_partials') diff --git a/themes/aoidh/layouts/_partials/head/css.html b/themes/aoidh/layouts/_partials/head/css.html index d76d23a..dec8013 100644 --- a/themes/aoidh/layouts/_partials/head/css.html +++ b/themes/aoidh/layouts/_partials/head/css.html @@ -1,9 +1,3 @@ -{{- with resources.Get "css/main.css" }} - {{- if hugo.IsDevelopment }} - - {{- else }} - {{- with . | minify | fingerprint }} - - {{- end }} - {{- end }} +{{- with resources.Get "css/aoidh.css" }} + {{- end }} diff --git a/themes/aoidh/layouts/_partials/menu.html b/themes/aoidh/layouts/_partials/menu.html index 14245b5..485fe0b 100644 --- a/themes/aoidh/layouts/_partials/menu.html +++ b/themes/aoidh/layouts/_partials/menu.html @@ -21,26 +21,15 @@ Renders a menu for the given menu ID. {{- define "_partials/inline/menu/walk.html" }} {{- $page := .page }} {{- range .menuEntries }} - {{- $attrs := dict "href" .URL }} - {{- if $page.IsMenuCurrent .Menu . }} - {{- $attrs = merge $attrs (dict "class" "active" "aria-current" "page") }} - {{- else if $page.HasMenuCurrent .Menu .}} - {{- $attrs = merge $attrs (dict "class" "ancestor" "aria-current" "true") }} - {{- end }} - {{- $name := .Name }} - {{- with .Identifier }} - {{- with T . }} - {{- $name = . }} - {{- end }} - {{- end }}
  • {{ $name }} + {{ if $page.IsMenuCurrent .Menu . }} + class="nav-active" + {{ else if $page.HasMenuCurrent .Menu . }} + class="nav-ancestor" + {{ end }} + {{ printf "href=%q" .URL | safeHTMLAttr }} + >{{ .Name }} {{- with .Children }}