Clean up: separate class logic from its usage
This commit is contained in:
parent
fe4bbc01ce
commit
59d75b874f
@ -13,14 +13,16 @@
|
||||
{{ end }}
|
||||
</head>
|
||||
|
||||
<body class="
|
||||
{{- $bodyClass := "" -}}
|
||||
{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) -}}
|
||||
{{- print "list" -}}
|
||||
{{- $bodyClass = print $bodyClass " list" -}}
|
||||
{{- end -}}
|
||||
{{- if eq site.Params.defaultTheme `dark` -}}
|
||||
{{- print " dark" }}
|
||||
{{- $bodyClass = print $bodyClass " dark" -}}
|
||||
{{- end -}}
|
||||
" id="top">
|
||||
|
||||
|
||||
<body class="{{ $bodyClass }}" id="top">
|
||||
{{- partialCached "header.html" . .Page -}}
|
||||
<main class="main">
|
||||
{{- block "main" . }}{{ end }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user