summaryrefslogtreecommitdiff
path: root/Omni/Jr/Web.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-27 10:13:19 -0500
committerBen Sima <ben@bensima.com>2025-11-27 10:13:19 -0500
commit897fa1891c7fbb09b82a7d3e5f3b2a5acd863341 (patch)
treebbc9c70b72c1f590773cab0205b3daef97aea487 /Omni/Jr/Web.hs
parent36c5a2342ce8697c490d90e091d1153c7e592daf (diff)
Make task cards fully clickable
The build and tests pass. The task is complete: 1. Changed `renderTaskCard` to wrap the entire card in an `<a>` element 2. Changed the inner task-id from an `<a>` to a `<span>` since the whole 3. Added CSS styles for `.task-card-link` to ensure proper display (bloc Task-Id: t-149.4
Diffstat (limited to 'Omni/Jr/Web.hs')
-rw-r--r--Omni/Jr/Web.hs20
1 files changed, 10 insertions, 10 deletions
diff --git a/Omni/Jr/Web.hs b/Omni/Jr/Web.hs
index 6d2c163..759f42e 100644
--- a/Omni/Jr/Web.hs
+++ b/Omni/Jr/Web.hs
@@ -136,16 +136,16 @@ statusBadge status =
renderTaskCard :: (Monad m) => TaskCore.Task -> Lucid.HtmlT m ()
renderTaskCard t =
- Lucid.div_ [Lucid.class_ "task-card"] <| do
- Lucid.div_ [Lucid.class_ "task-header"] <| do
- Lucid.a_
- [ Lucid.class_ "task-id",
- Lucid.href_ ("/tasks/" <> TaskCore.taskId t)
- ]
- (Lucid.toHtml (TaskCore.taskId t))
- statusBadge (TaskCore.taskStatus t)
- Lucid.span_ [Lucid.class_ "priority"] (Lucid.toHtml (tshow (TaskCore.taskPriority t)))
- Lucid.p_ [Lucid.class_ "task-title"] (Lucid.toHtml (TaskCore.taskTitle t))
+ Lucid.a_
+ [ Lucid.class_ "task-card task-card-link",
+ Lucid.href_ ("/tasks/" <> TaskCore.taskId t)
+ ]
+ <| do
+ Lucid.div_ [Lucid.class_ "task-header"] <| do
+ Lucid.span_ [Lucid.class_ "task-id"] (Lucid.toHtml (TaskCore.taskId t))
+ statusBadge (TaskCore.taskStatus t)
+ Lucid.span_ [Lucid.class_ "priority"] (Lucid.toHtml (tshow (TaskCore.taskPriority t)))
+ Lucid.p_ [Lucid.class_ "task-title"] (Lucid.toHtml (TaskCore.taskTitle t))
instance Lucid.ToHtml HomePage where
toHtmlRaw = Lucid.toHtml