Implement shared scoreboard UI
This commit is contained in:
7
app/views/application/_event_nav.html.slim
Normal file
7
app/views/application/_event_nav.html.slim
Normal file
@@ -0,0 +1,7 @@
|
||||
.mt-2.row style="font-size: 16px;"
|
||||
.col
|
||||
ul.nav.nav-tabs.mb-4
|
||||
- @contest.event.contests.where(public: true).each do |contest|
|
||||
li.nav-item
|
||||
a.nav-link class="#{contest == @contest ? "active" : ""}" href="/public/event/#{@contest.event.slug}?contest_id=#{contest.id}"
|
||||
= contest.name
|
||||
@@ -1,5 +1,5 @@
|
||||
.row
|
||||
.mt-3.col-6.d-flex.flex-column style="height: calc(100vh - 310px)"
|
||||
.row style="width: 100%;"
|
||||
.mt-3.col-6.d-flex.flex-column style="height: calc(100vh - 260px)"
|
||||
.d-flex.flex-column style="overflow-y: auto"
|
||||
table.table.table-striped.table-hover
|
||||
thead
|
||||
|
||||
@@ -46,8 +46,12 @@ html
|
||||
h1.mb-4
|
||||
- if @contest && @contest.id.present?
|
||||
- if active_page("/public") == "active" && @action_path
|
||||
= @contest.name
|
||||
.float-end style="margin-top: -5px;" id="scoreboard-switches"
|
||||
- if active_page("/public/event/") == "active"
|
||||
= @contest.event.name
|
||||
= render "event_nav"
|
||||
- else
|
||||
= @contest.name
|
||||
.float-end style="margin-top: #{active_page("/public/event/") == "active" ? "-18px" : "-5px"};" id="scoreboard-switches"
|
||||
.d-inline-flex.align-items-center
|
||||
.ms-4.form-check.form-switch style="font-size: 16px; font-weight: 300;"
|
||||
input.form-check-input type="checkbox" id="refresh-checkbox"
|
||||
|
||||
Reference in New Issue
Block a user