|
|
@ -8,22 +8,19 @@ |
|
|
|
<% include header %> |
|
|
|
<% include header %> |
|
|
|
<div class="padding"> |
|
|
|
<div class="padding"> |
|
|
|
<h1 style="margin-bottom: 30px; "><%= contest.title %></h1> |
|
|
|
<h1 style="margin-bottom: 30px; "><%= contest.title %></h1> |
|
|
|
|
|
|
|
<% let unveiled = (contest.allowedEdit || syzoj.utils.getCurrentDate() >= contest.start_time); %> |
|
|
|
<% let start = syzoj.utils.formatDate(contest.start_time), end = syzoj.utils.formatDate(contest.end_time); %> |
|
|
|
<% let start = syzoj.utils.formatDate(contest.start_time), end = syzoj.utils.formatDate(contest.end_time); %> |
|
|
|
<% if (syzoj.utils.getCurrentDate() >= contest.start_time && syzoj.utils.getCurrentDate() < contest.end_time && start.split(' ')[0] === end.split(' ')[0]) { |
|
|
|
<% if (contest.running && start.split(' ')[0] === end.split(' ')[0]) { |
|
|
|
start = start.split(' ')[1]; end = end.split(' ')[1]; |
|
|
|
start = start.split(' ')[1]; end = end.split(' ')[1]; |
|
|
|
} %> |
|
|
|
} %> |
|
|
|
<div class="ui pointing below left label"> |
|
|
|
<div class="ui pointing below left label"><%= start %></div> |
|
|
|
<%= start %> |
|
|
|
<div class="ui pointing below right label"><%= end %></div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="ui pointing below right label"> |
|
|
|
|
|
|
|
<%= end %> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
<% let timePercentage = Math.floor(Math.min(1, (syzoj.utils.getCurrentDate() - contest.start_time) / (contest.end_time - contest.start_time)) * 100); %> |
|
|
|
<% let timePercentage = Math.floor(Math.min(1, (syzoj.utils.getCurrentDate() - contest.start_time) / (contest.end_time - contest.start_time)) * 100); %> |
|
|
|
<div id="timer-progress" class="ui tiny indicating progress<% if (timePercentage == 100) { %> success<% } %>" data-percent="<%= timePercentage %>"> |
|
|
|
<div id="timer-progress" class="ui tiny indicating progress<% if (timePercentage == 100) { %> success<% } %>" data-percent="<%= timePercentage %>"> |
|
|
|
<div class="bar" style="width: <%= timePercentage %>%;"></div> |
|
|
|
<div class="bar" style="width: <%= timePercentage %>%;"></div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="ui grid"> |
|
|
|
<div class="ui grid"> |
|
|
|
<% if (contest.allowedEdit || !contest.running) { %> |
|
|
|
<% if (contest.allowedEdit || (unveiled && !contest.running)) { %> |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="column"> |
|
|
|
<div class="column"> |
|
|
|
<div class="ui buttons"> |
|
|
|
<div class="ui buttons"> |
|
|
@ -43,6 +40,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<% if (unveiled) { %> |
|
|
|
<div class="row"> |
|
|
|
<div class="row"> |
|
|
|
<div class="column"> |
|
|
|
<div class="column"> |
|
|
|
<table class="ui selectable celled table"> |
|
|
|
<table class="ui selectable celled table"> |
|
|
@ -84,6 +82,7 @@ |
|
|
|
</table> |
|
|
|
</table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<% } %> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|