feat: add smart "Workout Now" recommendation to workout picker
Auto-recommends the next workout in the 4-day cycle based on the user's last completed session (one with logged sets). Redesigns the /workouts page with highlighted recommendation card and renames the back button to "Change Workout". Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -27,5 +27,5 @@
|
||||
{% endfor %}
|
||||
</section>
|
||||
|
||||
<a href="/workouts" role="button" class="outline">Back to All Days</a>
|
||||
<a href="/workouts" role="button" class="outline">Change Workout</a>
|
||||
{% endblock %}
|
||||
|
||||
@@ -1,20 +1,36 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Workout Days — SneakySwole{% endblock %}
|
||||
{% block title %}Workout Now — SneakySwole{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Workout Days</h1>
|
||||
<h1>Workout Now</h1>
|
||||
|
||||
<p>
|
||||
{% if last_workout_name %}
|
||||
Last workout: <strong>{{ last_workout_name }}</strong> on {{ last_workout_date.strftime('%b %-d') }}
|
||||
{% else %}
|
||||
No workouts yet — start with Push!
|
||||
{% endif %}
|
||||
</p>
|
||||
|
||||
<div class="grid">
|
||||
{% for day in days %}
|
||||
<article>
|
||||
<header>
|
||||
<h3>Day {{ day.day_number }}: {{ day.name }}</h3>
|
||||
{% if day.id == recommended_day_id %}
|
||||
<mark>Recommended Next</mark>
|
||||
{% endif %}
|
||||
</header>
|
||||
<p>{{ day.description }}</p>
|
||||
<footer>
|
||||
{% if day.id == recommended_day_id %}
|
||||
<a href="/workouts/{{ day.name|lower|replace(' ', '-') }}"
|
||||
role="button">View Workout</a>
|
||||
role="button">Start Workout</a>
|
||||
{% else %}
|
||||
<a href="/workouts/{{ day.name|lower|replace(' ', '-') }}"
|
||||
role="button" class="outline">Start Workout</a>
|
||||
{% endif %}
|
||||
</footer>
|
||||
</article>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user