From d056b33241fe364ae8643c49d9c7d232bb09c4e9 Mon Sep 17 00:00:00 2001 From: Arthur Belleville Date: Thu, 14 May 2026 18:46:42 +0200 Subject: [PATCH] feat(01-02): add Button, Card, Badge templ components + CSS - button.templ: Button(ButtonProps) renders +} diff --git a/backend/internal/web/ui/card.css b/backend/internal/web/ui/card.css new file mode 100644 index 0000000..74dcba6 --- /dev/null +++ b/backend/internal/web/ui/card.css @@ -0,0 +1,8 @@ +/* card.css — slate-50 panel with slate-200 border. */ + +.ui-card { + border-radius: 0.5rem; + border: 1px solid #e2e8f0; + background-color: #f8fafc; + padding: 1.5rem; +} diff --git a/backend/internal/web/ui/card.templ b/backend/internal/web/ui/card.templ new file mode 100644 index 0000000..29893a9 --- /dev/null +++ b/backend/internal/web/ui/card.templ @@ -0,0 +1,11 @@ +package ui + +// Card is a slate-50 panel with a slate-200 border. Children are rendered +// inside via templ's child-content syntax: `@ui.Card(nil) {

...

}`. +// +// `attrs` is a pass-through for arbitrary attributes (id, data-*, hx-*). +templ Card(attrs templ.Attributes) { +
+ { children... } +
+}