Make scoreboard UI not scrollable for desktop
This commit is contained in:
@@ -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|
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user