adding food logging, polish + demo updates
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<section class="checkin-panel bowel-panel" id="bowel-health-checkin" aria-labelledby="bowel-heading">
|
||||
<header class="checkin-panel__header"><div><p class="eyebrow">Daily wellbeing</p><h2 id="bowel-heading">Bowel health</h2><p>Record how your bowels felt during each part of the day. Choose a date below to edit an entry.</p></div></header>
|
||||
<header class="checkin-panel__header"><div><p class="eyebrow">Daily wellbeing</p><h2 id="bowel-heading">Gut health</h2><p>Record how your gut felt during each part of the day. Choose a date below to edit an entry.</p></div></header>
|
||||
<form class="checkin-form checkin-form--bowel" method="post" action="{% url 'planner:bowel-health-save' %}" hx-post="{% url 'planner:bowel-health-save' %}" hx-target="#bowel-health-checkin" hx-swap="outerHTML" novalidate>
|
||||
{% csrf_token %}{% if bowel_form.non_field_errors %}<div class="form-errors">{{ bowel_form.non_field_errors }}</div>{% endif %}
|
||||
<div class="field">{{ bowel_form.check_in_date.label_tag }}{{ bowel_form.check_in_date }}{{ bowel_form.check_in_date.errors }}</div>
|
||||
@@ -7,11 +7,11 @@
|
||||
<div class="bowel-period"><h3>Morning</h3><div class="field">{{ bowel_form.morning_severity.label_tag }}{{ bowel_form.morning_severity }}{{ bowel_form.morning_severity.errors }}</div><div class="field">{{ bowel_form.morning_note.label_tag }}{{ bowel_form.morning_note }}{{ bowel_form.morning_note.errors }}</div></div>
|
||||
<div class="bowel-period"><h3>Afternoon</h3><div class="field">{{ bowel_form.afternoon_severity.label_tag }}{{ bowel_form.afternoon_severity }}{{ bowel_form.afternoon_severity.errors }}</div><div class="field">{{ bowel_form.afternoon_note.label_tag }}{{ bowel_form.afternoon_note }}{{ bowel_form.afternoon_note.errors }}</div></div>
|
||||
<div class="bowel-period"><h3>Evening</h3><div class="field">{{ bowel_form.evening_severity.label_tag }}{{ bowel_form.evening_severity }}{{ bowel_form.evening_severity.errors }}</div><div class="field">{{ bowel_form.evening_note.label_tag }}{{ bowel_form.evening_note }}{{ bowel_form.evening_note.errors }}</div></div>
|
||||
</div><div class="form-actions"><button class="button button--compact" type="submit">Save bowel check-in</button></div>
|
||||
</div><div class="form-actions"><button class="button button--compact" type="submit">Save gut health check-in</button></div>
|
||||
</form>
|
||||
<section class="checkin-calendar" aria-labelledby="bowel-calendar-heading"><header class="checkin-calendar__header">
|
||||
<a class="text-link" href="{% url 'planner:health' %}?bowel_date={{ bowel_previous_month|date:'Y-m-d' }}#bowel-health-checkin" hx-get="{% url 'planner:bowel-health-panel' %}?date={{ bowel_previous_month|date:'Y-m-d' }}" hx-target="#bowel-health-checkin" hx-swap="outerHTML" aria-label="Previous month">←</a><h3 id="bowel-calendar-heading">{{ bowel_selected_date|date:'F Y' }}</h3><a class="text-link" href="{% url 'planner:health' %}?bowel_date={{ bowel_next_month|date:'Y-m-d' }}#bowel-health-checkin" hx-get="{% url 'planner:bowel-health-panel' %}?date={{ bowel_next_month|date:'Y-m-d' }}" hx-target="#bowel-health-checkin" hx-swap="outerHTML" aria-label="Next month">→</a>
|
||||
</header><div class="checkin-calendar__exports" aria-label="Export bowel tracker data"><a class="button button--secondary button--compact" href="{% url 'planner:bowel-export' 'week' %}?date={{ bowel_selected_date|date:'Y-m-d' }}">Export week</a><a class="button button--secondary button--compact" href="{% url 'planner:bowel-export' 'month' %}?date={{ bowel_selected_date|date:'Y-m-d' }}">Export month</a></div><div class="checkin-calendar__weekdays" aria-hidden="true"><span>Mon</span><span>Tue</span><span>Wed</span><span>Thu</span><span>Fri</span><span>Sat</span><span>Sun</span></div>
|
||||
</header><div class="checkin-calendar__exports" aria-label="Export gut health data"><a class="button button--secondary button--compact" href="{% url 'planner:bowel-export' 'week' %}?date={{ bowel_selected_date|date:'Y-m-d' }}">Export week</a><a class="button button--secondary button--compact" href="{% url 'planner:bowel-export' 'month' %}?date={{ bowel_selected_date|date:'Y-m-d' }}">Export month</a></div><div class="checkin-calendar__weekdays" aria-hidden="true"><span>Mon</span><span>Tue</span><span>Wed</span><span>Thu</span><span>Fri</span><span>Sat</span><span>Sun</span></div>
|
||||
<div class="checkin-calendar__grid">{% for week in bowel_calendar_weeks %}{% for day in week %}<a class="checkin-day{% if day.is_today %} checkin-day--today{% endif %}{% if day.is_selected %} checkin-day--selected{% endif %}{% if day.is_outside_month %} checkin-day--outside{% endif %}" href="{% url 'planner:health' %}?bowel_date={{ day.date|date:'Y-m-d' }}#bowel-health-checkin" hx-get="{% url 'planner:bowel-health-panel' %}?date={{ day.date|date:'Y-m-d' }}" hx-target="#bowel-health-checkin" hx-swap="outerHTML" aria-label="{{ day.label }}"><span class="checkin-day__number">{{ day.date|date:'j' }}</span><span class="checkin-day__periods" aria-hidden="true">{% for period in day.periods %}<span class="checkin-day__period checkin-day__period--{{ period.level }}"><span>{{ period.short_label }}</span><strong>{% if period.score is not None %}{{ period.score }}{% else %}—{% endif %}</strong></span>{% endfor %}</span></a>{% endfor %}{% endfor %}</div>
|
||||
<p class="checkin-calendar__legend">M = morning · A = afternoon · E = evening · 0 = no symptoms · 10 = worst symptoms</p></section>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user