Skip to content

Commit

Permalink
Make the scoreboard summary sticky per sortorder
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Oct 29, 2023
1 parent 5b4c80e commit f0b8756
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions webapp/public/style_domjudge.css
Original file line number Diff line number Diff line change
Expand Up @@ -647,3 +647,19 @@ blockquote {
margin-right: 2em;
font-weight: normal;
}

.summaryline td {
position: sticky;
bottom: 0;
box-shadow: -1px 0 0 0 silver inset,
0 2px 0 0 black,
0 -2px 0 0 black;
/* We get another line between the teamscore */
/*border: none;*/
background: var(--background-color);
}

tbody.scoreboard-sortorder-body {
position: relative;
z-index: 100;
}
4 changes: 2 additions & 2 deletions webapp/templates/partials/scoreboard_table.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
{% endif %}
</tr>
</thead>
<tbody style="z-index: 100;">
<tbody class="scoreboard-sortorder-body">
{% set previousSortOrder = -1 %}
{% set previousTeam = null %}
{% set backgroundColors = {"#FFFFFF": 1} %}
Expand All @@ -108,7 +108,7 @@
{# Output summary of previous sort order #}
{% include 'partials/scoreboard_summary.html.twig' with {sortOrder: previousSortOrder} %}
</tbody>
<tbody style="z-index: {{ 100-score.team.category.sortorder }};">
<tbody class="scoreboard-sortorder-body" style="z-index: {{ 100-score.team.category.sortorder }};">
{% endif %}
{% set classes = classes | merge(['sortorderswitch']) %}
{% set previousSortOrder = score.team.category.sortorder %}
Expand Down

0 comments on commit f0b8756

Please sign in to comment.