first commit
This commit is contained in:
8
views/error.pug
Normal file
8
views/error.pug
Normal file
@@ -0,0 +1,8 @@
|
||||
html
|
||||
head
|
||||
body
|
||||
h1 error
|
||||
h2
|
||||
error.status
|
||||
pre
|
||||
message #{message}
|
||||
46
views/event.pug
Normal file
46
views/event.pug
Normal file
@@ -0,0 +1,46 @@
|
||||
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
|
||||
37
views/events.pug
Normal file
37
views/events.pug
Normal file
@@ -0,0 +1,37 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
title BenchCoach - Teams
|
||||
link(rel='stylesheet' href='/css/bootstrap.min.css')
|
||||
link(rel='stylesheet' href='/css/teamsnap-ui.css')
|
||||
body
|
||||
.container
|
||||
.Panel
|
||||
.Panel-header
|
||||
.Panel-title Schedule
|
||||
.Panel-body
|
||||
each event in events
|
||||
- var availabilitySummary = availabilitySummaries.find((a)=>a.eventId==event.id)
|
||||
.Panel-row
|
||||
a(class="event list-group-item" href=`/${team_id}/event/${event.id}`)
|
||||
h4 #{event.formattedTitle}
|
||||
p.small
|
||||
| #{event.startDate.toLocaleDateString("en-us",{weekday: "short", day: "numeric",month: "short"})}
|
||||
| #{event.startDate.toLocaleTimeString("en-us",{hour: "numeric", minute: "2-digit"})}
|
||||
p #{event.locationName}
|
||||
.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}
|
||||
|
||||
409
views/gamecard.pug
Normal file
409
views/gamecard.pug
Normal file
@@ -0,0 +1,409 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
title #{event.formattedTitle}
|
||||
link(rel='stylesheet' href='/css/gamecard.css')
|
||||
|
||||
body(class="B5")
|
||||
input(name="team_id", type="hidden" value=`${team_id}`)
|
||||
input(name="event_id", type="hidden" value=`${event_id}`)
|
||||
#page-1.sheet.gamecard
|
||||
section#todays-game
|
||||
.grid-container
|
||||
.section-header
|
||||
#todays-game-header.bar-left.event-title
|
||||
| #{event.formattedTitle}
|
||||
| #{event.startDate.toLocaleDateString("en-us",{weekday: "short", day: "numeric",month: "short"})}
|
||||
| #{event.startDate.toLocaleTimeString("en-us",{hour: "numeric", minute: "2-digit"})}
|
||||
.bar-right.homeaway #{event.gameType}
|
||||
.bar-span.gametitle
|
||||
#offense-pane.left
|
||||
table#starting-lineup-offense
|
||||
tbody
|
||||
each _, i in Array(11)
|
||||
- if (typeof(event_lineup_entries_offense[i]) !== 'undefined'){
|
||||
tr
|
||||
th(rowspan='2') #{i+1}
|
||||
td(id=`offense-slot-${i}-name` class="player-name") #{event_lineup_entries_offense[i].member.lastName}
|
||||
td(id=`offense-slot-${i}-jersey-number` class="jersey-number") #{event_lineup_entries_offense[i].member.jerseyNumber}
|
||||
td(id=`offense-slot-${i}-position` class="position") #{event_lineup_entries_offense[i].label}
|
||||
tr.substitute
|
||||
td
|
||||
td
|
||||
td
|
||||
- } else {
|
||||
tr
|
||||
th(rowspan='2')
|
||||
td(id=`offense-slot-${i}-name` class="player-name")
|
||||
td(id=`offense-slot-${i}-jersey-number` class="jersey-number")
|
||||
td(id=`offense-slot-${i}-position` class="position")
|
||||
tr.substitute
|
||||
td
|
||||
td
|
||||
td
|
||||
- }
|
||||
|
||||
#defense-pane.right
|
||||
.container
|
||||
.field-container
|
||||
image(src='/media/baseball-diamond.svg')
|
||||
.row(style='justify-content: center')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position CF
|
||||
td#defense-slot-CF-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("CF")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.row(style='justify-content: space-between')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position LF
|
||||
td#defense-slot-LF-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("LF")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position RF
|
||||
td#defense-slot-RF-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("RF")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.row(style='justify-content: space-around')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position SS
|
||||
td#defense-slot-SS-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("SS")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position 2B
|
||||
td#defense-slot-2B-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("2B")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.row(style='justify-content: space-between')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position 3B
|
||||
td#defense-slot-3B-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("3B")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position 1B
|
||||
td#defense-slot-1B-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("1B")) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.row(style='justify-content: center')
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position C
|
||||
td#defense-slot-C-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("C") && !lue.label.startsWith("CF") ) || {"member":{}}).member.lastName}
|
||||
tr
|
||||
td(colspan='2')
|
||||
tr
|
||||
td(colspan='2')
|
||||
.pitching-container
|
||||
.defense-slot-set
|
||||
table
|
||||
tr
|
||||
th.position P
|
||||
td#defense-slot-P-name.player-name
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("P")) || {"member":{}}).member.lastName}
|
||||
td.jersey-number
|
||||
| #{(event_lineup_entries.find((lue)=>lue.label.startsWith("P")) || {"member":{}}).member.jerseyNumber}
|
||||
td.position
|
||||
tr
|
||||
th.position RP
|
||||
td#defense-slot-RP1-name.player-name
|
||||
td
|
||||
td
|
||||
tr
|
||||
th.position RP
|
||||
td#defense-slot-RP2-name.player-name
|
||||
td
|
||||
td
|
||||
.footer
|
||||
table
|
||||
tr
|
||||
th Notes
|
||||
td
|
||||
tr
|
||||
td
|
||||
tr
|
||||
td
|
||||
section#roster-and-history
|
||||
div
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th#today-availability(colspan='3') Available (
|
||||
| #{availabilitySummaries.find((e)=>e.id==event_id).playerGoingCount}|
|
||||
| #{availabilitySummaries.find((e)=>e.id==event_id).playerMaybeCount}
|
||||
| )
|
||||
th.player-stats
|
||||
span.decimal-point .
|
||||
| AVG
|
||||
span.delimiter /
|
||||
span.decimal-point .
|
||||
| OBP
|
||||
span.delimiter /
|
||||
span.decimal-point .
|
||||
| SLG
|
||||
span.delimiter :
|
||||
| PA
|
||||
th.position-capability.pitcher P
|
||||
th.position-capability.catcher C
|
||||
th.position-capability.infield I
|
||||
th.position-capability.outfield O
|
||||
each event_future, i in events_future
|
||||
th(id=`avail-header-today-plus-${i+1}` class="availability future")
|
||||
.rotate #{event_future.startDate.toLocaleDateString("en-us", {weekday: "short"})}
|
||||
each event_past, i in events_past
|
||||
th(id=`avail-header-today-minus-${i+1}` class="availability past")
|
||||
.rotate #{event_past.startDate.toLocaleDateString("en-us", {weekday: "short"})}
|
||||
tbody
|
||||
each row, index in availabilities.filter((e)=>e.event.id==event_id && !e.member.isNonPlayer)
|
||||
tr(id=`roster-history-slot-${index+1}` class=``)
|
||||
td(class=`is-present-checkbox available-status-code-${row.statusCode}`)
|
||||
span ■
|
||||
td(
|
||||
class=`
|
||||
jersey-number
|
||||
border-left
|
||||
available-status-code-${row.statusCode}
|
||||
${event_lineup_entries.find((lue)=>lue.member.id==row.member.id) !== undefined ? "starting" : ""}
|
||||
`)
|
||||
| #{row.member.jerseyNumber}
|
||||
td(
|
||||
class=`
|
||||
player-name
|
||||
available-status-code-${row.statusCode}
|
||||
${event_lineup_entries.find((lue)=>lue.member.id==row.member.id) !== undefined ? "starting" : ""}
|
||||
`)
|
||||
| #{row.member.lastName}
|
||||
td.player-stats.border-left.border-right
|
||||
span.decimal-point .
|
||||
span.avg 000
|
||||
span.delimiter /
|
||||
span.decimal-point .
|
||||
span.obp 000
|
||||
span.delimiter /
|
||||
span.decimal-point .
|
||||
span.slg 000
|
||||
span.delimiter :
|
||||
span.pa 00
|
||||
td.position-capability.pitcher #{row.member.position.includes("P") ? "\u2713" : ""}
|
||||
td.position-capability.catcher #{row.member.position.includes("C") ? "\u2713" : ""}
|
||||
td.position-capability.infield #{row.member.position.includes("IF") ? "\u2713" : ""}
|
||||
td.position-capability.outfield #{row.member.position.includes("OF") ? "\u2713" : ""}
|
||||
- var future_availability
|
||||
- var future_lineupEntry
|
||||
each future_event, i in events_future
|
||||
- future_availability = availabilities.find((el)=>el.eventId ==future_event.id && el.memberId==row.member.id)
|
||||
- future_lineupEntry = all_lineup_entries.find((el)=>el.eventId ==future_event.id && el.member.id==row.member.id)
|
||||
- console.log(future_availability)
|
||||
td(id=`avail-${row.member}-today-plus-${i+1}` class=`
|
||||
row
|
||||
future
|
||||
availability
|
||||
available-status-code-${future_availability.statusCode}
|
||||
`)
|
||||
if future_lineupEntry
|
||||
|#{future_lineupEntry.label.slice(0,2)}
|
||||
else
|
||||
|#{future_availability.status[0]}
|
||||
- var past_availability
|
||||
- var past_lineupEntry
|
||||
each past_event, i in events_past
|
||||
- past_availability = availabilities.find((el)=>el.eventId==past_event.id && el.memberId==row.memberId)
|
||||
- past_lineupEntry = all_lineup_entries.find((el)=>el.event.id==past_event.id && el.member.id==row.member.id)
|
||||
td(id=`avail-${row.member}-today-minus-${i+1}` class=`
|
||||
row
|
||||
past
|
||||
availability
|
||||
available-status-code-${past_availability.statusCode}
|
||||
${past_lineupEntry ? "started" : ""}
|
||||
`)
|
||||
if past_lineupEntry
|
||||
|#{past_lineupEntry.label.slice(0,2)}
|
||||
else
|
||||
|#{past_availability.status[0]}
|
||||
tfoot
|
||||
tr
|
||||
th(colspan='3')
|
||||
th
|
||||
th(colspan='4')
|
||||
each event_future, i in events_future
|
||||
th(class=`availability future`)
|
||||
.rotate #{availabilitySummaries.find((el)=>el.eventId == event_future.id).playerGoingCount}
|
||||
th.today-minus-1
|
||||
.rotate
|
||||
th.today-minus-2
|
||||
.rotate
|
||||
th.today-minus-3
|
||||
.rotate
|
||||
th.today-minus-4
|
||||
.rotate
|
||||
section#lineup-card-dugout.lineup-card
|
||||
.grid-container
|
||||
.section-header
|
||||
.bar-left.event-title
|
||||
| #{event.formattedTitle}
|
||||
.bar-right.homeaway #{event.gameType}
|
||||
.starting-lineup-table
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th(colspan='4') Starting
|
||||
tbody
|
||||
each i in [0,1,2,3,4,5,6,7,8,9,10]
|
||||
- if (typeof(event_lineup_entries_offense[i]) !== 'undefined'){
|
||||
tr
|
||||
th.sequence.label #{event_lineup_entries_offense[i].sequence +1}
|
||||
td.player-name #{event_lineup_entries_offense[i].member.lastName}
|
||||
td.jersey-number #{event_lineup_entries_offense[i].member.jerseyNumber}
|
||||
td.position #{event_lineup_entries_offense[i].label}
|
||||
- } else {
|
||||
tr
|
||||
th.sequence.label
|
||||
td.player-name
|
||||
td.jersey-number
|
||||
td.position
|
||||
tr
|
||||
td
|
||||
td
|
||||
td
|
||||
td
|
||||
- }
|
||||
|
||||
.substitution-table
|
||||
table(style='width: 100%')
|
||||
thead
|
||||
tr
|
||||
th Substitution
|
||||
tbody
|
||||
each i in [0,1,2,3,4,5,6,7,8,9,10,11]
|
||||
tr
|
||||
td.substitution
|
||||
tr
|
||||
td.substitution
|
||||
section#lineup-card-exchange.lineup-card
|
||||
.grid-container
|
||||
.section-header.event-title #{event.formattedTitleForMultiTeam}
|
||||
.starting-lineup-table
|
||||
table.starting-lineup-table
|
||||
thead
|
||||
tr
|
||||
th
|
||||
th.player-name Name
|
||||
th.jersey-number Num
|
||||
th.position Pos
|
||||
tbody
|
||||
each _,i in Array(10)
|
||||
- if (typeof(event_lineup_entries_offense[i]) !== 'undefined'){
|
||||
tr
|
||||
th.sequence.label #{event_lineup_entries_offense[i].sequence+1}
|
||||
td.player-name #{event_lineup_entries_offense[i].member.lastName}
|
||||
td.jersey-number #{event_lineup_entries_offense[i].member.jerseyNumber}
|
||||
td.position #{event_lineup_entries_offense[i].label}
|
||||
- } else {
|
||||
tr
|
||||
th.sequence.label
|
||||
td.player-name
|
||||
td.jersey-number
|
||||
td.position
|
||||
tr
|
||||
td
|
||||
td
|
||||
td
|
||||
td
|
||||
- }
|
||||
#page-2.sheet.gamecard
|
||||
section#back-cover
|
||||
section#front-cover
|
||||
div.grid-container
|
||||
.section-header
|
||||
.bar-right.homeaway #{event.gameType}
|
||||
.event-title
|
||||
| #{event.startDate.toLocaleDateString("en-us",{weekday: "long", day: "numeric",month: "short"})},
|
||||
| #{event.startDate.toLocaleTimeString("en-us",{hour: "numeric", minute: "2-digit"})}
|
||||
br
|
||||
| #{event.locationName}
|
||||
div.team
|
||||
|#{event.team.name}
|
||||
div.opponent
|
||||
|#{event.opponent.name}
|
||||
section#lineup-card-dugout-empty.lineup-card
|
||||
.grid-container
|
||||
.section-header
|
||||
.starting-lineup-table
|
||||
table
|
||||
thead
|
||||
tr
|
||||
th(colspan='4') Starting
|
||||
tbody
|
||||
each _ in Array(12)
|
||||
tr
|
||||
th.sequence.label
|
||||
td.player-name
|
||||
td.jersey-number
|
||||
td.position
|
||||
.substitution-table
|
||||
table(style='width: 100%')
|
||||
thead
|
||||
tr
|
||||
th Substitution
|
||||
tbody
|
||||
each _ in Array(11)
|
||||
tr
|
||||
td.substitution
|
||||
tr
|
||||
td.substitution
|
||||
section#lineup-card-exchange-empty.lineup-card
|
||||
.grid-container
|
||||
.section-header
|
||||
.starting-lineup-table
|
||||
table.starting-lineup-table
|
||||
thead
|
||||
tr
|
||||
th
|
||||
th.player-name Name
|
||||
th.jersey-number Num
|
||||
th.position Pos
|
||||
tbody
|
||||
each _ in Array(12)
|
||||
tr
|
||||
th.sequence.label
|
||||
td.player-name
|
||||
td.jersey-number
|
||||
td.position
|
||||
29
views/home.pug
Normal file
29
views/home.pug
Normal file
@@ -0,0 +1,29 @@
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
title BenchCoach - Home
|
||||
link(rel='stylesheet' href='/css/bootstrap.min.css')
|
||||
link(rel='stylesheet' href='/css/project.css')
|
||||
body.bg-light
|
||||
.container
|
||||
.row
|
||||
.text-center.my-2
|
||||
.row
|
||||
h1
|
||||
img.mx-auto(src="media/benchcoach.svg" style="width: 2.5em;")
|
||||
.row
|
||||
h1
|
||||
strong
|
||||
| Welcome to
|
||||
span.text-nowrap BenchCoach
|
||||
.text-center.lead.fst-italic.fw-light
|
||||
| An assistant coach for TeamSnap
|
||||
.row
|
||||
.col.text-center
|
||||
if req.user
|
||||
ul.list-group
|
||||
each team in teams
|
||||
a(class='team list-group-item' href=`/${team.id}`) #{team.name} [#{team.seasonName}]
|
||||
else
|
||||
a.btn.btn-outline-primary(href="login")
|
||||
| Login
|
||||
139
views/lineup.pug
Normal file
139
views/lineup.pug
Normal file
@@ -0,0 +1,139 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
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.bg-light
|
||||
.container
|
||||
div(style="max-width: 455px")
|
||||
.Panel
|
||||
.panel-header
|
||||
.Panel-title #{event.formattedTitle}
|
||||
.Panel-body
|
||||
.Panel-row
|
||||
p.text-muted.mb-2 #{event.startDate}
|
||||
p #{event.locationName}
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard-check.me-1
|
||||
span Starting Lineup
|
||||
.Panel-row.Grid.Grid--fit.fw-bold.text-center.u-padXs
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
if event_lineup_entries.map((lue)=>lue.label).includes(pos)
|
||||
.Grid-cell.text-success
|
||||
|#{pos}
|
||||
else
|
||||
.Grid-cell.text-danger
|
||||
|#{pos}
|
||||
each lineup_entry, i in event_lineup_entries_offense
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
|#{i+1}
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if lineup_entry.availabilityStatusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{lineup_entry.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option(selected=lineup_entry.label==pos) #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard-minus.me-1
|
||||
span Starting Lineup (Position Only)
|
||||
each lineup_entry, i in event_lineup_entries
|
||||
if lineup_entry.label.includes("[PO]")
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
|#{i+1}
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if lineup_entry.availabilityStatusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if lineup_entry.availabilityStatusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{lineup_entry.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option(selected=lineup_entry.label==pos) #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard.me-1
|
||||
span Bench
|
||||
each availability, i in availabilities.filter((a)=>a.eventId==event_id && !context.event_lineup_entries.map((lue)=>lue.memberId).includes(a.memberId) && !a.member.isNonPlayer && a.statusCode!=0 && a.statusCode!==null)
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if availability.statusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if availability.statusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if availability.statusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{availability.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
|
||||
.Panel
|
||||
.Panel-body
|
||||
.Panel-row.Panel-title.u-padXs
|
||||
i.bi.bi-clipboard-x.me-1
|
||||
span Out
|
||||
each availability, i in availabilities.filter((a)=>a.eventId==event_id && !context.event_lineup_entries.map((lue)=>lue.memberId).includes(a.memberId) && !a.member.isNonPlayer && (a.statusCode==0 || a.statusCode===null))
|
||||
.Panel-row.Panel-row--withCells
|
||||
.Panel-cell.Panel-cell--header.u-padXs.u-size1of12
|
||||
.u-flexAlignSelfCenter
|
||||
.Panel-cell.u-padXs.u-size8of12.fw-bold.text-uppercase
|
||||
if availability.statusCode == 2
|
||||
i.bi.bi-question-circle-fill.text-info.u-spaceRightXs
|
||||
else if availability.statusCode == 1
|
||||
i.bi.bi-check-circle-fill.text-success.u-spaceRightXs
|
||||
else if availability.statusCode == 0
|
||||
i.bi.bi-x-circle-fill.text-danger.u-spaceRightXs
|
||||
else
|
||||
i.bi.bi-question-circle.u-spaceRightXs
|
||||
|#{availability.member.lastName}
|
||||
.Panel-cell.u-padXs.u-size2of12
|
||||
.SelectBox
|
||||
select.SelectBox-options
|
||||
each pos in ["P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"]
|
||||
option #{pos}
|
||||
.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
|
||||
.drag-handle
|
||||
i.bi.bi-grip-vertical.text-secondary
|
||||
|
||||
19
views/login.pug
Normal file
19
views/login.pug
Normal file
@@ -0,0 +1,19 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
title BenchCoach - Login
|
||||
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
|
||||
.u-padSidesMd.u-xs-padSidesLg
|
||||
.Panel.u-padLg
|
||||
h3 BenchCoach
|
||||
p Sign in
|
||||
|
||||
a(class="Button Button--large Button--orange" href="/login/federated/teamsnap")
|
||||
i(class="bi bi-asterisk")/
|
||||
span Sign in with TeamSnap
|
||||
|
||||
|
||||
17
views/team.pug
Normal file
17
views/team.pug
Normal file
@@ -0,0 +1,17 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
title BenchCoach - #{team.name}
|
||||
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
|
||||
h2 #{team.name}
|
||||
p #{team.seasonName}
|
||||
hr
|
||||
ul.list-group
|
||||
a(class="list-group-item" href=`${team.id}/events`) Events
|
||||
a(class="list-group-item" href=`${team.id}/roster`) Roster
|
||||
14
views/teams.pug
Normal file
14
views/teams.pug
Normal file
@@ -0,0 +1,14 @@
|
||||
html
|
||||
head
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport' content='width=device-width, initial-scale=1')
|
||||
title BenchCoach - Teams
|
||||
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
|
||||
ul
|
||||
each team in teams
|
||||
li
|
||||
a(class='team' href=`/${team.id}`) #{team.name} [#{team.seasonName}]
|
||||
Reference in New Issue
Block a user