aboutsummaryrefslogtreecommitdiffstats
path: root/code/frontpage/layouts/partials/sidebar/manual-default-menu.html
diff options
context:
space:
mode:
authorivarlovlie <git@ivarlovlie.no>2022-12-11 20:46:58 +0100
committerivarlovlie <git@ivarlovlie.no>2022-12-11 20:47:06 +0100
commit6561771c435f9d9bed1589b5ed13d17aee0b7873 (patch)
tree2c47e60fa4aaaa5bf1e151838ac197a61f4377cc /code/frontpage/layouts/partials/sidebar/manual-default-menu.html
parent8da37c77cae0c7f712a775e3996afd9d84b0f9af (diff)
downloadgreatoffice-6561771c435f9d9bed1589b5ed13d17aee0b7873.tar.xz
greatoffice-6561771c435f9d9bed1589b5ed13d17aee0b7873.zip
feat: Add frontpage
Diffstat (limited to 'code/frontpage/layouts/partials/sidebar/manual-default-menu.html')
-rw-r--r--code/frontpage/layouts/partials/sidebar/manual-default-menu.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/code/frontpage/layouts/partials/sidebar/manual-default-menu.html b/code/frontpage/layouts/partials/sidebar/manual-default-menu.html
new file mode 100644
index 0000000..32c4cd4
--- /dev/null
+++ b/code/frontpage/layouts/partials/sidebar/manual-default-menu.html
@@ -0,0 +1,41 @@
+<!-- Manual default section menu -->
+{{ $currentPage := . -}}
+{{ $section := $currentPage.Section -}}
+{{ range (index .Site.Menus $section) -}}
+ <h3 class="h6 text-uppercase mb-2">{{ .Name }}</h3>
+ {{ if .HasChildren -}}
+ <ul class="list-unstyled">
+ {{ range .Children -}}
+ {{ if .HasChildren -}}
+ <h4 class="h6 text-uppercase ms-3 mt-3 mb-2">{{ .Name }}</h4>
+ {{ if .HasChildren -}}
+ <ul class="list-unstyled ms-3">
+ {{ range .Children -}}
+ {{ if .HasChildren -}}
+ <h5 class="h6 text-uppercase mt-2 mb-2">{{ .Name }}</h5>
+ {{ if .HasChildren -}}
+ <ul class="list-unstyled ms-3">
+ {{ range .Children -}}
+ {{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
+ {{- $active = or $active (eq $currentPage.Section .Identifier) -}}
+ <li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
+ {{ end -}}
+ </ul>
+ {{ end -}}
+ {{ else -}}
+ {{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
+ {{- $active = or $active (eq $currentPage.Section .Identifier) -}}
+ <li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
+ {{ end -}}
+ {{ end -}}
+ </ul>
+ {{ end -}}
+ {{ else -}}
+ {{- $active := or ($currentPage.IsMenuCurrent $section .) ($currentPage.HasMenuCurrent $section .) -}}
+ {{- $active = or $active (eq $currentPage.Section .Identifier) -}}
+ <li><a class="docs-link{{ if $active }} active{{ end }}" href="{{ .URL | relURL }}">{{ .Name }}</a></li>
+ {{ end -}}
+ {{ end -}}
+ </ul>
+ {{ end -}}
+{{ end -}}