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