From 475d181aac9e3f1e48c7057683cb411b8f71a9bd Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 30 Sep 2023 04:46:40 +0800 Subject: [PATCH] refactor: optimize the basic layouts --- _layouts/default.html | 31 +++--- _layouts/home.html | 15 +-- _layouts/page.html | 12 +-- _layouts/post.html | 212 +++++++++++++++++++-------------------- _sass/addon/commons.scss | 13 +-- 5 files changed, 134 insertions(+), 149 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index 9f83e81..f938a94 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -8,14 +8,8 @@ layout: compress {% include lang.html %} -{% capture prefer_mode %} - {% if site.theme_mode %} - data-mode="{{ site.theme_mode }}" - {% endif %} -{% endcapture %} - -{% if layout.tail_includes %} - {% assign has_tail = true %} +{% if site.theme_mode %} + {% capture prefer_mode %}data-mode="{{ site.theme_mode }}"{% endcapture %} {% endif %} @@ -30,11 +24,12 @@ layout: compress {% include topbar.html lang=lang %}