From 2acfb3b8771ec833a2533db4d62deb809f604ee4 Mon Sep 17 00:00:00 2001 From: Xin Date: Sat, 28 Dec 2024 18:06:15 +0000 Subject: [PATCH] chore: test new sidebar rendering --- layouts/_default/list.html | 4 +++- layouts/_default/single.html | 2 +- layouts/_default/wide.html | 2 +- layouts/blog/list.html | 2 +- layouts/blog/single.html | 2 +- layouts/hextra-home.html | 2 +- layouts/index.html | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 72c4833..01d4259 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,8 @@ {{ define "main" }}
- {{ partial "sidebar.html" (dict "context" .) }} + {{- if not (in (slice "taxonomy" "term") .Kind) -}} + {{- partial "sidebar-ng.html" (dict "context" .) -}} + {{- end -}} {{ partial "toc.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fb8c990..b4c6ee2 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} + {{ partial "sidebar-ng.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} {{ partial "toc.html" . }}
diff --git a/layouts/_default/wide.html b/layouts/_default/wide.html index ec7abe1..af0045a 100644 --- a/layouts/_default/wide.html +++ b/layouts/_default/wide.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" false) }} + {{ partial "sidebar-ng.html" (dict "context" . "disableSidebar" true "displayPlaceholder" false) }}

{{ if .Title }}

{{ .Title }}

{{ end }} diff --git a/layouts/blog/list.html b/layouts/blog/list.html index 5f0cca7..3668f68 100644 --- a/layouts/blog/list.html +++ b/layouts/blog/list.html @@ -1,7 +1,7 @@ {{ define "main" }} {{- $readMore := (T "readMore") | default "Read more →" -}}
- {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} + {{ partial "sidebar-ng.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }}

diff --git a/layouts/blog/single.html b/layouts/blog/single.html index 75fa392..2d4ff2e 100644 --- a/layouts/blog/single.html +++ b/layouts/blog/single.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} + {{ partial "sidebar-ng.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} {{ partial "toc.html" . }}
diff --git a/layouts/hextra-home.html b/layouts/hextra-home.html index 54d792d..ea0c54c 100644 --- a/layouts/hextra-home.html +++ b/layouts/hextra-home.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ partial "sidebar.html" (dict "context" . "disableSidebar" true) }} + {{ partial "sidebar-ng.html" (dict "context" . "disableSidebar" true) }}
{{ .Content }} diff --git a/layouts/index.html b/layouts/index.html index 2b99236..6805f3a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,6 +1,6 @@ {{ define "main" }}
- {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} + {{ partial "sidebar-ng.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} {{ partial "toc.html" . }}