Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 58 additions & 8 deletions MMM-MyScoreboard.css
Original file line number Diff line number Diff line change
Expand Up @@ -964,9 +964,18 @@
height: 86px;
}

/* Hide broadcast logos when baseball detail is showing */
.MMM-MyScoreboard .box-score.baseball-live-detail .broadcast {
display: none;
/* Extra height when broadcast is shown */
.MMM-MyScoreboard .box-score.baseball-has-broadcast.largeLogos {
height: 110px;
}
.MMM-MyScoreboard .box-score.baseball-has-broadcast.mediumLogos {
height: 100px;
}
.MMM-MyScoreboard .box-score.baseball-has-broadcast.stacked {
height: 100px;
}
.MMM-MyScoreboard .box-score.baseball-has-broadcast.stackedWithLogos {
height: 106px;
}

/* Shrink inning text and push it to top when detail is showing */
Expand All @@ -977,6 +986,21 @@
font-weight: 400;
}

/* Hide empty broadcast in baseball detail; position at bottom when present */
.MMM-MyScoreboard .box-score.baseball-live-detail .broadcast {
display: none;
}

.MMM-MyScoreboard .box-score.baseball-has-broadcast .broadcast {
display: flex;
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: 100%;
justify-content: center;
}

.MMM-MyScoreboard .box-score.baseball-live-detail.mediumLogos .status {
top: 1px;
font-size: 11px;
Expand All @@ -997,31 +1021,57 @@
top: 26px;
}

/* Shift logos/scores up when broadcast is also shown */
.MMM-MyScoreboard .box-score.baseball-has-broadcast.largeLogos .logo {
top: 14px;
}
.MMM-MyScoreboard .box-score.baseball-has-broadcast.largeLogos .score {
top: 29px;
}

.MMM-MyScoreboard .box-score.baseball-has-broadcast.mediumLogos .logo {
top: 24px;
}
.MMM-MyScoreboard .box-score.baseball-has-broadcast.mediumLogos .score {
top: 30px;
}

.MMM-MyScoreboard .box-score.baseball-live-detail.stacked .status,
.MMM-MyScoreboard .box-score.baseball-live-detail.stackedWithLogos .status {
top: 2px;
font-size: 11px;
}

/* Detail container centered in the box */
/* Detail container vertically aligned with logos/scores */
.MMM-MyScoreboard .baseball-detail {
position: absolute;
top: 16px;
top: 26px;
bottom: 2px;
left: 100px;
right: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
gap: 0px;
color: #CCC;
white-space: nowrap;
}

.MMM-MyScoreboard .baseball-detail.mid-inning {
top: 22px;
bottom: auto;
top: 5px;
bottom: 2px;
}

/* Reserve space at bottom when broadcast is shown */
.MMM-MyScoreboard .box-score.baseball-has-broadcast .baseball-detail {
top: 29px;
bottom: 21px;
}

.MMM-MyScoreboard .box-score.baseball-has-broadcast .baseball-detail.mid-inning {
top: 8px;
bottom: 21px;
}

.MMM-MyScoreboard .box-score.mediumLogos .baseball-detail {
Expand Down
6 changes: 6 additions & 0 deletions MMM-MyScoreboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,12 @@ Module.register('MMM-MyScoreboard', {
}

boxScore.appendChild(detail)

// Move broadcast out of status and into boxScore so it can be positioned at the bottom
if (gameObj.broadcast != null) {
boxScore.classList.add('baseball-has-broadcast')
boxScore.appendChild(broadcastPart)
}
}
}

Expand Down