{% extends "base.html" %} {% from "_trainings_table.html" import approach_chips %} {% block content %} {% macro num(value) %}{{ '%g'|format(value|round(1)) }}{% endmacro %} {# "+12 кг (+6.5%)" colored by direction; unit is "кг" or "повт." #} {% macro change(value, percent, unit) %} {{ '%+g'|format(value|round(1)) }} {{ unit }}{% if percent is not none %} ({{ '%+.1f'|format(percent) }}%){% endif %} к первой тренировке {% endmacro %} {# Text with a dotted underline and a tooltip explaining it #} {% macro tip(text, hint) %}{{ text }}{% endmacro %} {% macro stat_card(title, value, note, hint) %}
Тренировок: {{ rows|length }}, первая: {{ rows[-1].session.date.strftime('%d.%m.%Y') }}, последняя: {{ rows[0].session.date.strftime('%d.%m.%Y') }}
{% if progress.weighted %} e1RM — расчётный максимум на один повтор по формуле Эпли: вес × (1 + повторы / 30), берётся лучший подход тренировки; подходы без веса не учитываются. Тоннаж — сумма вес × повторы по подходам с весом. {% else %} Упражнение выполняется без дополнительного веса, поэтому прогресс считается по повторам. {% endif %}
| Дата | Тренер | Подходы (вес × повторения) | {% if progress.weighted %}Макс. вес | {{ tip('e1RM', hints.e1rm) }} | {{ tip('Тоннаж', hints.volume) }} | {% else %}Лучший подход | Всего повторов | {% endif %}
|---|---|---|---|---|---|---|---|
| {{ item.date.strftime('%d.%m.%Y') }} | {{ item.trainer or '' }} | {{ approach_chips(item.approaches) }} {% if item.splitted_weight %} на руку {% endif %} | {% if progress.weighted %}{% if m.max_weight %}{{ num(m.max_weight) }} кг{% else %}—{% endif %} | {% if m.e1rm %}{{ num(m.e1rm) }} кг{% else %}—{% endif %} | {% if m.volume %}{{ num(m.volume) }} кг{% else %}—{% endif %} | {% else %}{{ m.best_reps }} | {{ m.total_reps }} | {% endif %}
docker compose exec fastapi-app python -m app.cli import