Files
benchcoach/views/event.pug
2023-08-17 06:51:08 -05:00

46 lines
2.0 KiB
Plaintext

html
head
meta(charset='utf-8')
meta(name='viewport' content='width=device-width, initial-scale=1')
title #{event.formattedTitle}
link(rel='stylesheet' href='/css/bootstrap.min.css')
link(rel='stylesheet' href='/font/bootstrap-icons.min.css')
link(rel='stylesheet' href='/css/teamsnap-ui.css')
body
.container
.Panel
.Panel-header
h3.Panel-title #{event.formattedTitle}
.Panel-body
.Panel-row
h6.card-text.text-muted.mb-2
|#{event.startDate}
br
|#{event.locationName}
.Panel-row
h4 Availability
.progress
div(class="progress-bar bg-success fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerGoingCount/team.playerMemberCount)*100).toString() + "%"}`)
|#{availabilitySummary.playerGoingCount}
div(class="progress-bar bg-info fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerMaybeCount/team.playerMemberCount)*100).toString() + "%"}`)
|#{availabilitySummary.playerMaybeCount}
div(class="progress-bar bg-danger fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerNotGoingCount/team.playerMemberCount)*100).toString() + "%"}`)
|#{availabilitySummary.playerNotGoingCount}
div(class="progress-bar text-secondary fw-bold" role="progressbar" style=`
width: ${((availabilitySummary.playerUnknownCount/team.playerMemberCount)*100).toString() + "%"};
background-color: var(--bs-gray-200)`)
|#{availabilitySummary.playerUnknownCount}
hr
div.d-flex
a(class="Button m-auto" href=`/${team_id}/event/${event.id}/lineup`)
i(class="bi bi-clipboard")
span.mx-1 Lineup
a(class="Button m-auto" href=`/${team_id}/event/${event.id}/gamecard`)
i(class="bi bi-book")
span.mx-1 Game Card
a(class="Button m-auto" href=`https://go.teamsnap.com/${team_id}/schedule/view_game/${event.id}`)
i(class="bi bi-asterisk")
span.mx-1 TeamSnap