summaryrefslogtreecommitdiffstats
path: root/themes/aoidh/layouts/_partials
diff options
context:
space:
mode:
authorSam Anthony <sam@samanthony.xyz>2025-12-23 13:47:44 -0330
committerSam Anthony <sam@samanthony.xyz>2025-12-23 13:47:44 -0330
commit536494b1e9bd5eda363837faacbed0ad46bfc5ae (patch)
treef6605c4c2c0a04923128090a4c232cdc62b112ca /themes/aoidh/layouts/_partials
parentad1bb9787eb2317571cd3d1bfcd5a8b22df4803f (diff)
downloadsamanthony.xyz-536494b1e9bd5eda363837faacbed0ad46bfc5ae.zip
theme: css and nav
Diffstat (limited to 'themes/aoidh/layouts/_partials')
-rw-r--r--themes/aoidh/layouts/_partials/head/css.html10
-rw-r--r--themes/aoidh/layouts/_partials/menu.html25
2 files changed, 9 insertions, 26 deletions
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 }}
- <link rel="stylesheet" href="{{ .RelPermalink }}">
- {{- else }}
- {{- with . | minify | fingerprint }}
- <link rel="stylesheet" href="{{ .RelPermalink }}" integrity="{{ .Data.Integrity }}" crossorigin="anonymous">
- {{- end }}
- {{- end }}
+{{- with resources.Get "css/aoidh.css" }}
+ <link rel="stylesheet" href="{{ .RelPermalink }}">
{{- 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 }}
<li>
<a
- {{- range $k, $v := $attrs }}
- {{- with $v }}
- {{- printf " %s=%q" $k $v | safeHTMLAttr }}
- {{- end }}
- {{- end -}}
- >{{ $name }}</a>
+ {{ if $page.IsMenuCurrent .Menu . }}
+ class="nav-active"
+ {{ else if $page.HasMenuCurrent .Menu . }}
+ class="nav-ancestor"
+ {{ end }}
+ {{ printf "href=%q" .URL | safeHTMLAttr }}
+ >{{ .Name }}</a>
{{- with .Children }}
<ul>
{{- partial "inline/menu/walk.html" (dict "page" $page "menuEntries" .) }}