|
|
|
|
@ -48,14 +48,14 @@ func RacePublic(heatData *models.HeatData, nextHeat *models.HeatData, onDeckHeat
|
|
|
|
|
}()
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.InitializeContext(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid mt-3\"><div class=\"row\"><div class=\"col-12\"><div class=\"card mb-4\"><div class=\"card-header bg-primary text-white\"><h2 class=\"mb-0 text-center\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<div class=\"container-fluid mt-3\"><div class=\"row\"><div class=\"col-12\"><div class=\"card mb-4\"><div class=\"card-header bg-primary text-white\"><span class=\"mb-0 text-center display-1\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var3 string
|
|
|
|
|
templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(heatData.Group.Name)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 17, Col: 78}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 17, Col: 90}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
@ -68,7 +68,7 @@ func RacePublic(heatData *models.HeatData, nextHeat *models.HeatData, onDeckHeat
|
|
|
|
|
var templ_7745c5c3_Var4 string
|
|
|
|
|
templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(heatData.HeatNumber))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 17, Col: 123}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 17, Col: 135}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
@ -81,13 +81,13 @@ func RacePublic(heatData *models.HeatData, nextHeat *models.HeatData, onDeckHeat
|
|
|
|
|
var templ_7745c5c3_Var5 string
|
|
|
|
|
templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(heatData.TotalHeats))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 17, Col: 164}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 17, Col: 176}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</h2></div><div class=\"card-body\"><div id=\"current-heat\" class=\"mb-4\"><div class=\"row\"><div class=\"col-12\"><div class=\"timer-display d-inline-flex align-items-center text-center mb-4\" style=\"height: 200px;\" hx-ext=\"sse\" sse-connect=\"/api/events\" sse-swap=\"race-status\"><div id=\"status-indicator\" class=\"w-25 h-50 d-inline-flex align-items-center badge bg-primary\">Idle</div></div><div class=\"lanes-container\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 4, "</span></div><div class=\"card-body\"><div id=\"current-heat\" class=\"mb-4\"><div class=\"row\"><div class=\"col-12\"><div class=\"timer-display d-inline-flex align-items-center text-center mb-4\" style=\"height: 200px;\" hx-ext=\"sse\" sse-connect=\"/api/events\" sse-swap=\"race-status\"><div id=\"status-indicator\" class=\"w-25 h-50 display-4 d-inline-flex align-items-center badge bg-primary\">Idle</div></div><div class=\"lanes-container\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -95,7 +95,7 @@ func RacePublic(heatData *models.HeatData, nextHeat *models.HeatData, onDeckHeat
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</div></div></div></div></div></div></div></div><div class=\"row\"><div class=\"col-md-6\"><div class=\"card mb-4\"><div class=\"card-header bg-info text-white\"><h3 class=\"mb-0\">Next Heat</h3></div><div class=\"card-body\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "</div></div></div></div></div></div></div></div><div class=\"row\"><div class=\"col-md-6\"><div class=\"card mb-4\"><div class=\"card-header bg-info text-white\"><h3 class=\"mb-0 display-3\">Next Heat</h3></div><div class=\"card-body\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -105,12 +105,12 @@ func RacePublic(heatData *models.HeatData, nextHeat *models.HeatData, onDeckHeat
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<div class=\"alert alert-info\">No more heats in this group</div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 6, "<div class=\"alert alert-info display-4\">No more heats in this group</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div></div></div><div class=\"col-md-6\"><div class=\"card mb-4\"><div class=\"card-header bg-info text-white\"><h3 class=\"mb-0\">Upcoming Heat</h3></div><div class=\"card-body\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 7, "</div></div></div><div class=\"col-md-6\"><div class=\"card mb-4\"><div class=\"card-header bg-info text-white\"><h3 class=\"mb-0 display-3\">Upcoming Heat</h3></div><div class=\"card-body\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -120,7 +120,7 @@ func RacePublic(heatData *models.HeatData, nextHeat *models.HeatData, onDeckHeat
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<div class=\"alert alert-info\">No more heats in this group</div>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 8, "<div class=\"alert alert-info display-4\">No more heats in this group</div>")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -219,33 +219,33 @@ func raceLaneCard(laneData models.LaneData) templ.Component {
|
|
|
|
|
templ_7745c5c3_Var7 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<div class=\"col\"><div class=\"card h-100 lane-card\"><div class=\"card-header bg-primary text-white\"><h4 class=\"mb-0\">Lane ")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 12, "<div class=\"col\"><div class=\"card h-100 lane-card\"><div class=\"card-header bg-primary text-white\"><h4 class=\"mb-0 display-4\">Lane ")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var8 string
|
|
|
|
|
templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(laneData.Lane))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 96, Col: 67}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 96, Col: 77}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</h4></div><div class=\"card-body\"><h5 class=\"card-title\">")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 13, "</h4></div><div class=\"card-body\"><h5 class=\"card-title display-4\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var9 string
|
|
|
|
|
templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(laneData.Name)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 99, Col: 54}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 99, Col: 64}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</h5><p class=\"card-text\"><strong>Car #:</strong> ")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 14, "</h5><p class=\"card-text display-4\"><strong>Car #:</strong> ")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -271,7 +271,7 @@ func raceLaneCard(laneData models.LaneData) templ.Component {
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</p><div class=\"result-area\"><div class=\"row\"><div class=\"col-6\"><div class=\"text-center\"><h6>Time</h6><div class=\"display-6\" hx-ext=\"sse\" sse-connect=\"/api/events\" sse-swap=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 16, "</p><div class=\"result-area\"><div class=\"row\"><div class=\"col-6\"><div class=\"text-center\"><h6 class=\"display-4\">Time</h6><div class=\"display-4\" hx-ext=\"sse\" sse-connect=\"/api/events\" sse-swap=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -297,7 +297,7 @@ func raceLaneCard(laneData models.LaneData) templ.Component {
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div></div></div><div class=\"col-6\"><div class=\"text-center\"><h6>Position</h6><div class=\"display-6\" hx-ext=\"sse\" sse-connect=\"/api/events\" sse-swap=\"")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 18, "</div></div></div><div class=\"col-6\"><div class=\"text-center\"><h6 class=\"display-4\">Position</h6><div class=\"display-4\" hx-ext=\"sse\" sse-connect=\"/api/events\" sse-swap=\"")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
@ -424,40 +424,40 @@ func raceNextHeatRow(laneData models.LaneData) templ.Component {
|
|
|
|
|
templ_7745c5c3_Var18 = templ.NopComponent
|
|
|
|
|
}
|
|
|
|
|
ctx = templ.ClearChildren(ctx)
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<tr><td>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 24, "<tr><td class=\"display-4\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var19 string
|
|
|
|
|
templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(strconv.Itoa(laneData.Lane))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 162, Col: 41}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 162, Col: 59}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "</td><td>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 25, "</td><td class=\"display-4\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var20 string
|
|
|
|
|
templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(laneData.Name)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 163, Col: 27}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 163, Col: 45}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</td><td>")
|
|
|
|
|
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 26, "</td><td class=\"display-4\">")
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ_7745c5c3_Err
|
|
|
|
|
}
|
|
|
|
|
var templ_7745c5c3_Var21 string
|
|
|
|
|
templ_7745c5c3_Var21, templ_7745c5c3_Err = templ.JoinStringErrs(laneData.CarNum)
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 164, Col: 29}
|
|
|
|
|
return templ.Error{Err: templ_7745c5c3_Err, FileName: `web/templates/race_public.templ`, Line: 164, Col: 47}
|
|
|
|
|
}
|
|
|
|
|
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var21))
|
|
|
|
|
if templ_7745c5c3_Err != nil {
|
|
|
|
|
|