diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 98cc815..081277b 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -6,7 +6,14 @@ {{- 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 -}}
{{- block "left-sidebar" . -}} {{ partial "sidebar/left.html" . }}