Add structured routine logging sheets to Doris Barbell
Some checks failed
secret-guardrails / gitleaks (push) Has been cancelled
secret-guardrails / artifact-secret-scan (push) Has been cancelled

This commit is contained in:
Fizzlepoof
2026-05-28 17:51:14 +00:00
parent 24c6a29273
commit 8a61169ab9
6 changed files with 296 additions and 2 deletions

View File

@@ -17,7 +17,7 @@
<strong>Doris Constabulary</strong>
</div>
<nav class="nav-links doris-family-nav" aria-label="Doris family navigation">
<a class="nav-link {{ 'active' if request.url.path == '/' else '' }}" href="http://10.5.30.6:8093/">Barbell</a>
<a class="nav-link {{ 'active' if request.url.path == '/' else '' }}" href="https://gym.paccoco.com/">Barbell</a>
<a class="nav-link" href="http://10.5.30.7:8787/">Dashboard</a>
<a class="nav-link" href="http://10.5.30.7:8787/services.html">Services</a>
<a class="nav-link" href="http://10.5.30.7:8092/">Kitchen</a>
@@ -118,7 +118,7 @@
</div>
<p class="muted case-legend">One shell, separate runtimes. Training reports live here, but the rest of the Doris family is one jump away.</p>
<div class="family-directory-grid">
<a class="family-app-card current-desk" href="http://10.5.30.6:8093/">
<a class="family-app-card current-desk" href="https://gym.paccoco.com/">
<span class="family-app-kicker">Current desk</span>
<strong>Doris Barbell</strong>
<small>Body metrics, routines, workouts, and progression dossiers.</small>

View File

@@ -186,6 +186,7 @@
<li>
<strong>{{ routine.name }}</strong>
<p class="muted">{{ routine.exercises|length }} exercises{% if routine.notes %} · {{ routine.notes }}{% endif %}</p>
<p><a class="nav-link" href="/routines/{{ routine.id }}/log">Open log sheet</a></p>
</li>
{% endfor %}
</ul>

View File

@@ -0,0 +1,86 @@
{% 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">Routine field sheet</span>
<span class="pill">Live training log</span>
</div>
<h2>{{ routine.name }}</h2>
<p class="muted">Fill in today's completed reps and weight for each set. Leave any unfinished exercise blank and it will be skipped.</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">Current prescription</span>
<span class="pill">Shoulder day</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 %}{% if exercise.notes %} · {{ exercise.notes }}{% endif %}</p>
</li>
{% endfor %}
</ul>
</article>
</section>
<section class="grid dossier-grid">
<article class="card evidence-board">
<div class="case-legend">
<span class="section-label">Workout report</span>
<span class="pill">Structured entry</span>
</div>
<h2>Log this session</h2>
<form class="stack-form intake-docket" method="post" action="/workouts/routine-log">
<input type="hidden" name="user_id" value="{{ routine.user_id }}">
<input type="hidden" name="routine_id" value="{{ routine.id }}">
<input type="hidden" name="routine_name" value="{{ routine.name }}">
<input type="hidden" name="exercise_count" value="{{ routine_sheet|length }}">
<label>Performed at
<input type="datetime-local" name="performed_at" value="{{ default_performed_at }}" required>
</label>
<label>Session notes
<textarea name="notes" rows="2" placeholder="Pain, wins, machine availability, energy, anything worth remembering."></textarea>
</label>
{% for exercise in routine_sheet %}
<section class="evidence-slab">
<input type="hidden" name="exercise_{{ exercise.exercise_index }}_name" value="{{ exercise.exercise_name }}">
<input type="hidden" name="exercise_{{ exercise.exercise_index }}_set_count" value="{{ exercise.target_sets }}">
<div class="case-legend">
<span class="section-label">Exercise {{ loop.index }}</span>
<span class="pill">{{ exercise.target_sets }} sets</span>
</div>
<h3>{{ exercise.exercise_name }}</h3>
<p class="muted">Target reps: {{ exercise.target_reps or 'enter manually' }}</p>
<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="exercise_{{ set.exercise_index }}_set_{{ set.index }}_reps" min="1" step="1" value="{{ set.default_reps }}">
</label>
<label>Weight (lb)
<input type="number" name="exercise_{{ set.exercise_index }}_set_{{ set.index }}_weight_lbs" min="0" step="0.1">
</label>
</div>
{% endfor %}
</div>
<label>Exercise notes
<textarea name="exercise_{{ exercise.exercise_index }}_notes" rows="2" placeholder="Technique note, pain flag, or machine change."></textarea>
</label>
</section>
{% endfor %}
<button type="submit">Save {{ routine_action_label }} workout</button>
</form>
</article>
</section>
{% endblock %}