aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials
diff options
context:
space:
mode:
authorverdant <im@verdant.ee>2026-05-31 16:36:13 +0800
committerverdant <im@verdant.ee>2026-05-31 16:36:13 +0800
commitd91f48c4945acd1b9f76a79d7804580b70b0c2df (patch)
tree6844217a5b61d31d6d2a837fb708db411825bc5c /layouts/partials
parent7876c3763897092266e535cd464d45637862d73b (diff)
downloadblog-d91f48c4945acd1b9f76a79d7804580b70b0c2df.tar.gz
blog-d91f48c4945acd1b9f76a79d7804580b70b0c2df.zip
Refactor: remove bloated CSS style and nested HTML layouts
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/footer.html4
-rw-r--r--layouts/partials/nav.html7
-rw-r--r--layouts/partials/seo_tags.html34
3 files changed, 15 insertions, 30 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
index a40be26..e155231 100644
--- a/layouts/partials/footer.html
+++ b/layouts/partials/footer.html
@@ -1,3 +1 @@
-<div class="copyright">
- {{ .Site.Params.footer.content | markdownify }}
-</div>
+<footer>© 2024 - 2026 Verdant.</footer>
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index ad2f6d1..864a499 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,6 +1 @@
-{{ range .Site.Menus.main }}
-[<a href="{{ .URL }}">{{ .Name }}</a>]
-{{ end }}
-{{ with .Site.GetPage "/blog" }}
-<a href="{{ "blog/" | relURL }}">Blog</a>
-{{ end }}
+<nav>[<a href=/>首页</a>][<a href=/categories>分类</a>][<a href=/archives/>归档</a>][<a href=/links>链接</a>][<a href=/about/>关于</a>]</nav>
diff --git a/layouts/partials/seo_tags.html b/layouts/partials/seo_tags.html
index 4f594fd..96d390e 100644
--- a/layouts/partials/seo_tags.html
+++ b/layouts/partials/seo_tags.html
@@ -1,21 +1,13 @@
-<!-- Primary Meta Tags -->
-<meta name="title" content="{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}" />
-<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with .Site.Params.Description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
-<meta name="keywords" content="{{ if .IsPage }}{{ range $index, $tag := .Params.tags }}{{ $tag }},{{ end }}{{ else }}{{ range $plural, $terms := .Site.Taxonomies }}{{ range $term, $val := $terms }}{{ printf "%s," $term }}{{ end }}{{ end }}{{ end }}" />
-
-<meta property="og:site_name" content="{{ .Site.Title }}">
- <meta property="og:title" content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
- <meta property="og:url" content="{{ .Permalink }}">
- <meta property="og:description" content="{{ if .Description }}{{ .Description }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
- <meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}">
-
-<link rel="canonical" href="{{ .Permalink }}">
-
-<!-- Open Graph / Facebook -->
-{{ template "_internal/opengraph.html" . }}
-
-<!-- Twitter -->
-{{ template "_internal/twitter_cards.html" . }}
-
-<!-- Microdata -->
-{{ template "_internal/schema.html" . }}
+<link rel=canonical href={{ .Permalink }}>
+<meta name=title content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
+<meta name=description content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary | plainify | truncate 120 }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
+
+<meta property=og:site_name content="{{ .Site.Title }}">
+<meta property=og:title content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
+<meta property=og:url content="{{ .Permalink }}">
+<meta property=og:description content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary | plainify | truncate 120 }}{{ else }}{{ .Site.Params.Description }}{{ end }}">
+<meta property=og:type content="{{ if .IsPage }}article{{ else }}website{{ end }}">
+
+<meta name=twitter:card content="summary">
+<meta name=twitter:title content="{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ .Title }}{{ end }}">
+<meta name=twitter:description content="{{ if .Description }}{{ .Description }}{{ else if .IsPage }}{{ .Summary | plainify | truncate 120 }}{{ else }}{{ .Site.Params.Description }}{{ end }}">