summaryrefslogtreecommitdiff
path: root/Omni/Jr/Web/Style.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-26 13:08:11 -0500
committerBen Sima <ben@bensima.com>2025-11-26 13:08:11 -0500
commite6c0c8ffdb4e0af8c7c1c0f33db4854e1dba6364 (patch)
treed3280dbb0f116e9b9c627f101995c8cf2b52d1ef /Omni/Jr/Web/Style.hs
parent555d5d416e2001d04145b173aa40fd40f656509d (diff)
Add stats page (GET /stats)
All the necessary components are in place: 1. Route added to API type (`GET /stats` with optional `?epic=` query pa 2. `StatsPage` data type defined 3. `ToHtml` instance for `StatsPage` with all sections (By Status, By Pr 4. `statsHandler` function to handle the route 5. Handler connected in `server` 6. Link to stats page added to the dashboard 7. CSS styles for progress bars and stats sections added (including dark Task-Id: t-1o2g8gugkr1.10
Diffstat (limited to 'Omni/Jr/Web/Style.hs')
-rw-r--r--Omni/Jr/Web/Style.hs43
1 files changed, 43 insertions, 0 deletions
diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs
index e2377b5..c1ad47e 100644
--- a/Omni/Jr/Web/Style.hs
+++ b/Omni/Jr/Web/Style.hs
@@ -253,6 +253,43 @@ cardStyles = do
".diff-block" ? do
maxHeight (px 600)
overflowY auto
+ ".progress-bar" ? do
+ height (px 8)
+ backgroundColor "#e5e7eb"
+ borderRadius (px 4) (px 4) (px 4) (px 4)
+ overflow hidden
+ marginTop (px 8)
+ ".progress-fill" ? do
+ height (pct 100)
+ backgroundColor "#0066cc"
+ borderRadius (px 4) (px 4) (px 4) (px 4)
+ transition "width" (ms 300) ease (sec 0)
+ ".stats-section" ? do
+ backgroundColor white
+ borderRadius (px 8) (px 8) (px 8) (px 8)
+ padding (px 16) (px 16) (px 16) (px 16)
+ boxShadow (NE.singleton (bsColor (rgba 0 0 0 0.1) (shadow (px 0) (px 1))))
+ ".stats-row" ? do
+ display flex
+ alignItems center
+ Stylesheet.key "gap" ("12px" :: Text)
+ padding (px 8) (px 0) (px 8) (px 0)
+ borderBottom (px 1) solid "#e5e7eb"
+ ".stats-row" # lastChild ? borderBottom (px 0) none transparent
+ ".stats-label" ? do
+ minWidth (px 100)
+ fontWeight (weight 500)
+ ".stats-bar-container" ? do
+ Stylesheet.key "flex" ("1" :: Text)
+ ".stats-count" ? do
+ minWidth (px 40)
+ textAlign (alignSide sideRight)
+ fontWeight (weight 500)
+ ".summary-section" ? do
+ backgroundColor white
+ borderRadius (px 8) (px 8) (px 8) (px 8)
+ padding (px 16) (px 16) (px 16) (px 16)
+ boxShadow (NE.singleton (bsColor (rgba 0 0 0 0.1) (shadow (px 0) (px 1))))
".no-commit-msg" ? do
backgroundColor "#fff3cd"
border (px 1) solid "#ffc107"
@@ -486,6 +523,12 @@ darkModeStyles =
backgroundColor "#374151"
borderColor "#4b5563"
color "#f3f4f6"
+ ".stats-section" <> ".summary-section" ? do
+ backgroundColor "#1f2937"
+ boxShadow (NE.singleton (bsColor (rgba 0 0 0 0.3) (shadow (px 0) (px 2))))
+ ".stats-row" ? borderBottomColor "#374151"
+ ".progress-bar" ? backgroundColor "#374151"
+ ".progress-fill" ? backgroundColor "#60a5fa"
prefersDark :: Stylesheet.Feature
prefersDark =