From a1dbdc5b43a4f3cac110b1fdfb7c3bef21e47e95 Mon Sep 17 00:00:00 2001 From: Ebo Date: Sun, 24 Mar 2024 16:42:31 -0700 Subject: [PATCH] On mobile, show all columns but make the table scrollable. This is still a bit ugly, but it works. --- assets/html/game/laserball.html | 228 +++++++++++++++++--------------- 1 file changed, 125 insertions(+), 103 deletions(-) diff --git a/assets/html/game/laserball.html b/assets/html/game/laserball.html index e785adc..d305554 100644 --- a/assets/html/game/laserball.html +++ b/assets/html/game/laserball.html @@ -54,6 +54,18 @@ background-color: #252525; } + tr:nth-child(even) > td:nth-child(1) { + background-color: #252525; + } + + tr:nth-child(odd) > td:nth-child(1) { + background-color: #000000; + } + + tr > th:nth-child(1) { + background-color: #000000; + } + body { height: 130vh; } @@ -102,22 +114,24 @@ table { table-layout: auto; + width: 100%; } - table tr td:nth-child(n+9) { - display: none; - } - - table tr th:nth-child(n+9) { - display: none; + .fixed-column { + position: sticky; + z-index: 1; + left: 0px; } - table tr td:nth-child(2) { - display: none; + .outer-scrolling-table { + width: 100%; } - - table tr th:nth-child(2) { - display: none; + + .inner-scrolling-table { + position: relative; + overflow: auto; + border: 1px solid black; + white-space: nowrap; } .team { @@ -258,104 +272,112 @@

Fire Team: {{ fire_score }}

- - - - {% if game.ranked %} - - {% endif %} - - - - - - - - - - - - {% for entity in game.entity_starts %} - {% if entity.type == "player" and entity.team.index == 0 %} - {% set entity_end = get_entity_end(entity) %} - {% set laserball_stats = get_laserballstats(entity) %} - - {% if entity.entity_id.startswith("@") %} - - - {% else %} - - +
+
+

Codename

Score

Current Rating

Goals

Assists

Steals

Clears

Passes

Blocks

Stolen

Blocked

MVP Points

Accuracy

K/D

{{ entity.name }}

{{ laserball_stats.score }}

{{ entity.name }}

{{ laserball_stats.score }}
+ + + {% if game.ranked %} + + {% endif %} + + + + + + + + + + + + {% for entity in game.entity_starts %} + {% if entity.type == "player" and entity.team.index == 0 %} + {% set entity_end = get_entity_end(entity) %} + {% set laserball_stats = get_laserballstats(entity) %} + + {% if entity.entity_id.startswith("@") %} + + + {% else %} + + + {% endif %} + {% if entity_end.current_rating_mu and game.ranked %} + + {% endif %} + + + + + + + + + + + + {% endif %} - {% if entity_end.current_rating_mu and game.ranked %} - - {% endif %} - - - - - - - - - - - - - {% endif %} - {% endfor %} -

Codename

Score

Current Rating

Goals

Assists

Steals

Clears

Passes

Blocks

Stolen

Blocked

MVP Points

Accuracy

K/D

{{ entity.name }}

{{ laserball_stats.score }}

{{ entity.name }}

{{ laserball_stats.score }}{{ (entity_end.current_rating_mu - 3 * entity_end.current_rating_sigma)|round(2) }}

{{ laserball_stats.goals }}

{{ laserball_stats.assists }}

{{ laserball_stats.steals }}

{{ laserball_stats.clears }}

{{ laserball_stats.passes }}

{{ laserball_stats.blocks }}

{{ laserball_stats.times_stolen }}

{{ laserball_stats.times_blocked }}

{{ "%.2f" % (laserball_stats.mvp_points|round(2)) }}

{{ laserball_stats.shots_fired and "%.2f" % (((laserball_stats.shots_hit/laserball_stats.shots_fired)*100)|round(2)) }}%

{{ laserball_stats.times_blocked and "%.2f" % ((laserball_stats.blocks/laserball_stats.times_blocked) | round(2)) }}

{{ (entity_end.current_rating_mu - 3 * entity_end.current_rating_sigma)|round(2) }}

{{ laserball_stats.goals }}

{{ laserball_stats.assists }}

{{ laserball_stats.steals }}

{{ laserball_stats.clears }}

{{ laserball_stats.passes }}

{{ laserball_stats.blocks }}

{{ laserball_stats.times_stolen }}

{{ laserball_stats.times_blocked }}

{{ "%.2f" % (laserball_stats.mvp_points|round(2)) }}

{{ laserball_stats.shots_fired and "%.2f" % (((laserball_stats.shots_hit/laserball_stats.shots_fired)*100)|round(2)) }}%

{{ laserball_stats.times_blocked and "%.2f" % ((laserball_stats.blocks/laserball_stats.times_blocked) | round(2)) }}

+ {% endfor %} + +
+

Ice Team: {{ ice_score }}

- - - - {% if game.ranked %} - - {% endif %} - - - - - - - - - - - - {% for entity in game.entity_starts %} - {% if entity.type == "player" and entity.team.index == 1 %} - {% set entity_end = get_entity_end(entity) %} - {% set laserball_stats = get_laserballstats(entity) %} - - {% if entity.entity_id.startswith("@") %} - - - {% else %} - - - {% endif %} - {% if entity_end.current_rating_mu and game.ranked %} - +
+
+

Codename

Score

Current Rating

Goals

Assists

Steals

Clears

Passes

Blocks

Stolen

Blocked

MVP Points

Accuracy

K/D

{{ entity.name }}

{{ laserball_stats.score }}

{{ entity.name }}

{{ laserball_stats.score }}{{ (entity_end.current_rating_mu - 3 * entity_end.current_rating_sigma)|round(2) }}
+ + + {% if game.ranked %} + + {% endif %} + + + + + + + + + + + + {% for entity in game.entity_starts %} + {% if entity.type == "player" and entity.team.index == 1 %} + {% set entity_end = get_entity_end(entity) %} + {% set laserball_stats = get_laserballstats(entity) %} + + {% if entity.entity_id.startswith("@") %} + + + {% else %} + + + {% endif %} + {% if entity_end.current_rating_mu and game.ranked %} + + {% endif %} + + + + + + + + + + + + {% endif %} - - - - - - - - - - - - - {% endif %} - {% endfor %} -

Codename

Score

Current Rating

Goals

Assists

Steals

Clears

Passes

Blocks

Stolen

Blocked

MVP Points

Accuracy

K/D

{{ entity.name }}

{{ laserball_stats.score }}

{{ entity.name }}

{{ laserball_stats.score }}{{ (entity_end.current_rating_mu - 3 * entity_end.current_rating_sigma)|round(2) }}

{{ laserball_stats.goals }}

{{ laserball_stats.assists }}

{{ laserball_stats.steals }}

{{ laserball_stats.clears }}

{{ laserball_stats.passes }}

{{ laserball_stats.blocks }}

{{ laserball_stats.times_stolen }}

{{ laserball_stats.times_blocked }}

{{ "%.2f" % (laserball_stats.mvp_points|round(2)) }}

{{ laserball_stats.shots_fired and "%.2f" % (((laserball_stats.shots_hit/laserball_stats.shots_fired)*100)|round(2)) }}%

{{ laserball_stats.times_blocked and (laserball_stats.blocks/laserball_stats.times_blocked) | round(2) }}

{{ laserball_stats.goals }}

{{ laserball_stats.assists }}

{{ laserball_stats.steals }}

{{ laserball_stats.clears }}

{{ laserball_stats.passes }}

{{ laserball_stats.blocks }}

{{ laserball_stats.times_stolen }}

{{ laserball_stats.times_blocked }}

{{ "%.2f" % (laserball_stats.mvp_points|round(2)) }}

{{ laserball_stats.shots_fired and "%.2f" % (((laserball_stats.shots_hit/laserball_stats.shots_fired)*100)|round(2)) }}%

{{ laserball_stats.times_blocked and (laserball_stats.blocks/laserball_stats.times_blocked) | round(2) }}

+ {% endfor %} + +
+