incorporate letter sized sheet

accessible when url parameter ?sheet_size=letter
This commit is contained in:
2024-05-22 13:41:17 -05:00
parent c2c192bdc6
commit fa50ab93dc
6 changed files with 302 additions and 126 deletions

View File

@@ -1,5 +1,6 @@
const { parsePositionLabel, teamsnapMembersSortLineupAvailabilityLastName, teamsnapMembersSortAvailabilityLastName } = require('../lib/utils')
const {attachBenchcoachPropertiesToMember} = require('../controllers/eventlineup')
const Handlebars = require("handlebars");
exports.offenseLineup = (number_of_slots, event_lineup_entries, members, options) => {
var results = ""
@@ -112,8 +113,15 @@ exports.repeat = (n, options) => {
exports.loopEvents = (events, options) => {
var results = "";
events.forEach(event => {
results += options.fn(event)
if (options.data) {
data = Handlebars.createFrame(options.data);
}
events.forEach((event,i) => {
if (data) {
data.index = i;
}
results += options.fn(event, {data: data })
}
)
return results;
@@ -121,6 +129,9 @@ exports.loopEvents = (events, options) => {
exports.timepointForMember = (member, timeline, event, options) => {
var results = ""
if (options.data) {
data = Handlebars.createFrame(options.data);
}
const availability = timeline.availabilities.find(a=>a.memberId==member.id && a.eventId==event.id)
const eventLineupEntry = timeline.event_lineup_entries.find(a=>(a.memberId==member.id || a.memberName == `${member.firstName} ${member.lastName}`) && a.eventId==event.id)
var value = ""
@@ -130,5 +141,13 @@ exports.timepointForMember = (member, timeline, event, options) => {
else {
value = availability.status[0]
}
return options.fn({availability: availability, eventLineupEntry: eventLineupEntry, value})
return options.fn({availability: availability, eventLineupEntry: eventLineupEntry, value}, {data: data })
}
exports.ifEquals = (testValue, targetValue, options) => {
if (testValue === targetValue) {
return options.fn();
} else {
return '';
}
}

View File

@@ -83,7 +83,7 @@ body {
text-transform: uppercase;
}
table, .lineup-card table {
table, #roster-and-history table, .lineup-card table {
font-size: inherit;
border-collapse: collapse;
empty-cells: show;
@@ -93,20 +93,20 @@ table, .lineup-card table {
overflow-y: hidden;
width: 100%;
}
table th, .lineup-card table th {
table th, #roster-and-history table th, .lineup-card table th {
color: var(--color-grey-700);
}
table th, .lineup-card table th, table td, table #roster-and-history .position, #roster-and-history table .position, .lineup-card table td {
table th, #roster-and-history table th, .lineup-card table th, table td, table #roster-and-history .position, #roster-and-history table .position, #roster-and-history table td, .lineup-card table td {
overflow: hidden;
padding: 0 2px 0 2px;
}
table th:empty::after, table td:empty::after, table #roster-and-history .position:empty::after, #roster-and-history table .position:empty::after {
table th:empty::after, #roster-and-history table th:empty::after, table td:empty::after, table #roster-and-history .position:empty::after, #roster-and-history table .position:empty::after, #roster-and-history table td:empty::after {
content: " ";
}
table.striped tr:nth-child(odd), .lineup-card table tr:nth-child(odd) {
table.striped tr:nth-child(odd) td, table.striped tr:nth-child(odd) #roster-and-history .position, #roster-and-history table tr:nth-child(odd) td, #roster-and-history table tr:nth-child(odd) .position, .lineup-card table tr:nth-child(odd) td, .lineup-card table tr:nth-child(odd) #roster-and-history .position, table.striped tr:nth-child(odd) th, #roster-and-history table tr:nth-child(odd) th, .lineup-card table tr:nth-child(odd) th {
background-color: whitesmoke;
}
table.striped tr:nth-child(even), .lineup-card table tr:nth-child(even) {
table.striped tr:nth-child(even) td, table.striped tr:nth-child(even) #roster-and-history .position, #roster-and-history table tr:nth-child(even) td, #roster-and-history table tr:nth-child(even) .position, .lineup-card table tr:nth-child(even) td, .lineup-card table tr:nth-child(even) #roster-and-history .position, table.striped tr:nth-child(even) th, #roster-and-history table tr:nth-child(even) th, .lineup-card table tr:nth-child(even) th {
background-color: white;
}
@@ -173,6 +173,10 @@ table.striped tr:nth-child(even), .lineup-card table tr:nth-child(even) {
outline-offset: var(--page-margin);
}
.letter .eventsheet.quarters {
--header-height: 0.5in;
}
.letter .eventsheet.index-cards-4x6 {
--section-margin: calc(var(--page-margin)/2);
grid-template-columns: 1fr 1fr;
@@ -201,7 +205,6 @@ table.striped tr:nth-child(even), .lineup-card table tr:nth-child(even) {
border: var(--section-border);
}
.lineup-card header {
font-size: inherit;
text-transform: uppercase;
font-stretch: 85%;
border-style: none;
@@ -230,7 +233,7 @@ table.striped tr:nth-child(even), .lineup-card table tr:nth-child(even) {
font-size: 0.7em;
border-bottom: var(--border);
}
.lineup-card table {
.lineup-card table, .lineup-card #roster-and-history table, #roster-and-history .lineup-card table {
font-size: 21px;
}
.lineup-card td, .lineup-card #roster-and-history .position, #roster-and-history .lineup-card .position {
@@ -252,7 +255,7 @@ table.striped tr:nth-child(even), .lineup-card table tr:nth-child(even) {
padding-left: 2.5px;
padding-right: 2.5px;
}
.lineup-card tr + tr {
.lineup-card tr + tr td, .lineup-card tr + tr #roster-and-history .position, #roster-and-history .lineup-card tr + tr .position, .lineup-card tr + tr th {
border-top: var(--border);
}
.lineup-card.dugout td.player-name, .lineup-card.dugout #roster-and-history .player-name.position, #roster-and-history .lineup-card.dugout .player-name.position {
@@ -262,6 +265,12 @@ table.striped tr:nth-child(even), .lineup-card table tr:nth-child(even) {
.lineup-card.dugout .position, .lineup-card.dugout .jersey-number, .lineup-card.dugout .substitution {
font-stretch: 75%;
}
.lineup-card.exchange header {
text-align: center;
}
.lineup-card.exchange header .float-left, .lineup-card.exchange header .float-right {
float: none;
}
.lineup-card.exchange .player-name {
font-stretch: 100%;
}
@@ -306,12 +315,12 @@ section.blank > div td.substitution, section.blank > div #roster-and-history .su
outline: none;
border-style: none;
}
#todays-game .footer table tr {
#todays-game .footer table tr td, #todays-game .footer table tr #roster-and-history .position, #roster-and-history #todays-game .footer table tr .position, #todays-game .footer table tr th {
background-color: white;
outline: none;
border-bottom: 0.5px solid var(--color-grey-500);
}
#todays-game .footer table tr :last-child {
#todays-game .footer table tr :last-child td, #todays-game .footer table tr :last-child #roster-and-history .position, #roster-and-history #todays-game .footer table tr :last-child .position {
background-color: white;
outline: none;
border-bottom-style: none;
@@ -399,7 +408,7 @@ section.blank > div td.substitution, section.blank > div #roster-and-history .su
#defense-pane .slot-set table tr:first-child th {
border-bottom: var(--border);
}
#defense-pane .slot-set table tr + tr {
#defense-pane .slot-set table tr + tr td, #defense-pane .slot-set table tr + tr #roster-and-history .position, #roster-and-history #defense-pane .slot-set table tr + tr .position, #defense-pane .slot-set table tr + tr th {
border-top: var(--border);
}
#defense-pane .slot-set table tr th.position {
@@ -529,6 +538,7 @@ section.blank > div td.substitution, section.blank > div #roster-and-history .su
header {
background-color: #cadcf9;
height: var(--header-height);
font-family: "Oswald";
width: auto;
text-align: center;
@@ -596,36 +606,30 @@ header {
font-stretch: condensed;
}
.available-status-code-1 {
color: rgb(0, 85, 0);
background-color: #b7e1cd;
}
.available-status-code-0 {
color: rgb(170, 0, 0);
background-color: #f4c7c3;
}
.past.available-status-code-0,
.past.available-status-code-null {
color: var(--color-grey-600);
background-color: inherit;
}
.past.available-status-code-1.Y {
color: inherit;
background-color: var(--color-warning);
}
.available-status-code-2 {
color: blue;
background-color: #acc9fe;
}
#roster-and-history {
--border: var(--section-border);
}
#roster-and-history thead {
#roster-and-history table tr td.available-status-code-1, #roster-and-history table tr .available-status-code-1.position {
color: rgb(0, 85, 0);
background-color: #b7e1cd;
}
#roster-and-history table tr td.available-status-code-0, #roster-and-history table tr .available-status-code-0.position {
color: rgb(170, 0, 0);
background-color: #f4c7c3;
}
#roster-and-history table tr td.past.available-status-code-0, #roster-and-history table tr .past.available-status-code-0.position, #roster-and-history table tr td.past.available-status-code-null, #roster-and-history table tr .past.available-status-code-null.position {
color: var(--color-grey-600);
background-color: inherit;
}
#roster-and-history table tr td.past.available-status-code-1.Y, #roster-and-history table tr .past.available-status-code-1.Y.position {
color: inherit;
background-color: var(--color-warning);
}
#roster-and-history table tr td.available-status-code-2, #roster-and-history table tr .available-status-code-2.position {
color: blue;
background-color: #acc9fe;
}
#roster-and-history table thead tr {
border: black solid 1px;
height: var(--header-height);
}
@@ -677,6 +681,12 @@ header {
text-align: center;
padding: 0;
}
#roster-and-history td.spacer, #roster-and-history .spacer.position, #roster-and-history th.spacer {
display: none;
}
#roster-and-history td.spacer.first-of-group, #roster-and-history .spacer.first-of-group.position, #roster-and-history td.spacer.last-of-group, #roster-and-history .spacer.last-of-group.position, #roster-and-history th.spacer.first-of-group, #roster-and-history th.spacer.last-of-group {
border: none;
}
#roster-and-history td.player-stats, #roster-and-history .player-stats.position, #roster-and-history th.player-stats {
display: none;
font-family: var(--monospace-font);
@@ -699,17 +709,19 @@ header {
color: var(--color-grey-500);
}
#roster-and-history td.player-name, #roster-and-history .player-name.position {
color: black;
color: black !important;
text-align: left;
font-stretch: 95%;
}
#roster-and-history td.jersey-number, #roster-and-history .jersey-number.position {
color: black;
color: black !important;
}
#roster-and-history colgroup {
#roster-and-history .first-of-group {
border-left-width: 1px;
border-left-style: solid;
border-left-color: black;
}
#roster-and-history .last-of-group {
border-right-width: 1px;
border-right-style: solid;
border-right-color: black;
@@ -717,12 +729,11 @@ header {
#roster-and-history col.player-stats {
border: inherit;
}
#roster-and-history th {
#roster-and-history table tr:nth-child(odd) th {
background-color: #cadcf9;
color: black;
border: none;
}
#roster-and-history th.availability-on-day div, #roster-and-history th.position div {
#roster-and-history table tr:nth-child(odd) th.availability-on-day div, #roster-and-history table tr:nth-child(odd) th.position div {
transform: rotate(270deg);
/* font-stretch: 40%; */
font-stretch: 75%;
@@ -735,16 +746,65 @@ header {
#roster-and-history tbody {
border-bottom: solid black 1px;
}
#roster-and-history tr.border-top {
#roster-and-history tr.border-top td, #roster-and-history tr.border-top .position, #roster-and-history tr.border-top th {
border-top: 1px solid black;
}
td.position-capability:not(:empty), #roster-and-history .position-capability.position:not(:empty) {
.letter .eventsheet.quarters header {
font-size: xx-large;
}
.letter .eventsheet.quarters .lineup-card table, .letter .eventsheet.quarters .lineup-card #roster-and-history table, #roster-and-history .letter .eventsheet.quarters .lineup-card table, .letter .eventsheet.quarters #roster-and-history .lineup-card table {
font-size: 23;
}
.letter .eventsheet.quarters #defense-pane .slot-set.pos-p {
align-items: start;
}
.letter .eventsheet.quarters #roster-and-history .spacer {
display: table-cell;
width: 30%;
}
.letter .eventsheet.quarters #roster-and-history td.position.last-of-group, .letter .eventsheet.quarters #roster-and-history .position.last-of-group {
border-right: none;
}
.letter .eventsheet.quarters #roster-and-history .container {
--padding: 2px;
display: block;
flex: none;
transform: rotate(90deg) translateY(-100%);
transform-origin: top left;
height: calc(4.25in - 2 * var(--page-margin) - 2 * var(--padding));
width: calc(5.5in - 2 * var(--page-margin) - 2 * var(--padding));
padding: var(--padding);
}
.letter .eventsheet.quarters #roster-and-history table {
font-size: 11;
height: 100%;
}
.letter .eventsheet.quarters #roster-and-history table thead tr {
height: inherit;
}
.letter .eventsheet.quarters #roster-and-history table thead tr th {
padding-top: 2px;
padding-bottom: 2px;
}
.letter .eventsheet.quarters #roster-and-history table th.availability-on-day div, .letter .eventsheet.quarters #roster-and-history table th.position div {
transform: none;
text-align: center;
}
.letter .eventsheet.quarters #roster-and-history #defense-pane .slot-set.pos-p {
align-items: start;
}
table tr td.position-capability:not(:empty), #roster-and-history table tr td.position-capability:not(:empty), table tr #roster-and-history .position-capability.position:not(:empty), #roster-and-history table tr .position-capability.position:not(:empty) {
color: var(--color-grey-700);
background-color: var(--color-grey-200);
}
td.is-present-checkbox, #roster-and-history .is-present-checkbox.position {
table tr td.position-capability:empty, #roster-and-history table tr td.position-capability:empty, table tr #roster-and-history .position-capability.position:empty, #roster-and-history table tr .position-capability.position:empty {
background-color: white;
}
table tr td.is-present-checkbox, #roster-and-history table tr td.is-present-checkbox, table tr #roster-and-history .is-present-checkbox.position, #roster-and-history table tr .is-present-checkbox.position {
font-size: 0.5em;
text-align: center;
color: white;
@@ -766,7 +826,6 @@ td.is-present-checkbox.available-status-code-None > span, #roster-and-history .i
#front-cover Header {
font-family: "Helvetica Now";
font-weight: 600;
line-height: 1.5em;
background-color: #323669;
color: white;
display: inline-flex;
@@ -779,6 +838,7 @@ td.is-present-checkbox.available-status-code-None > span, #roster-and-history .i
font-family: "Futura Now";
flex-grow: 1;
align-content: center;
font-size: medium;
}
#front-cover Header .homeaway {
font-weight: 800;

View File

@@ -1 +1 @@
{"version":3,"sourceRoot":"","sources":["../../scss/eventsheet.scss"],"names":[],"mappings":";AAAQ;AACA;AACA;AACA;AACA;AACA;AAER;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;AACA;EACE;IACE;;EAEF;IACE;;EAEF;IACE;IACA;;;AAIJ;AACA;EACE;IACE;;EAEF;IACE;;EAEF;IACE;IACA;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;AACA;EAA+B;EAAc;;;AAC7C;EAA+B;EAAc;;;AAC7C;EAA+B;EAAc;;;AAE7C;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;EACA;;AAEA;EACE;;AAMA;EACE;;AAGF;EACE;;;AAOR;EACE;;;AAGF;EACE;;;AAGF;EACE;;AACA;EACE;;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAGF;EACE;;AAGF;EACE;;;AAMN;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;;AAIN;EACE;EACE;EACA;EACA;EACA;;AACA;EACE;;;AAIN;EACE;EACE;EACA;EACA;EACA;;AACA;EACE;;;AAIN;EACE;EAEA;EAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAIJ;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAMN;EACE;EACA;EACA;;AAGF;EAEE;;AAGF;AACE;;AACA;EACE;;AACA;EACE;;AAGJ;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAIJ;EAEE;;AAIA;EACE;EACA;;AAEF;EACE;;AAKF;EACE;;AAGF;EACE;;;AAMJ;EACE;;AAEF;EACE;;AACA;EACE;;;AAOJ;EACE;EACA;EACA;EACA,qBACE;;AAIJ;EACE;;AAGF;EACE;;AAGF;AACE;EACA;EACA;EACA;AACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;;AACA;EACE;;AAQJ;EACE;EACA;EACA;;AAEF;EACE;;;AAON;EACE;;AAGF;EACE;;AAIA;EACE;EACA;;AAMF;EACE;;AAGF;EAOE;EACA;EACA;EACA;;AATA;EACE;;AACA;EACE;;;AAcV;EACE;;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAIA;EACE;;AAGF;EACE;EACA;EACA;;AAEE;EACE;;AAEF;EACE;;AAEF;EACA;EACA;EACA;;AAQA;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AAoCZ;EACE;EAEA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EAIE;EACA;EACA;;AALA;EACE;;AAKF;EACE;;AACA;EACE;;;AASV;EACE;AACA;EACA;EAEA;EACA;AACA;;AAEA;EACE;EACA;;AAGF;EACE;;AACA;EACE;;;AAMN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;AAAA;EAEE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;;AACA;EACE;EACA;;AAEF;AACE;EACA;EACA;AACA;;AAIA;EACA;;AAIF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAOF;EACE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACI;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EAEE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAMN;EACE;EACA;EACA;;AAEF;EACE;;AAIJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EAEE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;AACA;EACA;EACA;EACA;;AAQJ;EACE;;AAGF;EACE;;AAGF;EACE;;;AAOJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;AACA;AAAA;;;AAIF;EACE;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAIJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE","file":"eventsheet.css"}
{"version":3,"sourceRoot":"","sources":["../../scss/eventsheet.scss"],"names":[],"mappings":";AAAQ;AACA;AACA;AACA;AACA;AACA;AAER;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAIF;AACA;EACE;IACE;;EAEF;IACE;;EAEF;IACE;IACA;;;AAIJ;AACA;EACE;IACE;;EAEF;IACE;;EAEF;IACE;IACA;IACA;;;AAIJ;EACE;EACA;EACA;EACA;EACA;;;AAGF;AACA;EAA+B;EAAc;;;AAC7C;EAA+B;EAAc;;;AAC7C;EAA+B;EAAc;;;AAE7C;EACE;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAEF;EACE;EACA;;AAEA;EACE;;AAMkB;EAChB;;AAGiB;EACjB;;;AAOR;EACE;;;AAGF;EACE;;;AAGF;EACE;;AACA;EACE;;AACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAEF;EACE;;AAEF;EACE;;AAEF;EACE;;AAGF;EACE;;AAGF;EACE;;;AAMN;EACI;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;;AAIN;EACE;;;AAGF;EACE;EACE;EACA;EACA;EACA;;AACA;EACE;;;AAIN;EACE;EACE;EACA;EACA;EACA;;AACA;EACE;;;AAIN;EACE;EAEA;EAEA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;;AAIJ;EACE;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAMN;EACE;EACA;EACA;;AAGF;EAEE;;AAGF;AACE;;AACA;EACE;;AACA;EACE;;AAGJ;EACE;;AAEF;EACE;EACA;EACA;EACA;EACA;;AAKF;EAEA;;AAIA;EACE;EACA;;AAEF;EACE;;AAKF;EACE;;AACA;EACE;;AAGJ;EACE;;AAGF;EACE;;;AAMJ;EACE;;AAEF;EACE;;AACA;EACE;;;AAOJ;EACE;EACA;EACA;EACA,qBACE;;AAIJ;EACE;;AAGF;EACE;;AAGF;AACE;EACA;EACA;EACA;AACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;AAGE;EACA;EACA;EACA;;AAGA;EACE;EACA;EACA;;AAIJ;EACE;EACA;;AAGF;EACE;EACA;;AACA;EACE;;AAQJ;EACE;EACA;EACA;;AAEF;EACE;;;AAON;EACE;;AAGF;EACE;;AAIA;EACE;EACA;;AAMF;EACE;;AAGF;EAOE;EACA;EACA;EACA;;AATA;EACE;;AACA;EACE;;;AAcV;EACE;;;AAGF;EACE;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAIA;EACE;;AAGF;EACE;EACA;EACA;;AAEE;EACE;;AAEM;EACN;;AAEF;EACA;EACA;EACA;;AAQA;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AA4BR;EACE;;AACA;EACA,SA/BM;;AAoCZ;EACE;EAEA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EAIE;EACA;EACA;;AALA;EACE;;AAKF;EACE;;AACA;EACE;;;AASV;EACE;AACA;EACA;EAEA;EACA;AACA;;AAEA;EACE;EACA;;AAGF;EACE;;AACA;EACE;;;AAMN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;;AAGF;EACE;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;EACA;EACA;;;AAGF;EACE;;;AAEF;EACE;;;AAGF;EACE;;;AAKF;EACE;;AAME;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EAEE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAIJ;EACE;EACA;;AAEF;AACE;EACA;EACA;AACA;;AAIA;EACA;;AAKF;EACE;;AAGF;EACE;EACA;EACA;EACA;;AAOF;EACE;;AAGF;EACE;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAGF;EAEE;EACA;EACA;EACA;EACA;EACA;;AAGF;EACI;EACA;EACA;EACA;EACA;;AAEJ;EACE;;AACA;EACE;;AAGJ;EACI;EACA;EACA;EACA;EACA;;AAEA;AAAA;AAAA;AAAA;EAEE;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAMN;EACE;EACA;EACA;;AAEF;EACE;;AAIJ;EACE;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAGF;EAEE;;AAGF;EACE;EACA;;AAEA;EACE;AACA;EACA;EACA;EACA;;AAQJ;EACE;;AAGF;EACE;;AAGa;EACb;;;AAMF;EACE;;AAEF;EACE;;AAEF;EACE;;AAIA;EACE;EACA;;AAGF;EACE;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EAQE;EACA;;AARA;EACE;;AACA;EACE;EACA;;AAWJ;EACE;EACA;;AAQJ;EACE;;;AAKN;EACE;EACA;;;AAGF;EACE;;;AAGF;EACE;EACA;EACA;AACA;AAAA;;;AAIF;EACE;;;AAGF;EACE;;;AAGF;EACE;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;EACA;;AAIJ;EACE;;AAGF;EACE;;AAGF;EACE;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;;AAGF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE;;AAGF;EACE","file":"eventsheet.css"}

View File

@@ -98,13 +98,13 @@ table {
&.striped {
tr {
&:nth-child(odd) {
&:nth-child(odd) {td, th {
background-color: whitesmoke;
}
}}
&:nth-child(even) {
&:nth-child(even) {td,th {
background-color: white;
}
}}
}
}
}
@@ -177,6 +177,10 @@ table {
}
}
.letter .eventsheet.quarters {
--header-height: 0.5in;
}
.letter .eventsheet.index-cards-4x6 {
--section-margin: calc(var(--page-margin)/2);
grid-template-columns: 1fr 1fr;
@@ -207,7 +211,6 @@ table {
border: var(--section-border);
header {
font-size: inherit;
text-transform: uppercase;
font-stretch: 85%;
border-style: none;
@@ -266,9 +269,10 @@ table {
}
tr + tr {
td, th{
// border-top: 1px solid black;
border-top: var(--border);
}
} }
&.dugout {
td.player-name {
@@ -281,6 +285,12 @@ table {
}
&.exchange {
header {
text-align: center;
.float-left, .float-right {
float:none;
}
}
.player-name {
font-stretch: 100%;
}
@@ -338,11 +348,13 @@ section.blank {
border-style: none;
tr {
td, th {
background-color: white;
outline: none;
border-bottom: 0.5px solid var(--color-grey-500);
}
:last-child {
:last-child td {
background-color: white;
outline: none;
border-bottom-style: none;
@@ -391,7 +403,7 @@ section.blank {
table {
font-size: 14px;
width: 120px;
tbody > tr:last-child {
tbody > tr:last-child td {
// display: none;
}
}
@@ -460,9 +472,9 @@ section.blank {
&:first-child th {
border-bottom: var(--border);
}
& + tr {
& + tr {td,th {
border-top: var(--border);
}
}}
th.position {
font-family: var(--monospace-font);
width: 2ch;
@@ -567,13 +579,13 @@ section.blank {
header {
background-color: #cadcf9;
height: var(--header-height);
font-family: "Oswald";
width: auto;
text-align: center;
padding-left: 10px;
padding-right: 10px;
border-bottom: var(--section-border);
}
.cell-checkbox {
@@ -634,35 +646,43 @@ header {
font-stretch: condensed;
}
.available-status-code-1 {
#roster-and-history {
--border: var(--section-border);
table {
@extend table, .striped;
}
table tr td {
&.available-status-code-1 {
color: rgb(0, 85, 0);
background-color: #b7e1cd;
}
.available-status-code-0 {
&.available-status-code-0 {
color: rgb(170, 0, 0);
background-color: #f4c7c3;
}
.past.available-status-code-0,
.past.available-status-code-null {
&.past.available-status-code-0,
&.past.available-status-code-null {
color: var(--color-grey-600);
background-color: inherit;
}
.past.available-status-code-1.Y {
&.past.available-status-code-1.Y {
color: inherit;
background-color: var(--color-warning);
}
.available-status-code-2 {
&.available-status-code-2 {
color: blue;
background-color: #acc9fe;
}
}
#roster-and-history {
--border: var(--section-border);
thead {
table thead tr {
border: black solid 1px;
height: var(--header-height);
}
@@ -679,6 +699,7 @@ header {
}
}
.player-name {
font-stretch: 95%;
}
@@ -728,6 +749,12 @@ header {
text-align: center;
padding: 0;
}
&.spacer {
display: none;
&.first-of-group, &.last-of-group {
border: none;
}
}
&.player-stats {
display:none;
font-family: var(--monospace-font);
@@ -754,19 +781,21 @@ header {
td{
&.player-name {
color: black;
color: black !important;
text-align: left;
font-stretch: 95%;
}
&.jersey-number {
color: black;
color: black !important;
}
}
colgroup {
.first-of-group {
border-left-width: 1px;
border-left-style: solid;
border-left-color: black;
}
.last-of-group {
border-right-width: 1px;
border-right-style: solid;
border-right-color: black;
@@ -777,10 +806,9 @@ header {
border: inherit;
}
th {
table tr:nth-child(odd) th { //needs to have n-thchild to override .striped
background-color: #cadcf9;
color: black;
border: none;
&.availability-on-day div {
transform: rotate(270deg);
@@ -803,20 +831,86 @@ header {
border-bottom: solid black 1px;
}
tr.border-top {
tr.border-top {td, th {
border-top: 1px solid black;
}
}}
}
td.position-capability:not(:empty) {
.letter .eventsheet.quarters {
header {
font-size: xx-large;
}
.lineup-card table {
font-size: 23;
}
#defense-pane .slot-set.pos-p {
align-items: start;
}
#roster-and-history {
.spacer {
display:table-cell;
width: 30%;
}
td.position.last-of-group {
border-right: none;
}
.container {
--padding: 2px;
display: block;
flex: none;
transform: rotate(90deg) translateY(-100%);
transform-origin: top left;
height: calc(4.25in - 2 * var(--page-margin) - 2 * var(--padding));
width: calc(5.5in - 2 * var(--page-margin) - 2 * var(--padding));
padding: var(--padding)
}
table {
thead tr {
height: inherit;
th {
padding-top: 2px;
padding-bottom: 2px;
}
}
font-size: 11;
height:100%;
td, th {
&.player-name {
// width: 38%;
}
}
th.availability-on-day div {
transform: none;
text-align: center;
}
}
.position, .availability-on-day, .is-present-checkbox {
// width: 3ch;
}
#defense-pane .slot-set.pos-p {
align-items: start;
}
}}
table tr td.position-capability:not(:empty) {
color: var(--color-grey-700);
background-color: var(--color-grey-200);
}
td.is-present-checkbox {
table tr td.position-capability:empty {
background-color: white;
}
table tr td.is-present-checkbox {
font-size: 0.5em;
text-align: center;
color: white;
@@ -838,7 +932,6 @@ td.is-present-checkbox.available-status-code-None > span {
Header {
font-family: "Helvetica Now";
font-weight: 600;
line-height: 1.5em;
background-color: #323669;
color: white;
display: inline-flex;
@@ -850,6 +943,7 @@ td.is-present-checkbox.available-status-code-None > span {
font-family: "Futura Now";
flex-grow: 1;
align-content: center;
font-size: medium;
}
.homeaway {

View File

@@ -1,14 +1,16 @@
<table>
<colgroup><col span="4" class="player"></colgroup>
{{!-- <colgroup><col span="0" class="player-stats"></colgroup> --}}
<colgroup><col span="4" class="position-capability"></colgroup>
{{!-- <colgroup><col span="4" class="player"></colgroup> --}}
{{!-- <colgroup><col span="1" class="spacer"></colgroup> --}}
{{!-- <colgroup><col span="1" class="player-stats"></colgroup> --}}
{{!-- <colgroup><col span="4" class="position-capability"></colgroup>
<colgroup><col span="4" class="availability-on-day future"></colgroup>
<colgroup><col span="4" class="availability-on-day past"></colgroup>
<colgroup><col span="4" class="availability-on-day past"></colgroup> --}}
<thead>
<tr>
<th colspan="4" id="today-availability">
Available ({{availabilitySummary.playerGoingCount}}|{{availabilitySummary.playerMaybeCount}})
</th>
<th class="spacer first-of-group last-of-group"></th>
<th class="player-stats">
<span class="decimal-point">.</span>AVG
<span class="delimiter">/</span>
@@ -17,17 +19,17 @@
<span class="decimal-point">.</span>SLG
<span class="delimiter">:</span>PA
</th>
<th class="position-capability pitcher">P</th>
<th class="position-capability pitcher first-of-group">P</th>
<th class="position-capability catcher">C</th>
<th class="position-capability infield">I</th>
<th class="position-capability outfield">O</th>
<th class="position-capability outfield last-of-group">O</th>
{{!-- <% for timepoint, i in timeline.select{|tp| tp[:comparison_to_selected]>0}.sort{|tp| -tp[:comparison_to_selected]}.each_with_index do%> --}}
{{#loopEvents upcoming_events}}
<th class="availability-on-day avail-today-plus-{{@index}}" date="{{this.startDate}}"><div>{{dateFormat this.startDate "ddd" }}</div></th>
<th class="availability-on-day avail-today-plus-{{@index}} {{#ifEquals @index 0}}first-of-group{{/ifEquals}}{{#ifEquals @index 3}}last-of-group{{/ifEquals}}" date="{{this.startDate}}"><div>{{dateFormat this.startDate "ddd" }}</div></th>
{{/loopEvents}}
{{#loopEvents recent_events}}
<th class="availability-on-day avail-today-minus-{{@index}}" date="{{this.startDate}}"><div>{{dateFormat this.startDate "ddd" }}</div></th>
<th class="availability-on-day avail-today-minus-{{@index}} {{#ifEquals @index 0}}first-of-group{{/ifEquals}}{{#ifEquals @index 3}}last-of-group{{/ifEquals}}" date="{{this.startDate}}"><div>{{dateFormat this.startDate "ddd" }}</div></th>
{{/loopEvents}}
</tr>
</thead>
@@ -35,7 +37,7 @@
{{!-- <% by_member.select{|m,d| !m.is_non_player}.each_with_index do |(member, d), i|%> --}}
{{#rosterHistory event event_lineup_entries members availabilities}}
<tr class="roster-history-slot{{#if (isStarting this)}} starting-today{{/if}}">
<td class="is-present-checkbox available-status-code-{{this.benchcoach.availability.statusCode}}">
<td class="is-present-checkbox available-status-code-{{this.benchcoach.availability.statusCode}} first-of-group">
<span>■</span>
</td>
<td class="jersey-number available-status-code-{{this.benchcoach.availability.statusCode}}">
@@ -44,10 +46,11 @@
<td class="player-name available-status-code-{{this.benchcoach.availability.statusCode}}">
{{this.lastName}}
</td>
<td class="position available-status-code-{{this.benchcoach.availability.statusCode}}">
<span>{{positionLabelWithoutFlags this.benchcoach.eventLineupEntry.label}}</span>
<td class="position available-status-code-{{this.benchcoach.availability.statusCode}} last-of-group">
<span>{{this.benchcoach.eventLineupEntry.label}}</span>
</td>
<td class="player-stats border-left border-right">
<td class="spacer"></td>
<td class="player-stats first-of-group last-of-group">
<span class="decimal-point">.</span>
<span class="avg">000</span>
<span class="delimiter">/</span>
@@ -59,20 +62,20 @@
<span class="delimiter">:</span>
<span class="pa">00</span>
</td>
<td class="position-capability pitcher">{{positionCapabilityFor this "P"}}</td>
<td class="position-capability pitcher first-of-group">{{positionCapabilityFor this "P"}}</td>
<td class="position-capability catcher">{{positionCapabilityFor this "C"}}</td>
<td class="position-capability infield">{{positionCapabilityFor this "IF"}}</td>
<td class="position-capability outfield">{{positionCapabilityFor this "OF"}}</td>
<td class="position-capability outfield last-of-group">{{positionCapabilityFor this "OF"}}</td>
{{#loopEvents ../upcoming_events}}
{{#timepointForMember ../this ../../timeline this}}
<td class="availability-on-day future available-status-code-{{this.availability.statusCode}} {{this.value}}">
<td class="availability-on-day future available-status-code-{{this.availability.statusCode}} {{this.value}} {{#ifEquals @index 0}}first-of-group{{/ifEquals}}{{#ifEquals @index 3}}last-of-group{{/ifEquals}}">
{{this.value}}
</td>
{{/timepointForMember}}
{{/loopEvents}}
{{#loopEvents ../recent_events}}
{{#timepointForMember ../this ../../timeline this}}
<td class="availability-on-day past available-status-code-{{this.availability.statusCode}} {{this.value}}">
<td class="availability-on-day past available-status-code-{{this.availability.statusCode}} {{this.value}} {{#ifEquals @index 0}}first-of-group{{/ifEquals}}{{#ifEquals @index 3}}last-of-group{{/ifEquals}}">
{{this.value}}
</td>
{{/timepointForMember}}

View File

@@ -5,7 +5,7 @@
<section class="NE" id="defense-card">
<header>
<div class="event-title float-left">
{{event.formattedTitle}} {{dateFormat event.startDate "ddd, MMM D h:mm A" }}
{{event.formattedTitle}}
</div>
<div class="homeaway float-right">
{{event.gameType}}
@@ -32,7 +32,7 @@
</div>
</section>
<section class="SW" id="roster-and-history">
<div class="roster-and-history">
<div class="container">
{{> roster_and_history
event=event
event_lineup_entries=event_lineup_entries
@@ -82,7 +82,7 @@
</section>
<section class="SE lineup-card exchange" id="lineup-card-exchange">
<header>
<div class="float-left event-title">{{event.formattedTitle}}</div>
<div class="float-left event-title">{{event.formattedTitleForMultiTeam}}</div>
<div class="float-right homeaway">{{event.gameType}}</div>
</header>
<div class="starting-lineup-table">