aboutsummaryrefslogtreecommitdiffstats
path: root/layouts
diff options
context:
space:
mode:
authoryingyu5658 <yingyu5658@outlook.com>2025-08-02 18:00:40 +0800
committeryingyu5658 <yingyu5658@outlook.com>2025-08-02 18:00:40 +0800
commit0e061e76a956f7ac879544937b5b95c04815ad24 (patch)
tree31c90aaa93cff94282bce7790054bfda83723b6d /layouts
parent2e3ab877911e60d5fa3b780d4ebe541400b4772a (diff)
downloadhugo-theme-concise-0e061e76a956f7ac879544937b5b95c04815ad24.tar.gz
hugo-theme-concise-0e061e76a956f7ac879544937b5b95c04815ad24.zip
移除single.html中的header引用
优化日期格式
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/list.html4
-rw-r--r--layouts/_default/single.html13
3 files changed, 12 insertions, 7 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 7091b0f..b70cb34 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -4,7 +4,7 @@
dir="{{ or site.Language.LanguageDirection `ltr` }}"
>
<head>
- {{ partial "head.html" . }}
+<meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }}
</head>
<body>
<main>{{ block "main" . }}{{ end }}</main>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index f78fbf8..e5e9052 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,5 +1,7 @@
{{ define "main" }}
- <header>{{ partial "header.html" . }}</header>
+ <header>
+ {{ partial "header.html" . }}
+ </header>
{{ .Content }}
<!-- 创建分页器对象 -->
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b9dba40..90bfe38 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,10 +1,13 @@
{{ define "main" }}
- <header>{{ partial "header.html" . }}</header>
- <h1>{{ .Title }}</h1>
-<time datetime="{{ .Date | time.Format "2006-01-02" }}">
- {{ .Date | time.Format "2006-01-02" }}
- </time>
+ <header>
+ <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>{{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }}</title> {{ partialCached "head/css.html" . }} {{ partialCached "head/js.html" . }}
+ </header>
+ <h1 class="inner-post-title">{{ .Title }}</h1>
+<time datetime="{{ .Date | time.Format "2006-01-02" }}">
+ {{ .Date | time.Format "Jan. 2, 2006" }}
+</time>
+ <hr>
<div class="post-content">
{{ .Content | safeHTML}}
</div>