feat: migrate layouts/_partials/layouts to layouts/_partials/base

This commit is contained in:
Cell
2026-05-20 10:16:46 +08:00
parent 4ffd531d63
commit f76b6a1f1c
17 changed files with 15 additions and 15 deletions
@@ -8,7 +8,7 @@
- SEO: Schema.org structured data for pages and homepage
- SCRIPT: Early-loaded scripts (e.g., theme color scheme detection)
Called from: layouts/baseof.html
Called from: base/baseof.html
*/ -}}
{{- $fingerprint := .Site.Store.Get "fingerprint" -}}
@@ -34,7 +34,7 @@
{{- template "_internal/schema.html" . -}}
{{- template "_internal/opengraph.html" . -}}
{{- partial "layouts/head/twitter-cards.html" . -}}
{{- partial "base/head/twitter-cards.html" . -}}
{{- partial "plugin/pagefind-metadata.html" . -}}
+6 -6
View File
@@ -10,14 +10,14 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="robots" content="noodp" />
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
{{- partial "layouts/head/index.html" . -}}
{{- partial "base/head/index.html" . -}}
{{- /* TODO preload script https://developer.mozilla.org/zh-CN/docs/Web/HTML/Attributes/rel/preload */ -}}
</head>
<body data-instant-intensity="viewport" data-header-desktop="{{ .Site.Params.header.desktopMode }}" data-header-mobile="{{ .Site.Params.header.mobileMode }}">
{{- /* Body wrapper */ -}}
<div class="wrapper" data-page-style="{{ (partial `function/params.html`).pageStyle | default `normal` }}">
{{- partial "layouts/header.html" . -}}
{{- partial "layouts/breadcrumb.html" . -}}
{{- partial "base/header.html" . -}}
{{- partial "base/breadcrumb.html" . -}}
{{- $toc := .Store.Get "toc" -}}
<main class="fi-container"{{ if (eq $toc.enable true) | and (eq $toc.position `left`) }} data-reverse{{ end }}>
{{- block "content" . }}{{ end -}}
@@ -25,13 +25,13 @@
{{- /* Comment */ -}}
{{- block "comments" . }}{{ end -}}
{{- /* Footer */ -}}
{{- partialCached "layouts/footer.html" . -}}
{{- partialCached "base/footer.html" . -}}
</div>
{{- /* Theme widgets */ -}}
{{- partial "layouts/widgets.html" . -}}
{{- partial "base/widgets.html" . -}}
{{- /* Load JavaScript scripts and CSS */ -}}
{{- partial "layouts/assets.html" . -}}
{{- partial "base/assets.html" . -}}
</body>
</html>
+1 -1
View File
@@ -65,5 +65,5 @@
{{- end -}}
{{- define "comments" -}}
{{- partial "layouts/comment.html" . -}}
{{- partial "base/comment.html" . -}}
{{- end -}}
+1 -1
View File
@@ -61,7 +61,7 @@
</article>
{{- end -}}
{{- end -}}
{{- partial "layouts/paginator.html" . -}}
{{- partial "base/paginator.html" . -}}
{{- end -}}
</div>
{{- end -}}
+1 -1
View File
@@ -49,7 +49,7 @@
{{- range $pages.Pages -}}
{{- .Render "summary" -}}
{{- end -}}
{{- partial "layouts/paginator.html" . -}}
{{- partial "base/paginator.html" . -}}
{{- end -}}
</div>
{{- end -}}
+1 -1
View File
@@ -29,5 +29,5 @@
{{- end -}}
{{- define "comments" -}}
{{- partial "layouts/comment.html" . -}}
{{- partial "base/comment.html" . -}}
{{- end -}}
+1 -1
View File
@@ -255,5 +255,5 @@
{{- end -}}
{{- define "comments" -}}
{{- partial "layouts/comment.html" . -}}
{{- partial "base/comment.html" . -}}
{{- end -}}
+1 -1
View File
@@ -61,7 +61,7 @@
</article>
{{- end -}}
{{- end -}}
{{- partial "layouts/paginator.html" . -}}
{{- partial "base/paginator.html" . -}}
{{- end -}}
</div>
{{- end -}}
+1 -1
View File
@@ -46,7 +46,7 @@
</article>
{{- end -}}
{{- end -}}
{{- partial "layouts/paginator.html" . -}}
{{- partial "base/paginator.html" . -}}
{{- end -}}
</div>
{{- end -}}