Build the core user-facing experience with admin login (bcrypt + signed session cookies), profile switcher, workout day viewer with warmups and exercise cards, and HTMX-powered exercise browser with search/filter. - AuthService with bcrypt password verification and itsdangerous session tokens - Auth dependency redirects to /login (303) for unauthenticated requests - NavContextMiddleware injects admin/profiles/active_profile into all templates - Profile management (list, switch, edit) with cookie-based active profile - Workout day viewer shows warmups + exercises + per-user programming targets - Exercise browser with HTMX filter dropdowns (no page reloads) - Flash message partial for success/error feedback - 12 new tests (66 total passing) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
32 lines
799 B
HTML
32 lines
799 B
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}{{ day_name }} Day — SneakySwole{% endblock %}
|
|
|
|
{% block content %}
|
|
<hgroup>
|
|
<h1>{{ day_name }} Day</h1>
|
|
{% if active_profile %}
|
|
<p>Training as: <strong>{{ active_profile.display_name }}</strong></p>
|
|
{% else %}
|
|
<p>No profile selected — <a href="/profiles">select one</a></p>
|
|
{% endif %}
|
|
</hgroup>
|
|
|
|
<!-- Warmup Section -->
|
|
<section>
|
|
<h2>Warmup</h2>
|
|
{% include "partials/warmup_list.html" %}
|
|
</section>
|
|
|
|
<!-- Exercises Section -->
|
|
<section>
|
|
<h2>Exercises</h2>
|
|
{% for exercise in exercises %}
|
|
{% set program = programs.get(exercise.id) %}
|
|
{% include "partials/exercise_card.html" %}
|
|
{% endfor %}
|
|
</section>
|
|
|
|
<a href="/workouts" role="button" class="outline">Back to All Days</a>
|
|
{% endblock %}
|