Files
gym-bro/frontend/chart-preview.html
T

55 lines
3.8 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>График прогрессии (просмотр)</title>
<link rel="stylesheet" href="styles/main.css">
<link rel="stylesheet" href="styles/components.css">
<link rel="stylesheet" href="styles/workout.css">
<link rel="stylesheet" href="styles/modal.css">
<style>
.chart-page { max-width: 760px; margin: 0 auto; padding: 16px; }
.chart-page h2 { margin: 14px 0 2px; }
.chart-page .hint { font-size: 0.75rem; color: var(--text-secondary, #888); margin: 4px 0 8px; }
.chart-page canvas { width: 100%; background: #1e1e1e; border-radius: 10px; }
.chart-open { margin: 8px 0 4px; }
</style>
</head>
<body>
<div class="chart-page">
<h2>📈 Жим штанги лёжа — рабочий максимум важнее числа подходов</h2>
<p class="hint">Вершина линии — главный вес дня «вес × повторы». 12.11: <b>100×1</b> (шесть подходов), 19.11: <b>100×2</b> (пять подходов, разминочных меньше) — вершина зелёная: вес тот же, повторов больше, это прогресс, хотя подходов меньше. Тусклые точки — разминочные и остальные подходы.</p>
<canvas id="chart-barbell" width="680" height="320"></canvas>
<button class="btn btn-small btn-secondary chart-open" onclick="window.CM.showChartDialog('Жим штанги лёжа')">Открыть карточку графика (как в приложении) 📈</button>
<button class="btn btn-small btn-secondary chart-open" onclick="window.EM.showSummaryDialog('Жим штанги лёжа')">Сводка по упражнению 📋</button>
<h2>📈 Жим гантелей на лавке (30/45 — одна группа вариантов)</h2>
<p class="hint">Прогрессия 20→28 кг; 17.11 после паузы — красный откат, это тоже видно.</p>
<canvas id="chart-dumbbell" width="680" height="320"></canvas>
<button class="btn btn-small btn-secondary chart-open" onclick="window.CM.showChartDialog('Жим гантелей на лавке 30')">Карточка графика 📈</button>
<button class="btn btn-small btn-secondary chart-open" onclick="window.EM.showSummaryDialog('Жим гантелей на лавке 30')">Сводка по упражнению 📋</button>
</div>
<div id="modal-container"></div>
<script src="demo-seed.js"></script>
<script>
// Превью всегда работает в гостевом режиме на свежем датасете:
// если в этом браузере есть сохранённый вход, данные читались бы из пустого
// пользовательского ключа и график показал бы «нет завершённых тренировок».
localStorage.removeItem('gym_auth_token');
localStorage.removeItem('gym_auth_user');
localStorage.setItem('gym_tracker_v7_guest', JSON.stringify(window.GYM_DEMO_SEED));
</script>
<script type="module">
import { loadState } from './js/state.js';
import { drawExerciseProgress } from './js/render/dashboard.js';
import './js/modals/chart-modal.js';
import './js/modals/exercise-summary.js';
loadState(); // state наполняется из localStorage только этим вызовом (как в app.js)
drawExerciseProgress(document.getElementById('chart-barbell'), 'Жим штанги лёжа');
drawExerciseProgress(document.getElementById('chart-dumbbell'), 'Жим гантелей на лавке 30');
</script>
</body>
</html>