From 896bb582eff067057745d203292502b98b6c02ae Mon Sep 17 00:00:00 2001 From: Dustin Pianalto Date: Thu, 6 Mar 2025 19:03:01 -0900 Subject: [PATCH] update stuff --- web/templates/admin.templ | 438 ++++++++-------------------- web/templates/admin_templ.go | 533 +++++++++++++++-------------------- web/templates/heats.templ | 158 ++++++----- web/templates/heats_templ.go | 66 ++--- 4 files changed, 453 insertions(+), 742 deletions(-) diff --git a/web/templates/admin.templ b/web/templates/admin.templ index bb1e745..be6896a 100644 --- a/web/templates/admin.templ +++ b/web/templates/admin.templ @@ -2,358 +2,148 @@ package templates import ( "fmt" + "strconv" "track-gopher/models" ) templ Admin(groups []models.Group, racers []models.Racer) { - - - - - - Derby Race Admin - - - - - - - + @Layout("Admin") {
-
-

Derby Race Admin

- -
+

Admin Dashboard

-
-
-
+
+
+
-
Groups
-
-
- - - - - - - - - +
+ +
+ if len(groups) == 0 { +
+

No groups added yet.

+
+ } else { +
for _, group := range groups { -
- - - - + + } - -
NameDescriptionActions
{ group.Name }{ group.Description } - - -
+
+ }
-
-
-
-
Racers
+
+
+
+

Racers

+
-
- - - - - - - - - - - - for _, racer := range racers { - - - - - - - - } - -
NameCar #WeightGroupActions
{ racer.FirstName } { racer.LastName }{ racer.CarNumber }{ fmt.Sprintf("%.1f", racer.CarWeight) } oz{ racer.GroupName } - - -
-
-
-
-
-
-
- - - - - - - - - - - -