From c100a122dfbb788a23d329f468a901c68359628a Mon Sep 17 00:00:00 2001
From: John Bowdre
Date: Sat, 20 Jan 2024 16:21:09 -0600
Subject: [PATCH] move dates/tags from sidebar to post frontmatter
---
layouts/_default/single.html | 19 ++++++++++++++++++-
layouts/partials/aside.html | 32 ++++++--------------------------
static/css/custom.css | 31 +++++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 27 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index b089ca0..c4e22aa 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,7 +1,24 @@
{{ define "main" }}
{{- $ageDays := div (sub now.Unix .Date.Unix) 86400 -}}
{{- with .Param "lastmod" -}}
{{- $ageDays = div (sub now.Unix .Unix) 86400 -}}
diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html
index 89483b4..28a9d08 100644
--- a/layouts/partials/aside.html
+++ b/layouts/partials/aside.html
@@ -1,30 +1,10 @@
-{{- $postDate := .Date.Format "2006-01-02" }}
-{{- $updateDate := .Lastmod.Format "2006-01-02" }}
-{{ if or (.Params.description) (.Params.date) }}
- {{ if .Params.description }}{{ .Params.description }}
{{ end }}
-
- {{ if .Params.date }}
posted: | {{ $postDate }} |
{{- if ne $postDate $updateDate }}updated: | {{ $updateDate }} |
{{ end }}
{{ end }}
-
+{{ if .Params.description }}{{ .Params.description }}
{{ end }}
+{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
+
+
On this page
+ {{ .TableOfContents }}
- {{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
-
-
On this page
- {{ .TableOfContents }}
-
-
- {{ end }}
- {{- with .Params.tags -}}
-
-
Tags
- [all]
- {{- range . }}
- {{- $tag := urlize . -}}
- [{{ . }}]
- {{- end }}
-
-
-
- {{- end }}
+
{{ end }}
{{ if isset .Params "categories" }}
diff --git a/static/css/custom.css b/static/css/custom.css
index 1d2055f..b37b41f 100644
--- a/static/css/custom.css
+++ b/static/css/custom.css
@@ -302,4 +302,35 @@ button.tinylytics_kudos {
button.tinylytics_kudos:hover {
transform: scale(1.1);
text-shadow: var(--off-fg) 0 0 1px;
+}
+
+/* post front matter styling*/
+.frontmatter hr {
+ margin-bottom: 0rem;
+ margin-top: 0rem;
+}
+
+.frontmatter h1 {
+ margin-top: 0rem;
+}
+
+.frontmatter .label {
+ color: var(--off-fg);
+ font-size: 0.8rem;
+}
+
+.frontmatter .title {
+ color: var(--fg);
+ font-weight: 600;
+ font-size: 1.1rem;
+}
+
+.frontmatter table {
+ overflow-wrap: break-word;
+ margin-bottom: 0rem;
+}
+
+.frontmatter_tags {
+ font-size: 0.8rem;
+ color: var(--off-fg);
}
\ No newline at end of file