-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scoreboard extension: CSV export, wide version (#90)
small fix front-end Merge remote-tracking branch 'origin/master' into 85-csv-scoreboard Implement a wide version of the scoreboard page Move scoreboard view logic to go code Show scoreboard export buttons Implement CSV scoreboard export endpoints Co-authored-by: Thang Pham <[email protected]>
- Loading branch information
1 parent
72165da
commit 56a9e76
Showing
11 changed files
with
230 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{{ define "title" }}{{.Contest.Name}} [scoreboard]{{ end }} | ||
|
||
{{ define "main" }} | ||
<div class="text-center"> | ||
<div class="text-4xl py-6 text-center"><b>{{.Contest.Name}}</b></div> | ||
|
||
<div class="text-xl my-2 text-gray-800 timer" data-start="{{.Contest.StartTime | time}}" | ||
data-end="{{.Contest.EndTime | time}}"><span class="font-semibold"></span></div> | ||
|
||
<div class="text-xl my-2"> | ||
The contest starts at <span class="font-semibold display-time" data-time="{{.Contest.StartTime | time}}"></span> | ||
and | ||
ends at <span class="font-semibold display-time" data-time="{{.Contest.EndTime | time}}"></span>. | ||
</div> | ||
</div> | ||
|
||
{{ with .Show }} | ||
<div class="text-center subheader">{{.Error}} | ||
</div> | ||
{{ else }} | ||
{{ template "scoreboard-body" . }} | ||
{{ end }} | ||
<hr class="mt-8"> | ||
{{ template "footer" . }} | ||
{{ end }} | ||
|
||
{{ define "scoreboard-body" }} | ||
{{ $contest_link := printf "/contests/%d" .Contest.ID }} | ||
<div id="scoreboard"></div> | ||
<script> | ||
document.initialScoreboard = JSON.parse("{{ json .JSON }}"); | ||
document.scoreboardJSONLink = '{{.JSONLink}}'; | ||
</script> | ||
<script src="../../ts/scoreboard/index.tsx"></script> | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters