diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 0917b348c6..c78fedb9a2 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -4,7 +4,7 @@ {{ hugo.Generator -}} - {{- partial "meta.html" . }} + {{ partial "meta.html" . }} {{ partial "favicon.html" . }} {{ .Title }} {{ default "::" .Site.Params.titleSeparator }} {{ .Site.Title }} @@ -59,24 +59,27 @@ {{ end }} {{ end }} {{$toc := (and (not .Params.disableToc) (not .Params.chapter))}} - {{ if $toc }} {{ partial "toc.html" . }} {{ end }} @@ -101,10 +104,23 @@ {{define "breadcrumb"}} {{$parent := .page.Parent }} + {{$depth := add .depth 1 }} {{ if $parent }} - {{ $value := (printf "%s > %s" $parent.RelPermalink $parent.Title .value) }} - {{ template "breadcrumb" dict "page" $parent "value" $value }} + {{ template "breadcrumb" dict "page" $parent "depth" $depth }} + {{end}} + {{ if .depth }} +
  • + + + {{ .page.Title }} + +
  • > {{else}} - {{.value|safeHTML}} +
  • + + + {{ .page.Title }} + +
  • {{end}} {{end}} diff --git a/static/css/theme.css b/static/css/theme.css index 0329ef850d..c13cc204ec 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1004,6 +1004,17 @@ td { #body #breadcrumbs span { padding: 0 0.1rem; } +#body #breadcrumbs .links { + display: inline; + padding: 0 0.1rem; +} +#body #breadcrumbs .links * { + display: inline-block; + padding: 0; +} +#body #breadcrumbs .links meta { + display: none; +} @media only all and (max-width: 59.938em) { #sidebar { width: 230px;