diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 6f7c323..13839ef 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -14,27 +14,20 @@
{{ partial "prev_next.html" (dict "menu" .Site.Menus.main "page" . ) }} - +
- {{ partial "breadcrumb_recursive.html" (dict "menu" .Site.Menus.main "page" . ) }} + {{ partial "breadcrumb_recursive.html" (dict "menu" .Site.Menus.main "page" . ) }}
diff --git a/themes/doc-theme/layouts/partials/breadcrumb_recursive.html b/themes/doc-theme/layouts/partials/breadcrumb_recursive.html index ff1bfc6..64c875c 100644 --- a/themes/doc-theme/layouts/partials/breadcrumb_recursive.html +++ b/themes/doc-theme/layouts/partials/breadcrumb_recursive.html @@ -1,8 +1,12 @@ {{ $page := .page }} - {{ $prev := . }} +{{ $level := 1 }} +{{ $prev := . }} {{ range .menu }} + + + {{ $iz := eq $page.URL .URL}} {{ $haz := in $page.URL .URL}} @@ -14,7 +18,7 @@ {{ .Pre }} {{ .Name }} {{ if not $iz }}>{{ end }} {{ end }} - {{ partial "breadcrumb_recursive.html" (dict "menu" .Children "page" $page) }} + {{ partial "breadcrumb_recursive.html" (dict "menu" .Children "page" $page "level" $level) }} {{ if or $iz $haz }} @@ -36,3 +40,4 @@ {{ end }} {{ end }} + diff --git a/themes/doc-theme/layouts/partials/menu.html b/themes/doc-theme/layouts/partials/menu.html index 43bc128..01377ad 100644 --- a/themes/doc-theme/layouts/partials/menu.html +++ b/themes/doc-theme/layouts/partials/menu.html @@ -5,14 +5,12 @@ class="lighten-4 pt-0" style="overflow-y: hidden; overflow-x: hidden;" > -