From 25d351add5e3b81256d71f9f574fc1129b5e5798 Mon Sep 17 00:00:00 2001 From: Jack Jackson Date: Wed, 17 May 2023 21:06:34 -0700 Subject: [PATCH] First attempt Not great - text overruns the boxes unless a limited height is set, but varying heights of headers leads to uneven lengths of content. --- blog/layouts/_default/terms.html | 4 +++- blog/layouts/partials/tag-summary.html | 17 +++++++++++++++++ blog/static/css/custom.css | 16 ++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 blog/layouts/partials/tag-summary.html diff --git a/blog/layouts/_default/terms.html b/blog/layouts/_default/terms.html index e448fca..f69ec33 100644 --- a/blog/layouts/_default/terms.html +++ b/blog/layouts/_default/terms.html @@ -13,9 +13,11 @@ {{ $.Data.Singular | humanize }}: {{ $key }} +
{{ range $value.Pages }} - {{ partial "summary.html" . }} + {{ partial "tag-summary.html" . }} {{ end }} +
{{ end }} diff --git a/blog/layouts/partials/tag-summary.html b/blog/layouts/partials/tag-summary.html new file mode 100644 index 0000000..ffd41ce --- /dev/null +++ b/blog/layouts/partials/tag-summary.html @@ -0,0 +1,17 @@ +{{/* + I don't want to _fully_ override the "summary.html" partial that exists in the theme, in case it's used anywhere else - + but this different summary allows me to make the summaries of articles in the tags page a bit more compact. +*/}} +
+
+ {{ humanize .Section }} +

+ + {{ .Title }} + +

+ +
+
diff --git a/blog/static/css/custom.css b/blog/static/css/custom.css index ba53d84..83adbb0 100644 --- a/blog/static/css/custom.css +++ b/blog/static/css/custom.css @@ -72,3 +72,19 @@ figcaption { border-bottom: 2px solid #009879; } +.clearfix::after { + content: ""; + clear: both; + display: table; +} + +/** + Hacky hack hack...but I can't find where the `

` inside the Summary is created + + Unforunately, setting a static height doesn't work, because if the header of the summary runs to two lines then this pushes + the `

` down further. + */ +.restrict-inner-p-to-250 > p { + height: 96px; + overflow: hidden; +} \ No newline at end of file