diff --git a/.gitignore b/.gitignore index e9f8ba3..36ea337 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ testdata/ db.sqlite* test-db.sqlite* +*_templ.go diff --git a/components.templ b/components.templ new file mode 100644 index 0000000..202b88d --- /dev/null +++ b/components.templ @@ -0,0 +1,284 @@ +package main + +import "mmaschedule-go/event" +import "strconv" + +templ TemplEventPage(e event.Event, upcoming []event.ListUpcomingEventsRow) { + +
+ + ++ { e.Name } +
++ @TemplIconCalendar("mr-2") + @TemplTimestamp(e.Date) +
+ if len(e.Location) > 0 { ++ @TemplIconLocation("mr-2") + { e.Location } +
+ } ++ { e.Name } +
++ @TemplIconLocation("mr-1") + { e.Location } +
+ } ++ { f.Weight } +
+VS
+