diff --git a/18-expenses-chart/templates/index.templ b/18-expenses-chart/templates/index.templ
index c76043e..448a95f 100644
--- a/18-expenses-chart/templates/index.templ
+++ b/18-expenses-chart/templates/index.templ
@@ -11,9 +11,15 @@ type PageData struct {
}
templ myBalanceComponent(balance float32) {
-
- My balance
-
${ fmt.Sprintf("%.2f", balance) }
+
+
+ My balance
+
${ fmt.Sprintf("%.2f", balance) }
+
+
}
@@ -38,17 +44,20 @@ func prepareSummaryComponent(expenses []float32, totalThisMonth, percentCompared
css expenseBarVars(percentage float32) {
--height-percentage: { fmt.Sprintf("%.2f", percentage) };
- transform: scaleY(var(--height-percentage));
+ height: calc(var(--height-percentage) * 8rem);
}
templ dayExpenseColumn(expense, percentage float32, day string, isCurrentDay bool) {
-
+
+ templ.KV("bg-primary-soft-red hover:bg-primary-soft-red/70", !isCurrentDay),
+ templ.KV("bg-primary-cyan hover:bg-primary-cyan/70", isCurrentDay),
+ "hover:cursor-pointer" }
+ >
+
${ fmt.Sprintf("%.2f", expense ) }
+
{ day }
}
@@ -91,7 +100,7 @@ templ IndexPage(pageData PageData) {
-
+
Frontend Mentor | Expenses chart component