From 6f140f096b229b54cd31ea72ceccae0853869ea0 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 28 Feb 2023 18:24:19 -0600 Subject: [PATCH] Organize summary template files Also a small CSS patch to fix margin around post-title --- assets/css/bobastyle.css | 11 ++++++---- layouts/_default/list.html | 2 +- .../series_post.html => summary.html} | 0 layouts/_default/summary/post.html | 21 ------------------- layouts/authors/list.html | 2 +- .../author.html => authors/summary.html} | 0 layouts/partials/page-list.html | 2 +- .../section.html => section/summary.html} | 0 layouts/series/list.html | 2 +- .../series.html => series/summary.html} | 2 +- 10 files changed, 12 insertions(+), 30 deletions(-) rename layouts/_default/{summary/series_post.html => summary.html} (100%) delete mode 100644 layouts/_default/summary/post.html rename layouts/{_default/summary/author.html => authors/summary.html} (100%) rename layouts/{_default/summary/section.html => section/summary.html} (100%) rename layouts/{_default/summary/series.html => series/summary.html} (93%) diff --git a/assets/css/bobastyle.css b/assets/css/bobastyle.css index 0342042..66d5710 100644 --- a/assets/css/bobastyle.css +++ b/assets/css/bobastyle.css @@ -175,15 +175,18 @@ pre > code { .page-list .post, .series-taxonomy-list .series-taxonomy, .series-taxonomy .post { - padding-top: 8px; - padding-left: 24px; - padding-right: 24px; - padding-bottom: 24px; + padding: 24px; border-radius: 12px; background-color: var(--background-1); color: var(--text-1); } +.post > .post-title, +.series-taxonomy > .post-title, +.author > .author-name { + margin-top: 0; +} + .post-series-position { position: relative; float: right; diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 180bda1..92f3564 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -13,7 +13,7 @@ {{ with .Sections }}
{{ range . }} - {{ .Render "summary/section" }} + {{ .Render "summary" }} {{ end }}
{{ end }} diff --git a/layouts/_default/summary/series_post.html b/layouts/_default/summary.html similarity index 100% rename from layouts/_default/summary/series_post.html rename to layouts/_default/summary.html diff --git a/layouts/_default/summary/post.html b/layouts/_default/summary/post.html deleted file mode 100644 index 492a31f..0000000 --- a/layouts/_default/summary/post.html +++ /dev/null @@ -1,21 +0,0 @@ -

- {{ with .Parent.Params.icon }}{{ partial "icon.html" . }}{{ end }} - {{ .Title | markdownify }} - {{ if .Draft }}{{ partial "icon.html" "write" }}{{ end }} -

- -{{ partial "post-metadata/short.html" . }} - -{{ with .Resources.GetMatch "feature" }} -
- {{ partial "figure.html" (dict "src" .) }} -
-{{ end }} - -
- {{ partial "description-or-summary.html" . }} -
- -
- {{ i18n "read_more" }} → -
diff --git a/layouts/authors/list.html b/layouts/authors/list.html index 423d2bb..41df868 100644 --- a/layouts/authors/list.html +++ b/layouts/authors/list.html @@ -12,7 +12,7 @@ {{ with .Paginator.Pages }} {{ range . }}
- {{ .Render "summary/author" }} + {{ .Render "summary" }}
{{ end }} {{ else }} diff --git a/layouts/_default/summary/author.html b/layouts/authors/summary.html similarity index 100% rename from layouts/_default/summary/author.html rename to layouts/authors/summary.html diff --git a/layouts/partials/page-list.html b/layouts/partials/page-list.html index 5058da0..599a778 100644 --- a/layouts/partials/page-list.html +++ b/layouts/partials/page-list.html @@ -2,7 +2,7 @@ {{ with . }} {{ range . }}
- {{ .Render "summary/post" }} + {{ .Render "summary" }}
{{ end }} {{ else }} diff --git a/layouts/_default/summary/section.html b/layouts/section/summary.html similarity index 100% rename from layouts/_default/summary/section.html rename to layouts/section/summary.html diff --git a/layouts/series/list.html b/layouts/series/list.html index 60caeef..4247cb9 100644 --- a/layouts/series/list.html +++ b/layouts/series/list.html @@ -12,7 +12,7 @@ {{ with .Pages }} {{ range . }}
- {{ .Render "summary/series" }} + {{ .Render "summary" }}
{{ end }} {{ else }} diff --git a/layouts/_default/summary/series.html b/layouts/series/summary.html similarity index 93% rename from layouts/_default/summary/series.html rename to layouts/series/summary.html index f5127ef..77c4623 100644 --- a/layouts/_default/summary/series.html +++ b/layouts/series/summary.html @@ -18,7 +18,7 @@ {{ .Scratch.Set "series_position" $i }} {{ .Scratch.Set "series_total" $total }}
- {{ .Render "summary/series_post" }} + {{ .Render "summary" }}
{{ end }}