|
28 | 28 | </style>
|
29 | 29 | {% endif %}
|
30 | 30 |
|
31 |
| -<table class="scoreboard center {% if jury %}scoreboard_jury{% endif %}"> |
| 31 | +<table class="d-none d-md-block scoreboard center {% if jury %}scoreboard_jury{% endif %}"> |
32 | 32 |
|
33 | 33 | {# output table column groups (for the styles) #}
|
34 | 34 | <colgroup>
|
|
316 | 316 | </tbody>
|
317 | 317 | </table>
|
318 | 318 |
|
| 319 | +<table class="d-md-none scoreboard center {% if jury %}scoreboard_jury{% endif %}"> |
| 320 | + <thead> |
| 321 | + {# output table column groups (for the styles) #} |
| 322 | + <colgroup> |
| 323 | + <col id="scorerank"/> |
| 324 | + {% if showFlags %} |
| 325 | + <col id="scoreflags"/> |
| 326 | + {% else %} |
| 327 | + <col/> |
| 328 | + {% endif %} |
| 329 | + {% if showAffiliationLogos %} |
| 330 | + <col id="scorelogos"/> |
| 331 | + {% endif %} |
| 332 | + <col id="scoreteamname"/> |
| 333 | + </colgroup> |
| 334 | + <colgroup> |
| 335 | + <col id="scoresolv"/> |
| 336 | + </colgroup> |
| 337 | +
|
| 338 | + {% set teamColspan = 2 %} |
| 339 | + {% if showAffiliationLogos %} |
| 340 | + {% set teamColspan = teamColspan + 1 %} |
| 341 | + {% endif %} |
| 342 | +
|
| 343 | + <tr class="scoreheader" data-static="{{ static }}" style="font-size: 75%;"> |
| 344 | + <th title="rank" scope="col">rank</th> |
| 345 | + <th title="team name" scope="col" colspan="{{ teamColspan }}">team</th> |
| 346 | + <th title="# solved / penalty time" colspan="1" scope="col">score</th> |
| 347 | + </tr> |
| 348 | + </thead> |
| 349 | + <tbody> |
| 350 | + {% set previousSortOrder = -1 %} |
| 351 | + {% set previousTeam = null %} |
| 352 | + {% set backgroundColors = {"#FFFFFF": 1} %} |
| 353 | + {% set medalCount = 0 %} |
| 354 | + {% for score in scores %} |
| 355 | + {% set classes = [] %} |
| 356 | + {% if score.team.category.sortorder != previousSortOrder %} |
| 357 | + {% if previousSortOrder != -1 %} |
| 358 | + {# Output summary of previous sort order #} |
| 359 | + {% include 'partials/scoreboard_summary.html.twig' with {sortOrder: previousSortOrder} %} |
| 360 | + {% endif %} |
| 361 | + {% set classes = classes | merge(['sortorderswitch']) %} |
| 362 | + {% set previousSortOrder = score.team.category.sortorder %} |
| 363 | + {% set previousTeam = null %} |
| 364 | + {% endif %} |
| 365 | +
|
| 366 | + {# process medal color #} |
| 367 | + {% set medalColor = '' %} |
| 368 | + {% if showLegends %} |
| 369 | + {% set medalColor = score.team | medalType(contest, scoreboard) %} |
| 370 | + {% endif %} |
| 371 | +
|
| 372 | + {# check whether this is us, otherwise use category colour #} |
| 373 | + {% if myTeamId is defined and myTeamId == score.team.teamid %} |
| 374 | + {% set classes = classes | merge(['scorethisisme']) %} |
| 375 | + {% set color = '#FFFF99' %} |
| 376 | + {% else %} |
| 377 | + {% set color = score.team.category.color %} |
| 378 | + {% endif %} |
| 379 | + <tr class="{{ classes | join(' ') }}" id="team:{{ score.team.teamid }}" style="border-bottom-width: 0; height: 28px;"> |
| 380 | + <td class="scorepl {{medalColor}}" rowspan="2"> |
| 381 | + {# Only print rank when score is different from the previous team #} |
| 382 | + {% if not displayRank %} |
| 383 | + ? |
| 384 | + {% elseif previousTeam is null or scoreboard.scores[previousTeam.teamid].rank != score.rank %} |
| 385 | + {{ score.rank }} |
| 386 | + {% else %} |
| 387 | + {% endif %} |
| 388 | + {% set previousTeam = score.team %} |
| 389 | + </td> |
| 390 | + <td class="scoreaf"> |
| 391 | + {% if showFlags %} |
| 392 | + {% if score.team.affiliation %} |
| 393 | + {% set link = null %} |
| 394 | + {% if jury %} |
| 395 | + {% set link = path('jury_team_affiliation', {'affilId': score.team.affiliation.affilid}) %} |
| 396 | + {% endif %} |
| 397 | + <a {% if link %}href="{{ link }}"{% endif %}> |
| 398 | + {{ score.team.affiliation.country|countryFlag }} |
| 399 | + </a> |
| 400 | + {% endif %} |
| 401 | + {% endif %} |
| 402 | + </td> |
| 403 | + {% if showAffiliationLogos %} |
| 404 | + <td class="scoreaf"> |
| 405 | + {% if score.team.affiliation %} |
| 406 | + {% set link = null %} |
| 407 | + {% if jury %} |
| 408 | + {% set link = path('jury_team_affiliation', {'affilId': score.team.affiliation.affilid}) %} |
| 409 | + {% endif %} |
| 410 | + <a {% if link %}href="{{ link }}"{% endif %}> |
| 411 | + {% set affiliationId = score.team.affiliation.externalid %} |
| 412 | + {% set affiliationImage = affiliationId | assetPath('affiliation') %} |
| 413 | + {% if affiliationImage %} |
| 414 | + <img loading="lazy" width="16px" height="16px" |
| 415 | + src="{{ asset(affiliationImage) }}" alt="{{ score.team.affiliation.name }}" |
| 416 | + title="{{ score.team.affiliation.name }}"> |
| 417 | + {% else %} |
| 418 | + {{ affiliationId }} |
| 419 | + {% endif %} |
| 420 | + </a> |
| 421 | + {% endif %} |
| 422 | + </td> |
| 423 | + {% endif %} |
| 424 | + {% if color is null %} |
| 425 | + {% set color = "#FFFFFF" %} |
| 426 | + {% set colorClass = "_FFFFFF" %} |
| 427 | + {% else %} |
| 428 | + {% set colorClass = color | replace({"#": "_"}) %} |
| 429 | + {% set backgroundColors = backgroundColors | merge({(color): 1}) %} |
| 430 | + {% endif %} |
| 431 | + <td class="scoretn cl{{ colorClass }}" title="{{ score.team.effectiveName }}"> |
| 432 | + {% set link = null %} |
| 433 | + {% set extra = null %} |
| 434 | + {% if static %} |
| 435 | + {% set link = '#' %} |
| 436 | + {% set extra = 'data-bs-toggle="modal" data-bs-target="#team-modal-' ~ score.team.teamid ~ '"' %} |
| 437 | + {% else %} |
| 438 | + {% if jury %} |
| 439 | + {% set link = path('jury_team', {teamId: score.team.teamid}) %} |
| 440 | + {% elseif public %} |
| 441 | + {% set link = path('public_team', {teamId: score.team.teamid}) %} |
| 442 | + {% set extra = 'data-ajax-modal' %} |
| 443 | + {% else %} |
| 444 | + {% set link = path('team_team', {teamId: score.team.teamid}) %} |
| 445 | + {% set extra = 'data-ajax-modal' %} |
| 446 | + {% endif %} |
| 447 | + {% endif %} |
| 448 | + <a {% if extra is not null %}{{ extra | raw }}{% endif %} {% if link is not null %}href="{{ link }}"{% endif %}> |
| 449 | + <span class="forceWidth"> |
| 450 | + {% if false and usedCategories | length > 1 and scoreboard.bestInCategory(score.team, limitToTeamIds) %} |
| 451 | + <span class="badge text-bg-warning category-best"> |
| 452 | + {{ score.team.category.name }} |
| 453 | + </span> |
| 454 | + {% endif %} |
| 455 | + {{ score.team.effectiveName }} |
| 456 | + </span> |
| 457 | + {% if showAffiliations %} |
| 458 | + <span class="univ forceWidth"> |
| 459 | + {% if score.team.affiliation %} |
| 460 | + {{ score.team.affiliation.name }} |
| 461 | + {% endif %} |
| 462 | + </span> |
| 463 | + {% endif %} |
| 464 | + </a> |
| 465 | + </td> |
| 466 | + {% set totalTime = score.totalTime %} |
| 467 | + {% if scoreInSeconds %} |
| 468 | + {% set totalTime = totalTime | printTimeRelative %} |
| 469 | + {% endif %} |
| 470 | + {% set totalPoints = score.numPoints %} |
| 471 | + <td class="scorenc" rowspan="2">{{ totalPoints }}<br/><span class="scorett" style="font-weight: normal;">{{ totalTime }}</span></td> |
| 472 | + </tr> |
| 473 | + <tr style="height: 32px;"> |
| 474 | + <td/> |
| 475 | + <td colspan="2"> |
| 476 | + {% for problem in problems %} |
| 477 | + {% set matrixItem = scoreboard.matrix[score.team.teamid][problem.probid] %} |
| 478 | + {{ problem | problemBadgeMaybe(matrixItem) }} |
| 479 | + {% endfor %} |
| 480 | + </td> |
| 481 | + </tr> |
| 482 | + {% endfor %} |
| 483 | + </tbody> |
| 484 | +</table> |
| 485 | +
|
319 | 486 | {% if static %}
|
320 | 487 | {% for score in scores %}
|
321 | 488 | {% embed 'partials/modal.html.twig' with {'modalId': 'team-modal-' ~ score.team.teamid} %}
|
|
366 | 533 | {% else %}
|
367 | 534 | {% set cellColors = {first: 'Solved first', correct: 'Solved', incorrect: 'Tried, incorrect', pending: 'Tried, pending', neutral: 'Untried'} %}
|
368 | 535 | {% endif %}
|
369 |
| - <table id="cell_legend" class="scoreboard scorelegend {% if jury %}scoreboard_jury{% endif %}"> |
| 536 | + <table id="cell_legend" class="d-none d-md-block scoreboard scorelegend {% if jury %}scoreboard_jury{% endif %}"> |
370 | 537 | <thead>
|
371 | 538 | <tr>
|
372 | 539 | <th scope="col">Cell colours</th>
|
|
385 | 552 | {% endif %}
|
386 | 553 |
|
387 | 554 | {% if medalsEnabled %}
|
388 |
| - <table class="scoreboard scorelegend {% if jury %}scoreboard_jury{% endif %}"> |
| 555 | + <table class="d-none d-md-block scoreboard scorelegend {% if jury %}scoreboard_jury{% endif %}"> |
389 | 556 | <thead>
|
390 | 557 | <tr>
|
391 | 558 | <th scope="col">Medals {% if not scoreboard.freezeData.showFinal %}(tentative){% endif %}</th>
|
|
0 commit comments