From cea7bd3bc0722e0b6a4d9c4255aa3d0a1774c0ae 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:44:06 +0800 Subject: [PATCH] :building_construction: Finish the header attributes redesign. --- layouts/_default/baseof.html | 4 ++-- layouts/partials/head.html | 14 +++++++------- layouts/partials/header.html | 4 ++-- layouts/partials/header/brand.html | 20 ++++++++++---------- layouts/partials/header/menus.html | 16 ++++++++-------- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 17c82f6..0fcb862 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,7 +5,7 @@ {{- $pluginVen := $P.vendors.plugins -}} {{- $pluginCDN := index $vendors $pluginVen -}} {{- .Scratch.Set "pluginCDN" $pluginCDN -}} -{{ $posts := len .Site.RegularPages }} +{{ $posts := len (where .Page.Site.RegularPages "Section" "in" .Site.Params.mainSections) }} {{- .Scratch.Set "posts" $posts -}} @@ -31,7 +31,7 @@
- {{- partial "header" (dict "P" $P "Page" .Page "Scratch" .Scratch) }} + {{- partial "header.html" . }}
{{- if ne $P.sidebar.display "remove" }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index f2ad28e..0b37d12 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,15 +1,15 @@ -{{- partial "head/meta" . }} +{{- partial "head/meta.html" . }} {{- if .Site.Params.openGraph.enable }} -{{- partial "head/opengraph" . }} +{{- partial "head/opengraph.html" . }} {{- end }} {{ if isset .Site.Params.openGraph "twitter" }} -{{- partial "head/twitter" . }} +{{- partial "head/twitter.html" . }} {{- end }} {{- if isset .Site.Params.openGraph "googleplus" }} -{{- partial "head/googleplus" . }} +{{- partial "head/googleplus.html" . }} {{- end }} {{- if isset .Site.Params.openGraph "facebook" }} -{{- partial "head/facebook" . }} +{{- partial "head/facebook.html" . }} {{- end }} -{{ partial "head/verify" . }} -{{- partial "head/style" . }} \ No newline at end of file +{{ partial "head/verify.html" . }} +{{- partial "head/style.html" . }} \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html index cda1966..01f3aaa 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,2 +1,2 @@ -{{ partial "header/brand" . }} -{{ partial "header/menus" . }} \ No newline at end of file +{{ partial "header/brand.html" . }} +{{ partial "header/menus.html" . }} \ No newline at end of file diff --git a/layouts/partials/header/brand.html b/layouts/partials/header/brand.html index 41450d8..29d36b9 100644 --- a/layouts/partials/header/brand.html +++ b/layouts/partials/header/brand.html @@ -1,4 +1,4 @@ -{{ $title := .Page.Site.Title }} +{{ $title := .Site.Title }}