88 lines
2.5 KiB
HTML
88 lines
2.5 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;">{{ latest_weight or '—' }} lb</p>
|
|
</article>
|
|
</div>
|
|
|
|
{% if current_phase %}
|
|
<article>
|
|
<h3>Current Phase: {{ current_phase.name }}</h3>
|
|
<p>{{ current_phase.description }}</p>
|
|
{% if current_phase.notes %}<p><em>{{ current_phase.notes }}</em></p>{% endif %}
|
|
{% if current_phase.start_date %}<small>Started {{ current_phase.start_date }}</small>{% endif %}
|
|
</article>
|
|
{% endif %}
|
|
|
|
<h2>This Week ({{ week_start }} — {{ week_end }})</h2>
|
|
{% if this_week %}
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Day</th>
|
|
<th>Name</th>
|
|
<th>Status</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for w in this_week %}
|
|
<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 planned this week. Ask the <a href="/chat">AI Coach</a> to plan your week.</p>
|
|
{% endif %}
|
|
|
|
{% if latest_checkin %}
|
|
<article>
|
|
<h3>Latest Morning Check-in</h3>
|
|
<p>{{ latest_checkin.date }} — {{ latest_checkin.feeling or 'No feeling recorded' }}</p>
|
|
<p>Weight: {{ latest_checkin.weight_lb or '—' }} lb | Calories <small>(yesterday)</small>: {{ latest_checkin.calories or '—' }} | Steps <small>(yesterday)</small>: {{ latest_checkin.steps or '—' }} | Sleep: {{ latest_checkin.sleep_hours or '—' }}h</p>
|
|
</article>
|
|
{% endif %}
|
|
|
|
<h2>Past 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. Ask the <a href="/chat">AI Coach</a> to plan one.</p>
|
|
{% endif %}
|
|
|
|
<div class="grid">
|
|
<a href="/chat" role="button" class="secondary">AI Coach</a>
|
|
<a href="/workouts" role="button" class="secondary">All Workouts</a>
|
|
<a href="/checkins" role="button" class="secondary">All Check-ins</a>
|
|
</div>
|
|
{% endblock %}
|