fitness-web/app/templates/dashboard.html

61 lines
1.8 KiB
HTML

{% extends "base.html" %}
{% block title %}Dashboard{% endblock %}
{% block content %}
<h1>Welcome, {{ user.display_name or user.username }}</h1>
<div class="grid">
<article>
<h3>Weight</h3>
<p style="font-size: 2rem;">{{ user.weight_lb or '—' }} lb</p>
</article>
<article>
<h3>Calorie Goal</h3>
<p style="font-size: 2rem;">{{ user.calorie_goal or '—' }}</p>
</article>
<article>
<h3>Step Goal</h3>
<p style="font-size: 2rem;">{{ user.step_goal or '—' }}</p>
</article>
</div>
{% if latest_checkin %}
<article>
<h3>Latest Check-in</h3>
<p>{{ latest_checkin.date }} — {{ latest_checkin.feeling or 'No feeling recorded' }}</p>
<p>Weight: {{ latest_checkin.weight_lb or '—' }} lb | Calories: {{ latest_checkin.calories or '—' }} | Steps: {{ latest_checkin.steps or '—' }} | Sleep: {{ latest_checkin.sleep_hours or '—' }}h</p>
</article>
{% endif %}
<h2>Recent Workouts</h2>
{% if recent_workouts %}
<table>
<thead>
<tr>
<th>Date</th>
<th>Name</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody>
{% for w in recent_workouts %}
<tr>
<td>{{ w.date }}</td>
<td>{{ w.name }}</td>
<td>{{ w.status }}</td>
<td><a href="/workouts/{{ w.id }}">View</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<p>No workouts yet. <a href="/workouts/new">Plan one now</a>.</p>
{% endif %}
<div class="grid">
<a href="/workouts/new" role="button" class="secondary">New Workout</a>
<a href="/checkins/new" role="button" class="secondary">New Check-in</a>
<a href="/chat" role="button" class="secondary">AI Coach</a>
</div>
{% endblock %}