From 5ff613af40599625a5e162ae4c17f2f316d68832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=87=A1=E6=A2=A6=E6=98=9F=E5=B0=98?= Date: Wed, 1 Jun 2022 11:49:47 +0800 Subject: [PATCH] :building_construction: Finish the sidebar attributes redesign. --- layouts/_default/baseof.html | 2 +- layouts/partials/sidebar.html | 2 +- layouts/partials/sidebar/overview.html | 39 +++++++++++++------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0fcb862..b637f01 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -35,7 +35,7 @@ {{- if ne $P.sidebar.display "remove" }} - {{- partial "sidebar" (dict "P" $P "Page" .Page "Scratch" .Scratch) }} + {{- partial "sidebar.html" . }} {{- end }} diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 0b4818c..e000d99 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -26,7 +26,7 @@ {{ partial "sidebar/overview" . }} - {{- if and .P.backTop.enable .P.backTop.sidebar }} + {{- if and .Site.Params.backTop.enable .Site.Params.backTop.sidebar }}
0% diff --git a/layouts/partials/sidebar/overview.html b/layouts/partials/sidebar/overview.html index 954ab17..5338925 100644 --- a/layouts/partials/sidebar/overview.html +++ b/layouts/partials/sidebar/overview.html @@ -1,49 +1,48 @@ -{{- $author := .P.author }} -{{- $Site := .Page.Site }} +{{- $author := .Site.Params.author }} -{{- if .P.siteState }} +{{- if .Site.Params.siteState }} {{- end }} -{{- if and .P.chat.enable (or (or .P.chatra.enable .P.tidio.enable) .P.gitter.enable) }} +{{- if and .Site.Params.chat.enable (or (or .Site.Params.chatra.enable .Site.Params.tidio.enable) .Site.Params.gitter.enable) }} {{- end }} {{- $lang := .Scratch.Get "lang" }} -{{- with .P.creativeCommons }} +{{- with .Site.Params.creativeCommons }} {{- if .sidebar }}