aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Keller <tjkeller.xyz>2025-02-22 20:46:50 -0600
committerTim Keller <tjkeller.xyz>2025-02-22 20:46:50 -0600
commit597180d0e0920f016e1dc63a79ce07d7c11b2704 (patch)
tree8b4e388ec6d1ca5bb17a45086f3f9163005c7d56
parentc210dd6989046d2379a6ac161b7f95cafd5a0566 (diff)
downloadhugo-theme-tjkbasic-597180d0e0920f016e1dc63a79ce07d7c11b2704.tar.xz
hugo-theme-tjkbasic-597180d0e0920f016e1dc63a79ce07d7c11b2704.zip
tweak css and commas between tags and dont show empty dateHEADmaster
-rw-r--r--assets/stylesheets/style.css9
-rw-r--r--layouts/_default/single.html24
2 files changed, 17 insertions, 16 deletions
diff --git a/assets/stylesheets/style.css b/assets/stylesheets/style.css
index 24b860d..2ef619d 100644
--- a/assets/stylesheets/style.css
+++ b/assets/stylesheets/style.css
@@ -44,7 +44,7 @@ header a:hover {
header a:hover::after {
content: "";
- background: green;
+ background: #309a00;
position: absolute;
display: block;
bottom: -.3em;
@@ -64,9 +64,8 @@ main, footer{
text-align: right;
color: #555;
}
-#publishing a {
- color: #555;
-}
+#publishing a { color: #555 }
+#publishing a:not(:last-child)::after { content: "," }
#copyright, #theme-copyright {
text-align: center;
@@ -169,7 +168,7 @@ ol, ul, pre code {
}
/* utility classes */
-.monodate { font-family: monospace }
+.monodate, .monospace { font-family: monospace }
.bold { font-weight: bold }
.nowrap { white-space: nowrap }
.overflow-box { overflow: scroll }
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 099d3fc..035d589 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,18 +1,20 @@
{{ define "main" }}
<div id="publishing">
+{{ if ne .Date (time "0001-01-01") }}
<span>{{ .PublishDate | time.Format ":date_long" }}</span>
- {{ if and (isset .Params "lastmod") (ne .Lastmod .PublishDate) }}
- <br>
- <span>Revised: {{ .Lastmod | time.Format ":date_long" }}</span>
- {{ end }}
- {{ if isset .Params "tags" }}
- <br>
- <span>Tags:</span>
- {{- range sort .Params.tags }}
- <a href="/tags/{{ . }}">{{ . | humanize | title }}</a>
- {{- end }}
- {{ end }}
+{{ end }}
+{{ if and (isset .Params "lastmod") (ne .Lastmod .PublishDate) }}
+ <br>
+ <span>Revised: {{ .Lastmod | time.Format ":date_long" }}</span>
+{{ end }}
+{{ if isset .Params "tags" }}
+ <br>
+ <span>Tags:</span>
+ {{- range sort .Params.tags }}
+ <a href="/tags/{{ . }}">{{ . | humanize | title }}</a>
+ {{- end }}
+{{ end }}
</div>
{{ .Content }}