From 4e3b357d70f58b4ef754f7f1e4339d6c3911ed43 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 25 May 2024 19:54:27 +0200 Subject: [PATCH] Remove post content from listing The way subtitles get rendered is confusing, and this approach is much simpler than trying to tweak this. A shorter listing will likely be better once we have multiple articles too. --- assets/main.scss | 5 +++++ layouts/_default/single.html | 8 ++++++++ layouts/blog/section.html | 7 ++----- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/assets/main.scss b/assets/main.scss index 672415c..bf3bcf8 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -84,3 +84,8 @@ article { margin-left: 1rem; } } + +.post-details { + color: gray; + margin-top: -1rem; +} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index fea309d..f9eb7bb 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,5 +1,13 @@ {{ define "main" }}

{{ .Title }}

+{{ if and .Date .Params.Author }} +

+ Written by {{ .Params.Author }} on + +

+{{ end}}
{{ .Content }} diff --git a/layouts/blog/section.html b/layouts/blog/section.html index 8b160e6..f38e4f5 100644 --- a/layouts/blog/section.html +++ b/layouts/blog/section.html @@ -3,16 +3,13 @@
{{ range (where .Site.RegularPages "Section" "blog") }}
-

{{ .Title }}

-
+

{{ .Title }}

+
Written by {{ .Params.Author }} on
- - {{ .Content }} -
{{ end }}