diff --git a/internal/account/template.templ b/internal/account/template.templ index b5dbd9a..5be3aa0 100644 --- a/internal/account/template.templ +++ b/internal/account/template.templ @@ -13,7 +13,9 @@ templ template(accounts []*Account) { hx-swap="afterbegin" class="ml-auto button button-primary px-2 flex-1 flex items-center gap-2 justify-center" > - @svg.Plus() +
+ @svg.Plus() +

New Account

diff --git a/internal/budget/handler.go b/internal/budget/handler.go index 7789f06..c5efedd 100644 --- a/internal/budget/handler.go +++ b/internal/budget/handler.go @@ -54,7 +54,7 @@ func (h HandlerImpl) handlePage() http.HandlerFunc { // return // } - comp := Page() + comp := page() h.r.RenderLayout(r, w, comp, user) } } @@ -113,7 +113,7 @@ func (h HandlerImpl) handlePost() http.HandlerFunc { // To disable unused variable slog.Info("test", "item", budget) - comp := Item() - h.r.Render(r, w, comp) + // comp := item() + // h.r.Render(r, w, comp) } } diff --git a/internal/budget/template.templ b/internal/budget/template.templ index c02856a..c58ed21 100644 --- a/internal/budget/template.templ +++ b/internal/budget/template.templ @@ -1,7 +1,14 @@ package budget -templ Page() { -
+import "spend-sparrow/internal/template/svg" + +templ page() { +
+ @newItem() + for i:=range(10) { + @item(i) + } +
} templ Items() { @@ -12,6 +19,22 @@ templ Edit() {
} -templ Item() { -
+templ newItem() { +
+ New Budget +
+ @svg.Plus() +
+
+} + +templ item(i int) { +
+ + Budget { i } + + + { 200 + i }€ + +
} diff --git a/internal/template/svg/default.templ b/internal/template/svg/default.templ index ddec57a..2b87204 100644 --- a/internal/template/svg/default.templ +++ b/internal/template/svg/default.templ @@ -19,7 +19,7 @@ templ Eye() { } templ Plus() { - + } diff --git a/internal/transaction/template.templ b/internal/transaction/template.templ index 2daeae7..01f86bc 100644 --- a/internal/transaction/template.templ +++ b/internal/transaction/template.templ @@ -65,7 +65,9 @@ templ TransactionComp(items templ.Component, filter TransactionItemsFilter, acco hx-swap="afterbegin" class="button button-primary ml-auto px-2 flex items-center gap-2 justify-center" > - @svg.Plus() +
+ @svg.Plus() +

New Transaction

diff --git a/internal/treasure_chest/template.templ b/internal/treasure_chest/template.templ index 68aac3c..782ffea 100644 --- a/internal/treasure_chest/template.templ +++ b/internal/treasure_chest/template.templ @@ -15,7 +15,9 @@ templ TreasureChestComp(treasureChests []*treasure_chest_types.TreasureChest, mo hx-swap="afterbegin" class="ml-auto text-center button button-primary px-2 flex items-center gap-2" > - @svg.Plus() +
+ @svg.Plus() +
New Treasure Chest
@@ -109,7 +111,9 @@ templ EditTreasureChest(treasureChest *treasure_chest_types.TreasureChest, paren hx-swap="outerHTML" class="button button-primary ml-auto px-2 flex items-center gap-2" > - @svg.Plus() +
+ @svg.Plus() +

New Monthly Transaction