From 28d002991e870f0adb466a944c7528ed5761bce7 Mon Sep 17 00:00:00 2001 From: Nicolai Parlog Date: Tue, 23 Apr 2024 16:50:38 -0700 Subject: [PATCH] Link titles --- .../main/java/zone/nox/components/PostBlock.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nox.zone/src/main/java/zone/nox/components/PostBlock.java b/nox.zone/src/main/java/zone/nox/components/PostBlock.java index 12b18dc..8202a85 100644 --- a/nox.zone/src/main/java/zone/nox/components/PostBlock.java +++ b/nox.zone/src/main/java/zone/nox/components/PostBlock.java @@ -38,6 +38,17 @@ public record Style(Classes block, Classes index, Classes title, Classes date, C font-weight: bold; } + a.title { + color: white; + } + a.title:hover { + color: white; + text-decoration: none; + } + a.title:visited { + color: white; + } + .date { grid-area: date; font-size: var(--font-size-small); @@ -56,7 +67,7 @@ public record Style(Classes block, Classes index, Classes title, Classes date, C public Element composeSingle() { return div.classes(STYLE.block).children( a.classes(STYLE.index).href(post.slug().toString()).text("#%03d".formatted(post.index())), - span.classes(STYLE.title).text(post.title()), + a.classes(STYLE.title).href(post.slug().toString()).text(post.title()), span.classes(STYLE.date).text(format(post.date())), a.classes(STYLE.more).href(post.slug().toString()).text("More >>") );