Skip to content
Snippets Groups Projects
Commit 8cad78db authored by alexisben's avatar alexisben
Browse files

refacto layout bodyclass

parent 624b0699
Loading
......@@ -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">
......
{{ $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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment