diff --git a/README.md b/README.md
index 512500d..c4e9bd7 100755
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# Paper v4.5 (Dark Mode)
+# Paper v4.7 (Dark Mode)
A simple, clean, flexible Hugo theme.
@@ -39,3 +39,7 @@ theme = "paper"
```
For more information read the official [guide](https://gohugo.io/getting-started/quick-start/#step-3-add-a-theme) of Hugo.
+
+## Dark Mode
+
+It's automatic, according to the natural time of day and night.
diff --git a/layouts/404.html b/layouts/404.html
index aab2e1f..ab966ff 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,3 +1,3 @@
-{{ partial "header.html" . }}
+{{- partial "header.html" . }}
404
-{{ partial "footer.html" . }}
\ No newline at end of file
+{{- partial "footer.html" . }}
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index f734ee9..30acea5 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,16 +1,21 @@
-{{ partial "header.html" . }}
+{{- partial "header.html" . }}
-
-{{ if not .IsHome }}
-
+{{- $scope := .Site }}
+{{- if .Title }}
+{{ $scope = . }}
{{ end }}
-{{ $paginator := .Paginate (where .Site.RegularPages ".Params.type" "!=" "page") }}
+{{- $paginator := .Paginate (where $scope.RegularPages ".Params.type" "!=" "page") }}
-{{ range $index, $page := $paginator.Pages }}
-
+{{- range $index, $page := $paginator.Pages }}
+
+{{- $class := "post-entry" }}
+{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0)) }}
+{{- $class = "first-entry" }}
+{{- else if .Data.Term }}
+{{- $class = "post-entry tag-entry" }}
+{{- end }}
+
@@ -22,19 +27,19 @@
-{{ end }}
+{{- end }}
-{{ if gt $paginator.TotalPages 1 }}
+{{- if gt $paginator.TotalPages 1 }}
-{{ end }}
+{{- end }}
-{{ partial "footer.html" . }}
+{{- partial "footer.html" . }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 896588a..f32960a 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,28 +1,28 @@
-{{ partial "header.html" . }}
+{{- partial "header.html" . }}
{{ .Content }}
- {{ if .Params.tags }}
+ {{- if .Params.tags }}
- {{ end }}
+ {{- end }}
- {{ if not (eq .Params.comments false) }}
- {{ if .Site.DisqusShortname }}
+ {{- if not (eq .Params.comments false) }}
+ {{- if .Site.DisqusShortname }}
-
+
diff --git a/static/style.css b/static/style.css
index 7d5c453..3ddcd1d 100644
--- a/static/style.css
+++ b/static/style.css
@@ -3,7 +3,7 @@
* A simple, clean, flexible Hugo theme
* https://github.com/nanxiaobei/hugo-paper
* Designed by MR.LEE (https://mrlee.me/)
- * Updated in 2019.10.17
+ * Updated in 2020.5.15
*/
/* Theme
@@ -18,29 +18,33 @@
--radius: 8px;
--theme: #fff;
+ --entry: #fff;
--primary: rgba(0, 0, 0, 0.88);
--secondary: rgba(0, 0, 0, 0.56);
--tertiary: rgba(0, 0, 0, 0.16);
+ --content: rgba(0, 0, 0, 0.88);
--hljs-bg: #1c1d21;
--code-bg: #f5f5f5;
--border: #eee;
}
.dark {
- --theme: #3c3c3c;
- --primary: rgba(255, 255, 255, 0.88);
+ --theme: #1d1d1d;
+ --entry: #333;
+ --primary: rgba(255, 255, 255, 0.8);
--secondary: rgba(255, 255, 255, 0.56);
--tertiary: rgba(255, 255, 255, 0.16);
+ --content: rgba(255, 255, 255, 0.64);
--hljs-bg: #2a2a2a;
- --code-bg: #4f4f4f;
+ --code-bg: #333;
--border: #5f5f5f;
}
.list {
background: linear-gradient(135deg, #ddd, #f5f5f5, #d5d5d5);
}
.dark.list {
- background: linear-gradient(135deg, #1c1c1c, #2a2a2a, #000);
+ background: linear-gradient(135deg, #1b1b1b, #252525, #000);
}
/* Reset
-------------------------------------------------- */
@@ -56,7 +60,7 @@ body {
margin: 0;
color: var(--primary);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell,
- 'Open Sans', 'Helvetica Neue', sans-serif;
+ 'Open Sans', 'Helvetica Neue', sans-serif;
font-size: 18px;
line-height: 1.8;
word-break: break-word;
@@ -82,6 +86,7 @@ h5,
h6 {
margin-top: 0;
margin-bottom: 0;
+ color: var(--primary);
line-height: 1.2;
}
p {
@@ -238,13 +243,17 @@ img {
position: relative;
margin-bottom: var(--gap);
padding: var(--gap);
- background: var(--theme);
+ background: var(--entry);
border-radius: var(--radius);
transition: transform 0.1s;
}
.post-entry:active {
transform: scale(0.96);
}
+.tag-entry .entry-content,
+.tag-entry .entry-footer {
+ display: none;
+}
.entry-header h2 {
font-size: 24px;
}
@@ -285,6 +294,9 @@ img {
color: var(--secondary);
font-size: 14px;
}
+.post-content {
+ color: var(--content);
+}
.post-content h1 {
margin-top: 40px;
margin-bottom: 32px;