Make scoreboard UI not scrollable for desktop
Some checks failed
CI / scan_ruby (push) Has been cancelled
CI / scan_js (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / test (push) Has been cancelled

This commit is contained in:
sto
2026-08-26 08:00:26 +02:00
parent 762ecc23f8
commit 721cd1d50e
3 changed files with 24 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
.mt-3.row style="font-size: 16px;" .mt-3.row style="font-size: 16px;" id="event-nav"
.col .col
ul.nav.nav-tabs.mb-4 ul.nav.nav-tabs.mb-4
- @contest.event.contests.where(public: true).each do |contest| - @contest.event.contests.where(public: true).each do |contest|

View File

@@ -1,4 +1,14 @@
.d-flex.flex-column style="height: calc(100vh - 210px); width: 100%;" .d-flex.flex-column style="height: calc(100vh - 210px); width: 100%;" id="scoreboard-container"
javascript:
function adaptHeight() {
const tabsEl = document.getElementById('event-nav');
const scoreboardContainerEl = document.getElementById('scoreboard-container');
scoreboardContainerEl.style.height = `calc(100vh - ${180 + tabsEl.offsetHeight}px)`;
}
adaptHeight();
addEventListener('resize', adaptHeight);
= render "selectors" = render "selectors"

View File

@@ -1,5 +1,16 @@
.row style="width: 100%;" .row style="width: 100%;"
.col-6.d-flex.flex-column style="height: calc(100vh - 260px); margin-top: #{active_page("/public/event/") == "active" ? "0" : "1rem"};" .col-6.d-flex.flex-column id="scoreboard-container" style="height: calc(100vh - 260px); margin-top: #{active_page("/public/event/") == "active" ? "0" : "1rem"};"
javascript:
function adaptHeight() {
const tabsEl = document.getElementById('event-nav');
const scoreboardContainerEl = document.getElementById('scoreboard-container');
scoreboardContainerEl.style.height = `calc(100vh - ${180 + tabsEl.offsetHeight}px)`;
}
adaptHeight();
addEventListener('resize', adaptHeight);
.d-flex.flex-column style="overflow-y: auto" .d-flex.flex-column style="overflow-y: auto"
table.table.table-striped.table-hover table.table.table-striped.table-hover
thead thead