mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2024-11-27 04:03:48 +01:00
feat: same container width on all pages (#534)
This commit is contained in:
parent
8f5164b5b9
commit
07e1b856b0
1 changed files with 8 additions and 1 deletions
|
@ -6,7 +6,14 @@
|
|||
</head>
|
||||
<body class="{{ block `body-class` . }}{{ end }}">
|
||||
{{- partial "head/colorScheme" . -}}
|
||||
{{- $hasWidget := default (gt (len .Site.Params.widgets.homepage) 0) (.Scratch.Get "hasWidget") -}}
|
||||
|
||||
{{/* The container is wider when there's any activated widget */}}
|
||||
{{- $hasWidget := false -}}
|
||||
{{- range .Site.Params.widgets -}}
|
||||
{{- if gt (len .) 0 -}}
|
||||
{{- $hasWidget = true -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
<div class="container main-container flex on-phone--column {{ if $hasWidget }}extended{{ else }}compact{{ end }}">
|
||||
{{- block "left-sidebar" . -}}
|
||||
{{ partial "sidebar/left.html" . }}
|
||||
|
|
Loading…
Reference in a new issue