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

133 lines
5.6 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<section class="grid cols-2 dossier-grid">
<article class="card evidence-board">
<div class="case-legend">
<span class="section-label">Live workout logger</span>
<span class="pill">One-at-a-time entry</span>
</div>
<h2>{{ routine.name }}</h2>
<p class="muted">Log one exercise at a time while you work through the session. Save each movement as you finish it, then close out the workout when you're done.</p>
{% if routine.notes %}
<p class="muted">{{ routine.notes }}</p>
{% endif %}
</article>
<article class="card evidence-board">
<div class="case-legend">
<span class="section-label">Routine field sheet</span>
<span class="pill">{{ routine_sheet|length }} exercises</span>
</div>
<h2>Loaded exercises</h2>
<ul class="list case-list">
{% for exercise in routine_sheet %}
<li>
<strong>{{ exercise.exercise_name }}</strong>
<p class="muted">{{ exercise.target_sets }} sets{% if exercise.target_reps %} · target reps {{ exercise.target_reps }}{% endif %}</p>
</li>
{% endfor %}
</ul>
</article>
</section>
{% if not active_session %}
<section class="grid dossier-grid">
<article class="card evidence-board">
<div class="case-legend">
<span class="section-label">Session control</span>
<span class="pill">Ready</span>
</div>
<h2>Start live session</h2>
<form class="stack-form intake-docket" method="post" action="/routines/{{ routine.id }}/live/start">
<input type="hidden" name="user_id" value="{{ routine.user_id }}">
<label>Performed at
<input type="datetime-local" name="performed_at" value="{{ default_performed_at }}" required>
</label>
<button type="submit">Start {{ routine.name }} session</button>
</form>
</article>
</section>
{% else %}
<section class="grid cols-2 dossier-grid">
<article class="card evidence-board">
<div class="case-legend">
<span class="section-label">Session control</span>
<span class="pill">In progress</span>
</div>
<h2>Session in progress</h2>
<p class="muted">Started at {{ active_session.performed_at }} · Logged exercises so far: {{ logged_exercises|length }}</p>
{% if logged_exercises %}
<ul class="list case-list">
{% for exercise in logged_exercises %}
<li>
<strong>{{ exercise.exercise_name }} · {{ exercise.set_count }} sets</strong>
{% if exercise.notes %}<p class="muted">{{ exercise.notes }}</p>{% endif %}
</li>
{% endfor %}
</ul>
{% else %}
<p class="muted">No exercises saved yet.</p>
{% endif %}
<form class="stack-form intake-docket" method="post" action="/routines/{{ routine.id }}/live/finish">
<input type="hidden" name="user_id" value="{{ routine.user_id }}">
<input type="hidden" name="performed_at" value="{{ active_session.performed_at }}">
<label>Session notes
<textarea name="notes" rows="2" placeholder="Energy, pain, machine swaps, or anything worth remembering."></textarea>
</label>
<button type="submit">Finish {{ routine_action_label }} workout</button>
</form>
</article>
<article class="card evidence-board">
<div class="case-legend">
<span class="section-label">Remaining queue</span>
<span class="pill">{{ remaining_exercises|length }} left</span>
</div>
<h2>Ready to log next</h2>
{% if remaining_exercises %}
<p class="muted">Each card saves one exercise at a time, so you can log mid-workout without rewriting the whole session.</p>
{% for exercise in remaining_exercises %}
<section class="evidence-slab">
<form class="stack-form intake-docket" method="post" action="/routines/{{ routine.id }}/live/add-exercise">
<input type="hidden" name="user_id" value="{{ routine.user_id }}">
<input type="hidden" name="performed_at" value="{{ active_session.performed_at }}">
<input type="hidden" name="exercise_name" value="{{ exercise.exercise_name }}">
<input type="hidden" name="set_count" value="{{ exercise.target_sets }}">
<div class="case-legend">
<span class="section-label">Exercise</span>
<span class="pill">{{ exercise.target_sets }} sets</span>
</div>
<h3>{{ exercise.exercise_name }}</h3>
<p class="muted">{% if exercise.target_reps %}Target reps {{ exercise.target_reps }}{% else %}Enter reps manually{% endif %}</p>
{% if exercise.is_band %}
<p class="muted">Resistance-band exercise: leave weight blank to log sets and default reps only.</p>
{% endif %}
<div class="grid cols-2 compact-grid">
{% for set in exercise.sets %}
<div class="evidence-slab compact-slab">
<strong>Set {{ set.index + 1 }}</strong>
<label>Reps
<input type="number" name="set_{{ set.index }}_reps" min="1" step="1" placeholder="{{ set.default_reps }}">
</label>
<label>Weight (lb)
<input type="number" name="set_{{ set.index }}_weight_lbs" min="0" step="0.1">
</label>
</div>
{% endfor %}
</div>
<label>Exercise notes
<textarea name="exercise_notes" rows="2" placeholder="Technique note, pain flag, or machine change."></textarea>
</label>
<button type="submit">Save {{ exercise.exercise_name }}</button>
</form>
</section>
{% endfor %}
{% else %}
<p class="muted">Everything in this routine is logged. Finish the workout to move it into history.</p>
{% endif %}
</article>
</section>
{% endif %}
{% endblock %}