fitness-web/app/templates/checkin_new.html

50 lines
1.9 KiB
HTML

{% extends "base.html" %}
{% block title %}{% if checkin %}Edit{% else %}New{% endif %} Morning Check-in{% endblock %}
{% block content %}
<h1>{% if checkin %}Edit{% else %}New{% endif %} Morning Check-in</h1>
<p><small>All fields are optional — fill in whatever you have each morning.</small></p>
<form method="post" action="{{ action }}">
<label>
Date
<input type="date" name="date" value="{{ checkin.date if checkin else today }}" required>
<small>Morning of this check-in</small>
</label>
<label>
Feeling
<input type="text" name="feeling" value="{{ checkin.feeling or '' }}" placeholder="e.g., Good, Tired, Sore">
<small>How are you feeling this morning?</small>
</label>
<div class="grid">
<label>
Weight (lb)
<input type="number" name="weight_lb" step="0.1" value="{{ checkin.weight_lb or '' }}">
<small>Morning weight</small>
</label>
<label>
Calories
<input type="number" name="calories" value="{{ checkin.calories or '' }}">
<small>Yesterday's total</small>
</label>
<label>
Steps
<input type="number" name="steps" value="{{ checkin.steps or '' }}">
<small>Yesterday's total</small>
</label>
<label>
Sleep (hours)
<input type="number" name="sleep_hours" step="0.5" value="{{ checkin.sleep_hours or '' }}">
<small>Last night</small>
</label>
</div>
<label>
Notes
<textarea name="notes" rows="3" placeholder="Anything else to note?">{{ checkin.notes or '' }}</textarea>
<small>Optional notes about yesterday or today</small>
</label>
<button type="submit">{% if checkin %}Update{% else %}Save{% endif %} Check-in</button>
</form>
{% if checkin %}
<a href="/checkins">Back to Check-ins</a>
{% endif %}
{% endblock %}