From 1cf53273c3ba58f0593ecb7c2befe11274f51a4e Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sun, 26 Oct 2025 21:12:51 +0530 Subject: [PATCH] Fix defaultTheme selection as we are using data-theme attribute Refactor code for selecting class for body as list --- layouts/_default/baseof.html | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index db3a5068..c5775991 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,21 +3,25 @@ {{- end -}} - +{{- $theme := site.Params.defaultTheme | default "auto" }} +{{- if eq $theme "dark" }} + +{{- else if eq $theme "light" }} + +{{- else }} + +{{- end }} {{- partial "head.html" . }} - - {{- partialCached "header.html" . .Page -}} +{{- if (or (ne .Kind `page` ) (eq .Layout `archives`) (eq .Layout `search`)) }} + +{{- else }} + +{{- end }} + {{ partialCached "header.html" . .Page -}}
{{- block "main" . }}{{ end }}