diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a848f58a66f436d9913a1f2f7ddae9a031384c2b..3bcafc597333c3e577a23dcbc26999fd97a6c29f 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -10,10 +10,7 @@ {{ partial "head/script.html" . }} {{ partial "head/extras.html" . }} </head> - {{ $body_class := printf "%s__%s" .Type .Kind }} - {{ $pageclass := partial "GetBodyclass" . }} - {{ $body_class = printf "%s %s" $body_class $pageclass }} - <body class="{{ $body_class }}"> + <body class="{{ partial "GetBodyclass" . }}"> {{- partial "header/accessibility.html" -}} {{- partial "header/header.html" . -}} <main{{ if .Params.blocks }} class="page-with-blocks"{{ end }} id="main" tabindex="-1"> diff --git a/layouts/partials/GetBodyclass b/layouts/partials/GetBodyclass index fa0e7f7f6e5b652455698a35ffd01877e53500e4..a200ed2c1f0a4683fc0345b9fde0d22656e7329b 100644 --- a/layouts/partials/GetBodyclass +++ b/layouts/partials/GetBodyclass @@ -1,15 +1,13 @@ {{ $bodyclass := .Params.bodyclass | default "" }} -{{ if ne $bodyclass "" }} - {{ $bodyclass = printf "page%s" $bodyclass }} -{{ end }} +{{ $bodyclass = printf "%s__%s %s" .Type .Kind $bodyclass }} {{ if .Params.design.full_width }} - {{ $bodyclass = printf "full-width %s" $bodyclass }} + {{ $bodyclass = printf "%s full-width" $bodyclass }} {{ end }} {{ if .Params.design.toc.offcanvas }} - {{ $bodyclass = printf "offcanvas-toc %s" $bodyclass }} + {{ $bodyclass = printf "%s offcanvas-toc" $bodyclass }} {{ end }} {{ return $bodyclass }} \ No newline at end of file