Files
dice-counter/templates/_sheet.html
T
gitea-actionsandClaude Opus 5 cd10db1a72 tabule: nejnovější kolo nahoře a součty nad historií
Po sto kolech byla tabule k ničemu: na obrazovku se vešla kola 1–14
a řádek se součty skončil asi 4 500 pixelů pod okrajem. Tabule tedy
ukazovala nejstarší historii a nic z toho, co se právě děje.

- kola se řadí od nejnovějšího, poslední zápis je vždy nahoře
- součty se přesunuly z patičky nad historii, hned pod jména hráčů
- tabule ukazuje posledních 15 kol, zbytek shrne řádka "... a dalších
  85 kol"; má ukazovat stav, ne archiv, a nepřekresluje se pak zbytečně
  každé dvě vteřiny přes tři sta buněk
- skloňování kol podle češtiny (1 kolo / 2 kola / 5 kol)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-20 19:37:44 +02:00

67 lines
1.9 KiB
HTML

{% if winner %}
<div class="win">
<p class="eyebrow">Konec hry</p>
<h2>{{ winner }}</h2>
<p>Vyhrává s {{ totals[winner]|cislo }} body z cílových {{ game.final_score|cislo }}.</p>
</div>
{% endif %}
<div class="sheet-wrap">
<table class="sheet">
<thead>
<tr>
<th class="label">Kolo</th>
{% for name in game.names %}
<th class="{{ 'marked' if name == current }}">{{ name }}</th>
{% endfor %}
</tr>
</thead>
{# Součty patří nahoru: po padesáti kolech by je jinak nikdo neviděl. #}
<tbody class="totals">
<tr>
<td class="label">Celkem</td>
{% for name in game.names %}
<td class="{{ 'marked' if name == current }}">
{{ totals[name]|cislo }}
{%- if streaks[name] %} <span class="ticks">{{ '✕' * streaks[name] }}</span>{% endif %}
</td>
{% endfor %}
</tr>
</tbody>
<tbody>
{% for row in rows %}
<tr>
<td class="label">{{ row.round }}</td>
{% for cell in row.cells %}
<td class="{{ 'marked' if game.names[loop.index0] == current }}
{{ 'struck' if cell.struck }} {{ 'wiped' if cell.reset }}">
{%- if cell.value is none -%}
<span class="empty">·</span>
{%- elif cell.reset -%}
0<small>vynulováno</small>
{%- else -%}
{{ cell.value|cislo }}
{%- endif -%}
</td>
{% endfor %}
</tr>
{% else %}
<tr>
<td class="label">1</td>
{% for name in game.names %}
<td class="{{ 'marked' if name == current }}"><span class="empty">·</span></td>
{% endfor %}
</tr>
{% endfor %}
{% if hidden %}
<tr class="more">
<td class="label" colspan="{{ game.names|length + 1 }}">… a dalších {{ hidden|kola }}</td>
</tr>
{% endif %}
</tbody>
</table>
</div>