Files
Fizzlepoof 1227814277
Some checks failed
secret-guardrails / artifact-secret-scan (push) Has been cancelled
secret-guardrails / gitleaks (push) Has been cancelled
Add Doris Barbell live workout logger
2026-05-28 21:32:09 +00:00

268 lines
11 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<section id="body-metrics" class="grid cols-2 dossier-grid">
<article class="card evidence-card compact-panel">
<div class="case-legend">
<span class="section-label">Training floor board</span>
<span class="pill">John</span>
</div>
<h2>Current body metrics</h2>
{% for user in summary.users if user.id == 'john' %}
<div class="compact-stat-grid">
<section class="evidence-slab stat-slab">
<span class="stat-label">Weight</span>
<p class="metric-value">{{ user.current_weight_lbs if user.current_weight_lbs is not none else '—' }}{% if user.current_weight_lbs is not none %} lb{% endif %}</p>
</section>
<section class="evidence-slab stat-slab">
<span class="stat-label">BMI</span>
<p class="metric-value metric-value-sm">{{ '%.1f'|format(user.current_bmi) if user.current_bmi is not none else '—' }}</p>
</section>
</div>
{% if user.latest_measurements %}
<ul class="list compact-summary-list">
<li>Waist {{ user.latest_measurements.waist_inches or '—' }} in</li>
<li>Chest {{ user.latest_measurements.chest_inches or '—' }} in</li>
<li>Hips {{ user.latest_measurements.hip_inches or '—' }} in</li>
<li>Neck {{ user.latest_measurements.neck_inches or '—' }} in</li>
</ul>
{% else %}
<p class="muted">No body measurements logged yet.</p>
{% endif %}
{% endfor %}
</article>
<article id="routine-board" class="card evidence-board compact-panel">
<div class="case-legend">
<span class="section-label">Current split</span>
<span class="pill">Routine board</span>
</div>
<h2>Current routine board</h2>
<ul class="list compact-summary-list">
<li>Routines: {{ summary.counts.routines }}</li>
<li>Exercise templates: {{ summary.counts.exercise_templates }}</li>
<li>Workout sessions: {{ summary.counts.workout_sessions }}</li>
</ul>
{% if summary.routines %}
<div class="history-block compact-history-block">
<ul class="list">
{% for routine in summary.routines %}
<li>
<strong>{{ routine.name }}</strong>
<p class="muted">{{ routine.exercises|length }} exercises</p>
<p>
<a class="nav-link" href="/routines/{{ routine.id }}/log">Open log sheet</a>
·
<a class="nav-link" href="/routines/{{ routine.id }}/live">{% if routine.live_session %}Resume {{ routine.name }} live log{% else %}Resume live log{% endif %}</a>
</p>
</li>
{% endfor %}
</ul>
</div>
{% endif %}
</article>
</section>
<section id="weight-log" class="grid cols-2 dossier-grid">
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Intake docket</span><span class="pill">Weight log</span></div>
<h2>Log weight</h2>
<form class="stack-form intake-docket" method="post" action="/log/weight">
<label>User
<select name="user_id">
{% for user in summary.users %}
<option value="{{ user.id }}" {% if user.id == 'john' %}selected{% endif %}>{{ user.display_name }}</option>
{% endfor %}
</select>
</label>
<label>Recorded at
<input type="datetime-local" name="recorded_at" required>
</label>
<div class="grid cols-2 compact-grid">
<label>Weight (lb)
<input type="number" name="weight_lbs" min="0" step="0.1" required>
</label>
<label>Body fat %
<input type="number" name="body_fat_percent" min="0" max="100" step="0.1">
</label>
</div>
<label>Notes
<textarea name="notes" rows="2" placeholder="Morning weigh-in, post-workout, etc."></textarea>
</label>
<button type="submit">Save weight entry</button>
</form>
</article>
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Intake docket</span><span class="pill">Measurements</span></div>
<h2>Log body measurements</h2>
<form class="stack-form intake-docket" method="post" action="/log/measurements">
<input type="hidden" name="user_id" value="john">
<label>Recorded at
<input type="datetime-local" name="recorded_at" required>
</label>
<div class="grid cols-2 compact-grid">
<label>Waist (in)
<input type="number" name="waist_inches" min="0" step="0.1">
</label>
<label>Hips (in)
<input type="number" name="hip_inches" min="0" step="0.1">
</label>
<label>Chest (in)
<input type="number" name="chest_inches" min="0" step="0.1">
</label>
<label>Neck (in)
<input type="number" name="neck_inches" min="0" step="0.1">
</label>
</div>
<label>Notes
<textarea name="notes" rows="2" placeholder="Flexed, relaxed, baseline, etc."></textarea>
</label>
<button type="submit">Save measurement entry</button>
</form>
</article>
</section>
<section id="recent-workouts" class="grid cols-2 dossier-grid">
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Recent logs</span><span class="pill">Session reports</span></div>
<h2>Recent workouts</h2>
{% if john_workout_history %}
<ul class="list">
{% for workout in john_workout_history %}
<li>
<strong>{{ workout.routine_name }}</strong>
<p class="muted">{{ workout.performed_at }} · {{ workout.set_count }} sets · {{ workout.total_volume_lbs }} lb volume</p>
</li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No workouts logged yet.</p>
{% endif %}
</article>
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Exercise bests</span><span class="pill">PR board</span></div>
<h2>Exercise bests</h2>
{% if john_progression %}
<ul class="list">
{% for entry in john_progression %}
<li>
<strong>{{ entry.exercise_name }}</strong>
<p class="muted">{{ entry.sessions }} sessions · max {{ entry.max_weight_lbs }} lb · est 1RM {{ entry.best_set_estimated_1rm }} lb</p>
</li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No exercise progression data yet.</p>
{% endif %}
</article>
</section>
<section class="grid cols-2 dossier-grid">
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Library tools</span><span class="pill">Templates</span></div>
<h2>Add exercise template</h2>
<form class="stack-form intake-docket" method="post" action="/templates">
<label>Name
<input type="text" name="name" placeholder="Bench Press" required>
</label>
<div class="grid cols-2 compact-grid">
<label>Primary muscle
<input type="text" name="primary_muscle" placeholder="Chest">
</label>
<label>Equipment
<input type="text" name="equipment" placeholder="Barbell">
</label>
</div>
<label>Notes
<textarea name="notes" rows="2" placeholder="Technique cue or setup reminder."></textarea>
</label>
<button type="submit">Add template</button>
</form>
{% if summary.exercise_templates %}
<div class="history-block compact-history-block">
<h3>Template snapshot</h3>
<ul class="list">
{% for template in summary.exercise_templates %}
<li>{{ template.name }}{% if template.equipment %} · {{ template.equipment }}{% endif %}</li>
{% endfor %}
</ul>
</div>
{% endif %}
</article>
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Workout report</span><span class="pill">Quick log</span></div>
<h2>Quick log workout</h2>
<form class="stack-form intake-docket" method="post" action="/workouts/quick-log">
<input type="hidden" name="user_id" value="john">
<label>Workout name
<input type="text" name="routine_name" placeholder="Push Day" required>
</label>
<label>Performed at
<input type="datetime-local" name="performed_at" required>
</label>
<label>Exercise lines
<textarea name="exercise_lines" rows="5" placeholder="Bench Press|8@135, 8@145&#10;Incline Dumbbell Press|10@50, 8@55|Last set close to failure" required></textarea>
</label>
<p class="hint">Format: exercise | reps@weight, reps@weight | optional notes</p>
<label>Notes
<textarea name="notes" rows="2" placeholder="Energy, pain, wins, misses."></textarea>
</label>
<button type="submit">Save workout</button>
</form>
</article>
</section>
<section class="grid cols-2 dossier-grid">
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">Routine tools</span><span class="pill">Draft split</span></div>
<h2>Build routine draft</h2>
<form class="stack-form intake-docket" method="post" action="/routines">
<input type="hidden" name="user_id" value="john">
<label>Routine name
<input type="text" name="name" placeholder="Push Day Draft" required>
</label>
<label>Exercise lines
<textarea name="exercise_lines" rows="5" placeholder="Bench Press|4|6-8&#10;Incline Dumbbell Press|3|8-10&#10;Triceps Pushdown|3|12-15" required></textarea>
</label>
<p class="hint">Format: exercise | target sets | target reps | optional notes</p>
<label>Notes
<textarea name="notes" rows="2" placeholder="Optional notes."></textarea>
</label>
<button type="submit">Save routine draft</button>
</form>
</article>
<article class="card evidence-board compact-panel">
<div class="case-legend"><span class="section-label">History snapshot</span><span class="pill">John file</span></div>
<h2>Recent body history</h2>
<div class="history-block compact-history-block">
<h3>Recent weights</h3>
{% if john_weight_history %}
<ul class="list">
{% for entry in john_weight_history %}
<li>{{ entry.recorded_at }} · {{ entry.weight_lbs }} lb{% if entry.bmi is not none %} · BMI {{ '%.1f'|format(entry.bmi) }}{% endif %}</li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No weight entries yet.</p>
{% endif %}
</div>
<div class="history-block compact-history-block">
<h3>Recent measurements</h3>
{% if john_measurement_history %}
<ul class="list">
{% for entry in john_measurement_history %}
<li>{{ entry.recorded_at }} · Waist {{ entry.waist_inches or '—' }} · Chest {{ entry.chest_inches or '—' }} · Hips {{ entry.hip_inches or '—' }} · Neck {{ entry.neck_inches or '—' }}</li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No measurement entries yet.</p>
{% endif %}
</div>
</article>
</section>
{% endblock %}