aboutsummaryrefslogtreecommitdiff
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/single/header.html2
-rw-r--r--layouts/partials/walk.html16
2 files changed, 11 insertions, 7 deletions
diff --git a/layouts/partials/single/header.html b/layouts/partials/single/header.html
index 5566c56..c1c60a2 100644
--- a/layouts/partials/single/header.html
+++ b/layouts/partials/single/header.html
@@ -8,5 +8,5 @@
</div>
{{ end }}
{{ if .Params.Image }}
- <img class="d-block img-fluid mb-2 rounded border shadow" max-width="800" loading="lazy" src="{{ .RelPermalink }}{{.Params.Image}}" />
+ <img class="d-block img-fluid mb-2 rounded border shadow" loading="lazy" src="{{ .RelPermalink }}{{.Params.Image}}" />
{{ end }} \ No newline at end of file
diff --git a/layouts/partials/walk.html b/layouts/partials/walk.html
index e115d6f..addf6f6 100644
--- a/layouts/partials/walk.html
+++ b/layouts/partials/walk.html
@@ -1,10 +1,9 @@
{{- $page := .page }}
{{- range .menuEntries }}
{{- $attrs := dict "href" .URL }}
+ {{- $attrs = merge $attrs (dict "class" "nav-link") }}
{{- 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") }}
+ {{- $attrs = merge $attrs (dict "class" "active nav-link" "aria-current" "page") }}
{{- end }}
{{- $name := .Name }}
{{- with .Identifier }}
@@ -15,10 +14,15 @@
<li class="nav-item {{if .Children}}dropdown{{end}}">
<a
{{if .Children}}
- class="nav-link dropdown-toggle" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false"
- {{ else }}
- class="nav-link" href="{{.URL}}"
+ role="button"
+ data-bs-toggle="dropdown"
+ aria-expanded="false"
{{ end }}
+ {{- range $k, $v := $attrs }}
+ {{- with $v }}
+ {{- printf " %s=%q" $k $v | safeHTMLAttr }}
+ {{- end }}
+ {{- end -}}
>{{ $name }}</a>
{{- with .Children }}
<ul class="dropdown-menu">