diff --git a/themes/bcarlin/assets/static/css/bcarlin.css b/themes/bcarlin/assets/static/css/bcarlin.css index e3d343d..1f1637c 100644 --- a/themes/bcarlin/assets/static/css/bcarlin.css +++ b/themes/bcarlin/assets/static/css/bcarlin.css @@ -350,4 +350,14 @@ code, kdb, pre { .h-feed article:not(:last-child) { border-bottom: var(--pico-border-width) solid var(--pico-card-border-color); + margin-bottom: 0; +} + +.h-feed article p { + margin-bottom: calc(0.2 * var(--pico-typography-spacing-vertical)); +} + +.h-feed article .p-summary { + font-size: 0.9em; + font-style: italic; } diff --git a/themes/bcarlin/layouts/blog/list-item.html b/themes/bcarlin/layouts/blog/list-item.html new file mode 100644 index 0000000..347a6e5 --- /dev/null +++ b/themes/bcarlin/layouts/blog/list-item.html @@ -0,0 +1,11 @@ +{{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} +{{ $dateHuman := .Date | time.Format "2006-01-02" }} +
+

+ {{ .LinkTitle }} + () +

+

+ {{ .Summary }} +

+
diff --git a/themes/bcarlin/layouts/blog/list.html b/themes/bcarlin/layouts/blog/list.html index 044c2b0..d56dcc3 100644 --- a/themes/bcarlin/layouts/blog/list.html +++ b/themes/bcarlin/layouts/blog/list.html @@ -10,17 +10,7 @@

{{ .Key }}

{{- range .Pages }} - {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := .Date | time.Format "2006-01-02" }} -
-

- {{ .LinkTitle }} - () -

-

- {{ .Summary }} -

-
+ {{ .Render "list-item" }} {{- end }}
{{- end }} diff --git a/themes/bcarlin/layouts/home.html b/themes/bcarlin/layouts/home.html index b5dd441..4438ed1 100644 --- a/themes/bcarlin/layouts/home.html +++ b/themes/bcarlin/layouts/home.html @@ -10,17 +10,7 @@

Recent posts

{{- $posts := where .Site.RegularPages "Section" "blog" }} {{- range first 5 $posts }} - {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := .Date | time.Format "2006-01-02" }} -
-

- {{ .LinkTitle }} - () -

-

- {{ .Summary }} -

-
+ {{ .Render "list-item" }} {{- end }} diff --git a/themes/bcarlin/layouts/term.html b/themes/bcarlin/layouts/term.html index 2b1f353..e237082 100644 --- a/themes/bcarlin/layouts/term.html +++ b/themes/bcarlin/layouts/term.html @@ -7,12 +7,7 @@ {{ .Content }} {{ range .Pages.ByDate }} - {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} - {{ $dateHuman := .Date | time.Format "2006-01-02" }} -
- {{ .LinkTitle }} - () -
+ {{ .Render "list-item" }} {{ end }} {{ end }}