Skip to content

Commit

Permalink
If there are multiple scoreboards, show a drop-down
Browse files Browse the repository at this point in the history
  • Loading branch information
mpsijm committed May 11, 2024
1 parent b9f8eb5 commit 5382365
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
3 changes: 2 additions & 1 deletion assets/ananke/css/archive.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
}

.archive-link {
padding: 0 0.75rem;
text-align: center;
width: 3em;
width: 0;
white-space: nowrap;
}

Expand Down
3 changes: 2 additions & 1 deletion data/archive/dapc/2021.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ links:
photos: https://ch.tudelft.nl/media/photos/?type_0=gallery&album_gallery_id_0=70
website:
result: /archive/2021/dapc/scoreboard.html
merged: /archive/2021/dapc/full-scoreboard.html
scoreboards:
Merged: /archive/2021/dapc/full-scoreboard.html
4 changes: 3 additions & 1 deletion data/archive/fpc/2024.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ links:
photos: #https://ch.tudelft.nl/media/photos/?type_0=gallery&album_gallery_id_0=235
website:
result: /archive/2024/fpc/scoreboard/
merged: /archive/2024/fpc/merged-scoreboard/
scoreboards:
Merged: /archive/2024/fpc/merged-scoreboard/
Online: /archive/2024/fpc/online-scoreboard/
28 changes: 22 additions & 6 deletions layouts/partials/archive-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,28 @@
{{end}}
</td>
<td class="archive-link">
{{if .links.result}}
<a href="{{.links.result}}" target="_blank"><span class="material-symbols-outlined icon" title="Scoreboard">scoreboard</span></a>
{{end}}
{{if .links.merged}}
<a href="{{.links.merged}}" target="_blank"><span class="material-symbols-outlined icon" title="Merged">merge</span></a>
{{end}}
<div class="flex">
{{if .links.result}}
<a href="{{.links.result}}" target="_blank">
<span class="material-symbols-outlined icon" title="Scoreboard">
scoreboard
</span>
</a>
{{end}}
{{if .links.scoreboards}}
<div onmouseleave="this.children[1].style.display='none'" class="relative">
<span class="material-symbols-outlined icon" title="More" style="cursor:pointer"
onmouseenter="this.nextElementSibling.style.display='block'">
arrow_drop_down
</span>
<div class="absolute bg-white pa2 ba br3" style="display:none;top:1.5rem;right:0">
{{range $k, $v := .links.scoreboards}}
<a href="{{$v}}" target="_blank">{{$k}}</a><br />
{{end}}
</div>
</div>
{{end}}
</div>
</td>
<td class="archive-link">
{{if .links.photos}}
Expand Down

0 comments on commit 5382365

Please sign in to comment.