From 4832b812b2564020f1647ff75d9f5751cfa2efc9 Mon Sep 17 00:00:00 2001 From: John Costa Date: Fri, 3 Apr 2026 21:27:47 +0100 Subject: [PATCH] Updating UI for lists --- layouts/_default/li.html | 19 ++++++++++ layouts/_default/list.html | 12 ++++++ static/css/custom.css | 78 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 layouts/_default/li.html create mode 100644 layouts/_default/list.html create mode 100644 static/css/custom.css diff --git a/layouts/_default/li.html b/layouts/_default/li.html new file mode 100644 index 0000000..2045ade --- /dev/null +++ b/layouts/_default/li.html @@ -0,0 +1,19 @@ +
  • + {{ $format := "02 Jan 2006" }} + + {{ .Title | markdownify }} + {{ .Date.Format $format }} + + {{ if .Summary }} +

    {{ .Summary | plainify | truncate 150 }}

    + {{ end }} + {{ with .Params.tags }} +
    + {{ range . }} + {{ with $.Site.GetPage (printf "/tags/%s" .) }} + {{ .Title }} + {{ end }} + {{ end }} +
    + {{ end }} +
  • diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..2f99c69 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,12 @@ +{{ define "main" }} +

    {{ .Title | markdownify }}

    + +{{ .Content }} + + + +{{ end }} {{define "aside" }} {{ if .Params.description }} +

    {{ .Params.description }}

    +{{ end }} {{ end }} diff --git a/static/css/custom.css b/static/css/custom.css new file mode 100644 index 0000000..0f79aa1 --- /dev/null +++ b/static/css/custom.css @@ -0,0 +1,78 @@ +.post-list { + list-style: none; + padding-left: 0; + display: flex; + flex-direction: column; + gap: 0; +} + +.post-list .post-item { + padding: 1.5rem 0; + border-bottom: 1px solid var(--base02); +} + +.post-list .post-item:first-child { + padding-top: 0; +} + +.post-list .post-item::marker { + content: ""; +} + +.post-item__link { + display: flex; + justify-content: space-between; + align-items: baseline; + gap: 1.5rem; + text-decoration: none; +} + +.post-item__title { + font-size: 1.15rem; + font-weight: 600; + color: var(--link); +} + +.post-item__link:hover .post-item__title { + color: var(--hover); +} + +.post-item__date { + font-size: 0.8rem; + color: var(--muted); + white-space: nowrap; + flex-shrink: 0; +} + +.post-item__summary { + margin: 0.4rem 0 0 0; + font-size: 0.8rem; + line-height: 1.4; + color: var(--base04); +} + +.post-item__tags { + display: flex; + flex-wrap: wrap; + gap: 0.4rem; + margin-top: 0.5rem; +} + +.post-item__tag { + font-size: 0.7rem; + padding: 0.1rem 0.5rem; + background-color: var(--base02); + color: var(--base0E); + border-radius: 3px; + text-decoration: none; +} + +.post-item__tag:link, +.post-item__tag:visited { + color: var(--base0E); +} + +.post-item__tag:hover { + background-color: var(--base03); + color: var(--hover); +}