package capture import "gitea.henriburau.de/haw-lan/cod4watcher/models" import "gitea.henriburau.de/haw-lan/cod4watcher/views/layouts" import "gitea.henriburau.de/haw-lan/cod4watcher/views/components" import "fmt" import "net/url" templ Capture(capture *models.Capture, table models.ResultTable) { @layouts.Base() {
{ capture.Name }
@components.ServerAddress(capture.Host, capture.Port)
Loading Server status...
if len(table.Rows) >= 1 { @Medal("1. Platz", table.Rows[0].Name, "text-yellow-400") } if len(table.Rows) >= 2 { @Medal("2. Platz", table.Rows[1].Name, "text-gray-500") } if len(table.Rows) >= 3 { @Medal("3. Platz", table.Rows[2].Name, "text-amber-700") }
@components.CaptureTable(table)
} } templ Medal(placement, name, color string) {
{ placement } { name }
}