From f0b8756d0bc1c09ebf331d16a79ecbde74a8a329 Mon Sep 17 00:00:00 2001 From: Michael Vasseur <14887731+vmcj@users.noreply.github.com> Date: Wed, 30 Aug 2023 07:54:31 +0200 Subject: [PATCH] Make the scoreboard summary sticky per sortorder --- webapp/public/style_domjudge.css | 16 ++++++++++++++++ .../partials/scoreboard_table.html.twig | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/webapp/public/style_domjudge.css b/webapp/public/style_domjudge.css index 9094d1815d..150f60c4f3 100644 --- a/webapp/public/style_domjudge.css +++ b/webapp/public/style_domjudge.css @@ -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; +} diff --git a/webapp/templates/partials/scoreboard_table.html.twig b/webapp/templates/partials/scoreboard_table.html.twig index 6dd4c8c79b..04ee5503b5 100644 --- a/webapp/templates/partials/scoreboard_table.html.twig +++ b/webapp/templates/partials/scoreboard_table.html.twig @@ -96,7 +96,7 @@ {% endif %} - + {% set previousSortOrder = -1 %} {% set previousTeam = null %} {% set backgroundColors = {"#FFFFFF": 1} %} @@ -108,7 +108,7 @@ {# Output summary of previous sort order #} {% include 'partials/scoreboard_summary.html.twig' with {sortOrder: previousSortOrder} %} - + {% endif %} {% set classes = classes | merge(['sortorderswitch']) %} {% set previousSortOrder = score.team.category.sortorder %}