first commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
{% load vite %}
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="description" content="A calm, focused personal task planner.">
|
||||
<title>{% block title %}Tasknest{% endblock %}</title>
|
||||
{% vite_asset 'src/main.js' %}
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-shell">
|
||||
<header class="site-header">
|
||||
<div class="site-header__inner">
|
||||
<a class="brand" href="{% url 'planner:task-list' %}" aria-label="Tasknest home">
|
||||
<span class="brand__mark" aria-hidden="true">✓</span>
|
||||
<span>tasknest</span>
|
||||
</a>
|
||||
<nav class="primary-nav" aria-label="Primary navigation">
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'planner:task-list' %}">My tasks</a>
|
||||
<a href="{% url 'planner:daily-planner' %}">Daily planner</a>
|
||||
<a href="{% url 'planner:user-settings' %}">Settings</a>
|
||||
<form method="post" action="{% url 'planner:logout' %}" class="nav-logout">{% csrf_token %}<button type="submit">Log out</button></form>
|
||||
{% else %}
|
||||
<a href="{% url 'planner:login' %}">Log in</a>
|
||||
<a href="{% url 'planner:register' %}">Create account</a>
|
||||
{% endif %}
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
<main class="page-content">
|
||||
{% if messages %}{% for message in messages %}<p class="flash-message" role="status">{{ message }}</p>{% endfor %}{% endif %}
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,88 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
|
||||
{% block title %}Daily planner · Tasknest{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="planner-hero" aria-labelledby="daily-planner-heading">
|
||||
<div>
|
||||
<p class="eyebrow">Daily planner</p>
|
||||
<h1 id="daily-planner-heading">Choose your next best step.</h1>
|
||||
<p>Recommendations adapt to the date and the energy you have available.</p>
|
||||
</div>
|
||||
<form class="planner-controls" method="get">
|
||||
<div>
|
||||
{{ form.selected_date.label_tag }}
|
||||
{{ form.selected_date }}
|
||||
{% for error in form.selected_date.errors %}<p class="field-error" role="alert">{{ error }}</p>{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
{{ form.energy_level.label_tag }}
|
||||
{{ form.energy_level }}
|
||||
{% for error in form.energy_level.errors %}<p class="field-error" role="alert">{{ error }}</p>{% endfor %}
|
||||
</div>
|
||||
<button class="button" type="submit">Update plan</button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
{% if form.is_valid %}
|
||||
<section class="recommendations-panel" aria-labelledby="recommendations-heading">
|
||||
<header class="recommendations-panel__header">
|
||||
<div>
|
||||
<p class="eyebrow">{{ selected_date|date:"l, j F" }}</p>
|
||||
<h2 id="recommendations-heading">Recommended for you</h2>
|
||||
</div>
|
||||
<p class="budget-note">Your available time: <strong>{{ duration_budget }} minutes</strong></p>
|
||||
</header>
|
||||
{% if recommendations %}
|
||||
<div class="recommendation-list">
|
||||
{% for recommendation in recommendations %}
|
||||
<article class="recommendation-card">
|
||||
<div class="recommendation-card__main">
|
||||
<span class="priority priority--{{ recommendation.task.priority }}">{{ recommendation.task.get_priority_display }}</span>
|
||||
<h3><a href="{% url 'planner:task-detail' recommendation.task.pk %}">{{ recommendation.task.title }}</a></h3>
|
||||
<p>
|
||||
{% if recommendation.task.estimated_duration_minutes %}
|
||||
{{ recommendation.task.estimated_duration_minutes }} minutes
|
||||
{% else %}
|
||||
Duration flexible
|
||||
{% endif %}
|
||||
{% if recommendation.task.is_recurring %} · Recurring{% endif %}
|
||||
{% if not recommendation.task.is_active %} · Paused{% endif %}
|
||||
{% if recommendation.task.weather_profile != 'none' %} · {{ recommendation.task.get_weather_profile_display }}{% endif %}
|
||||
{% if recommendation.task.weather_shifted_from %} · Moved from {{ recommendation.task.weather_shifted_from|date:'l' }} — {{ recommendation.task.weather_shift_reason }}{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="recommendation-card__actions">
|
||||
<form method="post" action="{% url 'planner:task-toggle-completed' recommendation.task.pk %}" hx-post="{% url 'planner:task-toggle-completed' recommendation.task.pk %}">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="return_to_daily_planner" value="1">
|
||||
<input type="hidden" name="selected_date" value="{{ selected_date|date:'Y-m-d' }}">
|
||||
<input type="hidden" name="energy_level" value="{{ energy_level }}">
|
||||
<button class="button button--compact" type="submit">Mark complete</button>
|
||||
</form>
|
||||
<a class="text-link" href="{% url 'planner:task-update' recommendation.task.pk %}">Edit</a>
|
||||
</div>
|
||||
{% if recommendation.subtasks %}
|
||||
<section class="recommendation-card__subtasks" aria-labelledby="subtasks-{{ recommendation.task.pk }}">
|
||||
<h4 id="subtasks-{{ recommendation.task.pk }}">Eligible subtasks</h4>
|
||||
<ul>
|
||||
{% for subtask in recommendation.subtasks %}
|
||||
<li><a href="{% url 'planner:task-detail' subtask.pk %}">{{ subtask.title }}</a>{% if subtask.estimated_duration_minutes %}<span>{{ subtask.estimated_duration_minutes }} min</span>{% endif %}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
<div class="empty-state__icon" aria-hidden="true">✓</div>
|
||||
<h2>Nothing scheduled for this day</h2>
|
||||
<p>Create a task or choose another date to make a plan.</p>
|
||||
<a class="button" href="{% url 'planner:task-list' %}">View tasks</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,23 @@
|
||||
<article class="fasting-widget fasting-widget--configuration" id="fasting-widget" aria-labelledby="fasting-configuration-heading">
|
||||
<p class="eyebrow">Intermittent fasting</p>
|
||||
<h2 id="fasting-configuration-heading">Set your daily schedule</h2>
|
||||
<p class="fasting-widget__copy">Your schedule repeats automatically; you do not need to start a timer each day.</p>
|
||||
<form class="fasting-form" method="post" action="{% url 'planner:fasting-configure' %}" hx-post="{% url 'planner:fasting-configure' %}" hx-target="#fasting-widget" hx-swap="outerHTML" novalidate>
|
||||
{% csrf_token %}
|
||||
{% for field in form %}
|
||||
<div class="field field--{{ field.name }}{% if field.errors %} field--error{% endif %}">
|
||||
{% if field.field.widget.input_type == 'checkbox' %}
|
||||
<label class="checkbox-field">{{ field }} <span>{{ field.label }}</span></label>
|
||||
{% else %}
|
||||
{{ field.label_tag }}{{ field }}
|
||||
{% endif %}
|
||||
{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}
|
||||
{% for error in field.errors %}<p class="field-error" role="alert">{{ error }}</p>{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
<div class="fasting-widget__actions">
|
||||
<button class="button button--compact" type="submit">Save schedule</button>
|
||||
<a class="text-link" href="{% url 'planner:task-list' %}" hx-get="{% url 'planner:fasting-widget' %}" hx-target="#fasting-widget" hx-swap="outerHTML">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</article>
|
||||
@@ -0,0 +1,69 @@
|
||||
<article class="fasting-widget" id="fasting-widget" aria-labelledby="fasting-heading">
|
||||
{% if not fasting_settings %}
|
||||
<p class="eyebrow">Optional routine</p>
|
||||
<h2 id="fasting-heading">Intermittent fasting</h2>
|
||||
<p class="fasting-widget__copy">Set a daily fasting window when it fits your routine.</p>
|
||||
<a class="button button--secondary button--compact" href="{% url 'planner:fasting-configure' %}" hx-get="{% url 'planner:fasting-configure' %}" hx-target="#fasting-widget" hx-swap="outerHTML">Set up fasting</a>
|
||||
{% elif fasting_settings.enabled %}
|
||||
<div class="fasting-widget__topline">
|
||||
<p class="eyebrow">Intermittent fasting</p>
|
||||
<span class="fasting-state fasting-state--{{ fasting_phase.name }}">{% if fasting_phase.is_fasting %}Fasting{% else %}Eating{% endif %}</span>
|
||||
</div>
|
||||
<h2 id="fasting-heading">{% if fasting_phase.is_fasting %}Fasting now{% else %}Eating window open{% endif %}</h2>
|
||||
<div
|
||||
class="fasting-timer fasting-timer--{{ fasting_phase.name }}"
|
||||
data-fasting-timer
|
||||
data-cycle-start="{{ fasting_phase.cycle_start|date:'c' }}"
|
||||
data-cycle-end="{{ fasting_phase.cycle_end|date:'c' }}"
|
||||
data-phase="{{ fasting_phase.name }}"
|
||||
data-refresh-url="{% url 'planner:fasting-widget' %}"
|
||||
role="timer"
|
||||
aria-live="off"
|
||||
aria-label="{% if fasting_phase.is_fasting %}Fasting{% else %}Eating window{% endif %} progress"
|
||||
>
|
||||
<svg class="fasting-timer__ring" viewBox="0 0 120 120" aria-hidden="true">
|
||||
<circle class="fasting-timer__track" cx="60" cy="60" r="53" pathLength="100"></circle>
|
||||
<circle class="fasting-timer__progress" cx="60" cy="60" r="53" pathLength="100" data-fasting-progress></circle>
|
||||
</svg>
|
||||
<div class="fasting-timer__content">
|
||||
<strong data-fasting-elapsed>00:00:00</strong>
|
||||
<span>{% if fasting_phase.is_fasting %}Fasting elapsed{% else %}Eating elapsed{% endif %}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="fasting-widget__copy fasting-widget__cycle-copy">
|
||||
{% if fasting_phase.is_fasting %}
|
||||
Fasting until <time datetime="{{ fasting_phase.cycle_end|date:'c' }}">{{ fasting_phase.cycle_end|time:"H:i" }}</time>
|
||||
{% else %}
|
||||
Next fast at <time datetime="{{ fasting_phase.cycle_end|date:'c' }}">{{ fasting_phase.cycle_end|time:"H:i" }}</time>
|
||||
{% endif %}
|
||||
</p>
|
||||
<dl class="fasting-widget__schedule">
|
||||
<div><dt>Fasting</dt><dd>{{ fasting_settings.fasting_start_time|time:"H:i" }} daily</dd></div>
|
||||
<div><dt>Schedule</dt><dd>{{ fasting_settings.fasting_duration_minutes }} min</dd></div>
|
||||
</dl>
|
||||
<div class="fasting-widget__actions">
|
||||
<form method="post" action="{% url 'planner:fasting-toggle' %}" hx-post="{% url 'planner:fasting-toggle' %}" hx-target="#fasting-widget" hx-swap="outerHTML">
|
||||
{% csrf_token %}
|
||||
<button class="button button--secondary button--compact" type="submit">Pause tracking</button>
|
||||
</form>
|
||||
<a class="text-link" href="{% url 'planner:fasting-configure' %}" hx-get="{% url 'planner:fasting-configure' %}" hx-target="#fasting-widget" hx-swap="outerHTML">Adjust</a>
|
||||
</div>
|
||||
{% if fasting_history %}
|
||||
<section class="fasting-history" aria-labelledby="fasting-history-heading">
|
||||
<h3 id="fasting-history-heading">Recent completed fasts</h3>
|
||||
<ul>{% for period in fasting_history %}<li><time datetime="{{ period.scheduled_start|date:'c' }}">{{ period.scheduled_start|date:"j M" }}</time><span>{{ period.scheduled_start|time:"H:i" }}–{{ period.scheduled_end|time:"H:i" }}</span></li>{% endfor %}</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p class="eyebrow">Intermittent fasting</p>
|
||||
<h2 id="fasting-heading">Tracking paused</h2>
|
||||
<p class="fasting-widget__copy">Your history is saved. Resume when you are ready to follow your normal schedule again.</p>
|
||||
<div class="fasting-widget__actions">
|
||||
<form method="post" action="{% url 'planner:fasting-toggle' %}" hx-post="{% url 'planner:fasting-toggle' %}" hx-target="#fasting-widget" hx-swap="outerHTML">
|
||||
{% csrf_token %}
|
||||
<button class="button button--compact" type="submit">Resume tracking</button>
|
||||
</form>
|
||||
<a class="text-link" href="{% url 'planner:fasting-configure' %}" hx-get="{% url 'planner:fasting-configure' %}" hx-target="#fasting-widget" hx-swap="outerHTML">Adjust schedule</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</article>
|
||||
@@ -0,0 +1,61 @@
|
||||
<section class="checkin-panel" id="neck-headache-checkin" aria-labelledby="checkin-heading">
|
||||
<header class="checkin-panel__header">
|
||||
<div>
|
||||
<p class="eyebrow">Daily wellbeing</p>
|
||||
<h2 id="checkin-heading">Pain & sleep check-ins</h2>
|
||||
<p>Record {{ check_in_selected_date|date:"l, j F" }}. Choose any day below to edit an entry.</p>
|
||||
</div>
|
||||
{% if check_in_active_tab == 'pain' %}
|
||||
<dl class="checkin-streaks" aria-label="Pain check-in summary">
|
||||
<div><dt>Current <span class="checkin-tooltip" tabindex="0" aria-label="A confirmed day has both pain scores at {{ check_in_streak_threshold }} or below">ⓘ<span class="checkin-tooltip__content" role="tooltip">A confirmed day has both scores at {{ check_in_streak_threshold }} or below.</span></span></dt><dd>{{ check_in_streaks.current }} day{{ check_in_streaks.current|pluralize }}</dd></div>
|
||||
<div><dt>Longest</dt><dd>{{ check_in_streaks.longest }} day{{ check_in_streaks.longest|pluralize }}</dd></div>
|
||||
<div><dt>Physio sessions this year</dt><dd>{{ physio_sessions_this_year }}/{{ annual_physio_session_allowance }}</dd></div>
|
||||
</dl>
|
||||
{% endif %}
|
||||
</header>
|
||||
|
||||
<nav class="checkin-tabs" role="tablist" aria-label="Wellbeing check-ins">
|
||||
<a class="checkin-tabs__tab{% if check_in_active_tab == 'pain' %} is-active{% endif %}" id="pain-checkin-tab" role="tab" aria-selected="{% if check_in_active_tab == 'pain' %}true{% else %}false{% endif %}" aria-controls="pain-checkin-panel" href="{% url 'planner:task-list' %}?check_in_date={{ check_in_selected_date|date:'Y-m-d' }}&wellbeing_tab=pain" hx-get="{% url 'planner:neck-headache-checkin-panel' %}?date={{ check_in_selected_date|date:'Y-m-d' }}&tab=pain" hx-target="#neck-headache-checkin" hx-swap="outerHTML">Neck & headache</a>
|
||||
<a class="checkin-tabs__tab{% if check_in_active_tab == 'sleep' %} is-active{% endif %}" id="sleep-checkin-tab" role="tab" aria-selected="{% if check_in_active_tab == 'sleep' %}true{% else %}false{% endif %}" aria-controls="sleep-checkin-panel" href="{% url 'planner:task-list' %}?check_in_date={{ check_in_selected_date|date:'Y-m-d' }}&wellbeing_tab=sleep" hx-get="{% url 'planner:neck-headache-checkin-panel' %}?date={{ check_in_selected_date|date:'Y-m-d' }}&tab=sleep" hx-target="#neck-headache-checkin" hx-swap="outerHTML">Sleep</a>
|
||||
</nav>
|
||||
|
||||
{% if check_in_active_tab == 'pain' %}
|
||||
<div id="pain-checkin-panel" role="tabpanel" aria-labelledby="pain-checkin-tab" tabindex="0">
|
||||
<form class="checkin-form" method="post" action="{% url 'planner:neck-headache-checkin-save' %}" hx-post="{% url 'planner:neck-headache-checkin-save' %}" hx-target="#neck-headache-checkin" hx-swap="outerHTML" novalidate>
|
||||
{% csrf_token %}
|
||||
<h3 class="checkin-form__heading">Neck & headache</h3>
|
||||
{% if check_in_form.non_field_errors %}<div class="form-errors">{{ check_in_form.non_field_errors }}</div>{% endif %}
|
||||
<div class="field{% if check_in_form.check_in_date.errors %} field--error{% endif %}">{{ check_in_form.check_in_date.label_tag }}{{ check_in_form.check_in_date }}{% for error in check_in_form.check_in_date.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field{% if check_in_form.neck_pain_severity.errors %} field--error{% endif %}">{{ check_in_form.neck_pain_severity.label_tag }}{{ check_in_form.neck_pain_severity }}<small>{{ check_in_form.neck_pain_severity.help_text }}</small>{% for error in check_in_form.neck_pain_severity.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field{% if check_in_form.headache_severity.errors %} field--error{% endif %}">{{ check_in_form.headache_severity.label_tag }}{{ check_in_form.headache_severity }}<small>{{ check_in_form.headache_severity.help_text }}</small>{% for error in check_in_form.headache_severity.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field checkin-form__note{% if check_in_form.note.errors %} field--error{% endif %}">{{ check_in_form.note.label_tag }}{{ check_in_form.note }}{% for error in check_in_form.note.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field checkin-form__physio"><label class="checkbox-field">{{ check_in_form.had_physiotherapy }} <span>{{ check_in_form.had_physiotherapy.label }}</span></label></div>
|
||||
<div class="form-actions"><button class="button button--compact" type="submit">Save pain check-in</button></div>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div id="sleep-checkin-panel" role="tabpanel" aria-labelledby="sleep-checkin-tab" tabindex="0">
|
||||
<form class="checkin-form checkin-form--sleep" method="post" action="{% url 'planner:sleep-checkin-save' %}" hx-post="{% url 'planner:sleep-checkin-save' %}" hx-target="#neck-headache-checkin" hx-swap="outerHTML" novalidate>
|
||||
{% csrf_token %}
|
||||
<h3 class="checkin-form__heading">Sleep</h3>
|
||||
{% if sleep_check_in_form.non_field_errors %}<div class="form-errors">{{ sleep_check_in_form.non_field_errors }}</div>{% endif %}
|
||||
<div class="field{% if sleep_check_in_form.wake_up_date.errors %} field--error{% endif %}">{{ sleep_check_in_form.wake_up_date.label_tag }}{{ sleep_check_in_form.wake_up_date }}{% for error in sleep_check_in_form.wake_up_date.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field{% if sleep_check_in_form.rested_score.errors %} field--error{% endif %}">{{ sleep_check_in_form.rested_score.label_tag }}{{ sleep_check_in_form.rested_score }}{% for error in sleep_check_in_form.rested_score.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field{% if sleep_check_in_form.watch_sleep_score.errors %} field--error{% endif %}">{{ sleep_check_in_form.watch_sleep_score.label_tag }}{{ sleep_check_in_form.watch_sleep_score }}{% for error in sleep_check_in_form.watch_sleep_score.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="field checkin-form__note{% if sleep_check_in_form.note.errors %} field--error{% endif %}">{{ sleep_check_in_form.note.label_tag }}{{ sleep_check_in_form.note }}{% for error in sleep_check_in_form.note.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>
|
||||
<div class="form-actions"><button class="button button--compact" type="submit">Save sleep check-in</button></div>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<section class="checkin-calendar" aria-labelledby="checkin-calendar-heading">
|
||||
<header class="checkin-calendar__header">
|
||||
<a class="text-link" href="{% url 'planner:task-list' %}?check_in_date={{ check_in_previous_month|date:'Y-m-d' }}&wellbeing_tab={{ check_in_active_tab }}" hx-get="{% url 'planner:neck-headache-checkin-panel' %}?date={{ check_in_previous_month|date:'Y-m-d' }}&tab={{ check_in_active_tab }}" hx-target="#neck-headache-checkin" hx-swap="outerHTML" aria-label="Previous month">←</a><h3 id="checkin-calendar-heading">{{ check_in_selected_date|date:"F Y" }}</h3><a class="text-link" href="{% url 'planner:task-list' %}?check_in_date={{ check_in_next_month|date:'Y-m-d' }}&wellbeing_tab={{ check_in_active_tab }}" hx-get="{% url 'planner:neck-headache-checkin-panel' %}?date={{ check_in_next_month|date:'Y-m-d' }}&tab={{ check_in_active_tab }}" hx-target="#neck-headache-checkin" hx-swap="outerHTML" aria-label="Next month">→</a>
|
||||
</header>
|
||||
<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 check_in_calendar_weeks %}{% for day in week %}<a class="checkin-day checkin-day--{{ day.level }}{% 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:task-list' %}?check_in_date={{ day.date|date:'Y-m-d' }}&wellbeing_tab={{ check_in_active_tab }}" hx-get="{% url 'planner:neck-headache-checkin-panel' %}?date={{ day.date|date:'Y-m-d' }}&tab={{ check_in_active_tab }}" hx-target="#neck-headache-checkin" hx-swap="outerHTML" aria-label="{{ day.label }}"><span class="checkin-day__number">{{ day.date|date:"j" }}</span>{% if day.check_in %}<strong class="checkin-day__score">{{ day.highest_score }}</strong>{% if day.check_in.had_physiotherapy %}<span class="checkin-day__physio" aria-hidden="true">✚</span>{% endif %}{% else %}<span class="checkin-day__empty" aria-hidden="true">—</span>{% endif %}{% if day.sleep_check_in %}<span class="checkin-day__sleep" aria-hidden="true">☾</span>{% endif %}</a>{% endfor %}{% endfor %}</div>
|
||||
<p class="checkin-calendar__legend"><span><i class="checkin-legend checkin-legend--unrecorded"></i> Pain unrecorded</span><span><i class="checkin-legend checkin-legend--zero"></i> Pain recorded: 0</span><span>Number = highest pain score</span><span><i class="checkin-legend checkin-legend--sleep">☾</i> Sleep check-in</span></p>
|
||||
</section>
|
||||
|
||||
{% if check_in_active_tab == 'sleep' %}<section class="sleep-trend" aria-labelledby="sleep-trend-heading"><header><h3 id="sleep-trend-heading">Sleep scores over time</h3><p>Rested and watch scores are shown together for comparison only; neither is presented as causing a change in the other.</p></header>{% if sleep_check_in_trend %}<div class="sleep-trend__table-wrap"><table><thead><tr><th scope="col">Wake-up date</th><th scope="col">Rested</th><th scope="col">Watch</th></tr></thead><tbody>{% for sleep in sleep_check_in_trend %}<tr><th scope="row"><time datetime="{{ sleep.wake_up_date|date:'Y-m-d' }}">{{ sleep.wake_up_date|date:"j M" }}</time></th><td>{{ sleep.rested_score }}/10</td><td>{% if sleep.watch_sleep_score is not None %}{{ sleep.watch_sleep_score }}%{% else %}—{% endif %}</td></tr>{% endfor %}</tbody></table></div>{% else %}<p class="sleep-trend__empty">Save a sleep check-in to start the comparison.</p>{% endif %}</section>{% endif %}
|
||||
</section>
|
||||
@@ -0,0 +1,36 @@
|
||||
<article class="task-card{% if not task.is_active %} task-card--inactive{% endif %}{% if task.is_completed %} task-card--completed{% endif %}" id="task-{{ task.pk }}">
|
||||
<div class="task-card__topline">
|
||||
<span class="priority priority--{{ task.priority }}">{{ task.get_priority_display }}</span>
|
||||
<time datetime="{{ task.scheduled_for|date:'Y-m-d' }}">{{ task.scheduled_for|date:"D, j M" }}</time>
|
||||
</div>
|
||||
<h2><a href="{% url 'planner:task-detail' task.pk %}">{{ task.title }}</a></h2>
|
||||
{% if task.description %}<p class="task-card__description">{{ task.description|truncatewords:20 }}</p>{% endif %}
|
||||
<div class="task-card__meta">
|
||||
{% if task.category %}<span>{{ task.category }}</span>{% endif %}
|
||||
{% if task.estimated_duration_minutes %}<span>{{ task.estimated_duration_minutes }} min</span>{% endif %}
|
||||
{% if task.is_recurring %}<span>Repeats</span>{% endif %}
|
||||
{% if task.weather_profile != 'none' %}<span>☀ {{ task.get_weather_profile_display }}</span>{% endif %}
|
||||
</div>
|
||||
{% if task.predicted_weather %}
|
||||
<p class="task-weather-forecast"><span aria-hidden="true">{{ task.predicted_weather_icon }}</span><span>Forecast for this task: {{ task.predicted_weather_label }}{% if task.predicted_weather.temperature_max_c is not None %}, {{ task.predicted_weather.temperature_max_c|floatformat:0 }} °C{% endif %}</span></p>
|
||||
{% endif %}
|
||||
{% if task.subtasks.all %}
|
||||
<p class="subtask-count"><span aria-hidden="true">↳</span> {{ task.subtasks.count }} subtask{{ task.subtasks.count|pluralize }}{% if task.is_completed %} unlocked{% else %} — complete this task to unlock{% endif %}</p>
|
||||
{% endif %}
|
||||
<footer class="task-card__footer">
|
||||
<form method="post" action="{% url 'planner:task-toggle-completed' task.pk %}" hx-post="{% url 'planner:task-toggle-completed' task.pk %}" hx-target="#task-{{ task.pk }}" hx-swap="outerHTML">
|
||||
{% csrf_token %}
|
||||
<button class="{% if task.is_completed %}status-button{% else %}button button--compact{% endif %} task-completion-button" type="submit">
|
||||
{% if task.is_completed %}<span class="status-button__dot" aria-hidden="true"></span>{% endif %}
|
||||
{% if task.is_completed %}Completed — reopen{% else %}Mark complete{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
<form method="post" action="{% url 'planner:task-toggle-active' task.pk %}" hx-post="{% url 'planner:task-toggle-active' task.pk %}" hx-target="#task-{{ task.pk }}" hx-swap="outerHTML">
|
||||
{% csrf_token %}
|
||||
<button class="status-button" type="submit" aria-label="Mark {{ task.title }} as {% if task.is_active %}inactive{% else %}active{% endif %}">
|
||||
{% if task.is_active %}Active{% else %}Paused{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
<a class="text-link" href="{% url 'planner:task-update' task.pk %}">Edit</a>
|
||||
</footer>
|
||||
</article>
|
||||
@@ -0,0 +1,18 @@
|
||||
<section class="inline-form-panel" aria-labelledby="new-task-heading">
|
||||
<header class="inline-form-panel__header">
|
||||
<div>
|
||||
<p class="eyebrow">Plan with intention</p>
|
||||
<h2 id="new-task-heading">Create a task</h2>
|
||||
<p>Give your future self a clear next step.</p>
|
||||
</div>
|
||||
<a class="icon-link" href="{% url 'planner:task-list' %}" hx-get="{% url 'planner:task-list' %}" hx-target="#task-list" hx-swap="innerHTML">Close<span class="visually-hidden"> task form</span></a>
|
||||
</header>
|
||||
<form class="task-form task-form--inline" method="post" action="{% url 'planner:task-create' %}" hx-post="{% url 'planner:task-create' %}" hx-target="#task-list" hx-swap="innerHTML" novalidate>
|
||||
{% csrf_token %}
|
||||
{% include 'planner/partials/task_form_fields.html' %}
|
||||
<div class="form-actions">
|
||||
<button class="button" type="submit">Save task</button>
|
||||
<a class="text-link" href="{% url 'planner:task-list' %}" hx-get="{% url 'planner:task-list' %}" hx-target="#task-list" hx-swap="innerHTML">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
@@ -0,0 +1,22 @@
|
||||
{% if form.non_field_errors %}<div class="form-errors" role="alert">{{ form.non_field_errors }}</div>{% endif %}
|
||||
{% for field in form %}
|
||||
<div class="field field--{{ field.name }}{% if field.errors %} field--error{% endif %}">
|
||||
{% if field.field.widget.input_type == "checkbox" %}
|
||||
<label class="checkbox-field">{{ field }} <span>{{ field.label }}</span></label>
|
||||
{% elif field.name == "category" %}
|
||||
{{ field.label_tag }}
|
||||
<div class="category-picker" data-category-picker>
|
||||
{{ field }}
|
||||
<button class="category-picker__clear" type="button" data-category-clear aria-label="Clear category"{% if not field.value %} hidden{% endif %}>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<ul class="category-picker__suggestions" id="{{ field.id_for_label }}-suggestions" role="listbox" aria-label="Category suggestions" hidden></ul>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ field.label_tag }}
|
||||
{{ field }}
|
||||
{% endif %}
|
||||
{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}
|
||||
{% for error in field.errors %}<p class="field-error" role="alert">{{ error }}</p>{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
@@ -0,0 +1,14 @@
|
||||
{% if tasks %}
|
||||
<div class="task-grid">
|
||||
{% for task in tasks %}
|
||||
{% include 'planner/partials/task_card.html' with task=task %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
<div class="empty-state__icon" aria-hidden="true">✓</div>
|
||||
<h2>No tasks here</h2>
|
||||
<p>Try a different filter, or create a task to get started.</p>
|
||||
<a class="button" href="{% url 'planner:task-create' %}">Create task</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
@@ -0,0 +1,15 @@
|
||||
<article>
|
||||
<h2><a href="{% url 'planner:task-detail' task.pk %}">{{ task.title }}</a></h2>
|
||||
<p>
|
||||
<span>Scheduled for {{ task.scheduled_for }}</span>
|
||||
<span>Priority: {{ task.get_priority_display }}</span>
|
||||
{% if task.category %}<span>Category: {{ task.category }}</span>{% endif %}
|
||||
</p>
|
||||
{% if task.subtasks.all %}
|
||||
<ul aria-label="Subtasks for {{ task.title }}">
|
||||
{% for subtask in task.subtasks.all %}
|
||||
<li><a href="{% url 'planner:task-detail' subtask.pk %}">{{ subtask.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</article>
|
||||
@@ -0,0 +1,4 @@
|
||||
<section class="weather-widget" aria-labelledby="weather-heading">
|
||||
<div class="weather-widget__topline"><div><p class="eyebrow">Your forecast</p><h2 id="weather-heading">Weather</h2></div>{% if weather_forecast %}<span class="weather-widget__icon" aria-hidden="true">{{ weather_icon }}</span>{% endif %}</div>
|
||||
{% if weather_forecast %}<p class="weather-widget__reading"><strong>{% if weather_forecast.temperature_max_c is not None %}{{ weather_forecast.temperature_max_c|floatformat:0 }} °C{% else %}—{% endif %}</strong> {{ weather_label }}</p><p class="weather-widget__detail">{% if weather_forecast.precipitation_probability is not None %}{{ weather_forecast.precipitation_probability|floatformat:0 }}% chance of precipitation{% else %}Daily forecast{% endif %}</p>{% elif weather_location_configured %}<p class="weather-widget__detail">Forecast temporarily unavailable. Your tasks will continue as normal.</p>{% else %}<p class="weather-widget__detail">Add a location to see weather-aware plans.</p><a class="text-link" href="{% url 'planner:user-settings' %}">Set location</a>{% endif %}
|
||||
</section>
|
||||
@@ -0,0 +1 @@
|
||||
<section class="workout-panel" id="workout-section" aria-labelledby="workout-form-heading"><header class="inline-form-panel__header"><div><p class="eyebrow">Daily movement</p><h2 id="workout-form-heading">{% if form.instance.pk %}Edit workout{% else %}Add a workout{% endif %}</h2><p>Keep workouts separate from your regular task plan.</p></div><a class="icon-link" href="{% url 'planner:task-list' %}" hx-get="{% url 'planner:workout-today' %}" hx-target="#workout-section" hx-swap="outerHTML">Close</a></header><form class="workout-form" method="post" {% if form.instance.pk %}action="{% url 'planner:workout-update' form.instance.pk %}" hx-post="{% url 'planner:workout-update' form.instance.pk %}"{% else %}action="{% url 'planner:workout-create' %}" hx-post="{% url 'planner:workout-create' %}"{% endif %} hx-target="#workout-section" hx-swap="outerHTML" novalidate>{% csrf_token %}{% if form.non_field_errors %}<div class="form-errors">{{ form.non_field_errors }}</div>{% endif %}{% for field in form %}<div class="field{% if field.errors %} field--error{% endif %}">{% if field.field.widget.input_type == 'checkbox' %}<label class="checkbox-field">{{ field }} <span>{{ field.label }}</span></label>{% else %}{{ field.label_tag }}{{ field }}{% endif %}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{% for error in field.errors %}<p class="field-error">{{ error }}</p>{% endfor %}</div>{% endfor %}<div class="form-actions"><button class="button" type="submit">Save workout</button><a class="text-link" href="{% url 'planner:task-list' %}" hx-get="{% url 'planner:workout-today' %}" hx-target="#workout-section" hx-swap="outerHTML">Cancel</a></div></form></section>
|
||||
@@ -0,0 +1,9 @@
|
||||
<section class="workout-panel" id="workout-section" aria-labelledby="workouts-heading">
|
||||
<header class="workout-panel__header">
|
||||
<div><p class="eyebrow">Daily movement</p><h2 id="workouts-heading">Daily Workout</h2><p>Today, {{ workout_date|date:"l, j F" }}</p></div>
|
||||
<div class="workout-panel__summary">{% if workout_calories_total is not None %}<strong>{{ workout_calories_total }} kcal</strong><span>Total burned today</span>{% else %}<strong>—</strong><span>No calorie data yet</span>{% endif %}</div>
|
||||
<a class="button button--compact" href="{% url 'planner:workout-create' %}" hx-get="{% url 'planner:workout-create' %}" hx-target="#workout-section" hx-swap="outerHTML">+ Add workout</a>
|
||||
</header>
|
||||
{% if completed_workouts_without_calories %}<p class="workout-panel__note">{{ completed_workouts_without_calories }} completed workout{{ completed_workouts_without_calories|pluralize }} without calorie data is not included in the total.</p>{% endif %}
|
||||
{% if workouts %}<div class="workout-list">{% for workout in workouts %}<article class="workout-entry{% if workout.completed_for_day %} workout-entry--completed{% endif %}"><div class="workout-entry__main"><h3>{{ workout.name }}</h3><p>{% if workout.is_daily_recurring %}Daily routine{% else %}One-time workout{% endif %}{% if workout.duration_minutes %} · {{ workout.duration_minutes }} min{% endif %}{% if workout.calories_burned is not None %} · {{ workout.calories_burned }} kcal{% endif %}</p></div><div class="workout-entry__actions"><form method="post" action="{% url 'planner:workout-toggle-completed' workout.pk %}" hx-post="{% url 'planner:workout-toggle-completed' workout.pk %}" hx-target="#workout-section" hx-swap="outerHTML">{% csrf_token %}<button class="status-button" type="submit">{% if workout.completed_for_day %}Completed{% else %}Mark complete{% endif %}</button></form><a class="text-link" href="{% url 'planner:workout-update' workout.pk %}" hx-get="{% url 'planner:workout-update' workout.pk %}" hx-target="#workout-section" hx-swap="outerHTML">Edit</a><form method="post" action="{% url 'planner:workout-delete' workout.pk %}" hx-post="{% url 'planner:workout-delete' workout.pk %}" hx-target="#workout-section" hx-swap="outerHTML">{% csrf_token %}<button class="text-link workout-entry__remove" type="submit">Remove</button></form></div></article>{% endfor %}</div>{% else %}<div class="workout-empty"><p>No workouts planned for today.</p><a class="text-link" href="{% url 'planner:workout-create' %}" hx-get="{% url 'planner:workout-create' %}" hx-target="#workout-section" hx-swap="outerHTML">Add your first workout</a></div>{% endif %}
|
||||
</section>
|
||||
@@ -0,0 +1,3 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
{% block title %}Create account · Tasknest{% endblock %}
|
||||
{% block content %}<section class="auth-panel"><p class="eyebrow">Get started</p><h1>Create your account</h1><form method="post">{% csrf_token %}{{ form.non_field_errors }}{% for field in form %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Create account</button></form><p>Already have an account? <a href="{% url 'planner:login' %}">Log in</a>.</p></section>{% endblock %}
|
||||
@@ -0,0 +1,18 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
|
||||
{% block title %}Delete {{ task.title }} · Tasknest{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="confirmation-card">
|
||||
<p class="eyebrow">This cannot be undone</p>
|
||||
<h1>Delete “{{ task.title }}”?</h1>
|
||||
<p>Any subtasks will be kept and moved to your top-level task list.</p>
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<div class="form-actions">
|
||||
<button class="button button--danger" type="submit">Delete task</button>
|
||||
<a class="text-link" href="{% url 'planner:task-detail' task.pk %}">Keep task</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,42 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
|
||||
{% block title %}{{ task.title }} · Tasknest{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<p class="back-link"><a href="{% url 'planner:task-list' %}">← Back to tasks</a></p>
|
||||
<article class="detail-card">
|
||||
<header class="detail-card__header">
|
||||
<div>
|
||||
<p class="eyebrow">{{ task.get_priority_display }} priority{% if task.category %} · {{ task.category }}{% endif %}</p>
|
||||
<h1>{{ task.title }}</h1>
|
||||
<p class="detail-card__date">Scheduled for <time datetime="{{ task.scheduled_for|date:'Y-m-d' }}">{{ task.scheduled_for|date:"l, j F Y" }}</time></p>
|
||||
</div>
|
||||
<div class="detail-card__actions">
|
||||
<a class="button button--secondary" href="{% url 'planner:task-update' task.pk %}">Edit task</a>
|
||||
<a class="icon-link" href="{% url 'planner:task-delete' task.pk %}">Delete<span class="visually-hidden"> {{ task.title }}</span></a>
|
||||
</div>
|
||||
</header>
|
||||
<div class="detail-card__body">
|
||||
{% if task.description %}<div class="prose">{{ task.description|linebreaks }}</div>{% else %}<p class="muted">No notes added yet.</p>{% endif %}
|
||||
<dl class="task-facts">
|
||||
{% if task.estimated_duration_minutes %}<div><dt>Time estimate</dt><dd>{{ task.estimated_duration_minutes }} minutes</dd></div>{% endif %}
|
||||
<div><dt>Status</dt><dd>{% if task.is_completed %}Completed{% elif task.is_active %}Active{% else %}Paused{% endif %}</dd></div>
|
||||
{% if task.is_recurring %}<div><dt>Repeats</dt><dd>Every {{ task.recurrence_interval }} {{ task.recurrence_unit }}</dd></div>{% endif %}
|
||||
{% if task.weather_profile != 'none' %}<div><dt>Weather requirement</dt><dd>{{ task.get_weather_profile_display }}</dd></div>{% endif %}
|
||||
{% if task.predicted_weather %}<div><dt>Predicted weather</dt><dd><span aria-hidden="true">{{ task.predicted_weather_icon }}</span> {{ task.predicted_weather_label }}{% if task.predicted_weather.temperature_max_c is not None %}, {{ task.predicted_weather.temperature_max_c|floatformat:0 }} °C{% endif %}</dd></div>{% endif %}
|
||||
{% if task.parent_task %}<div><dt>Parent task</dt><dd><a href="{% url 'planner:task-detail' task.parent_task.pk %}">{{ task.parent_task }}</a></dd></div>{% endif %}
|
||||
</dl>
|
||||
</div>
|
||||
</article>
|
||||
{% if task.subtasks.all %}
|
||||
<section class="subtasks-section" aria-labelledby="subtasks-heading">
|
||||
<p class="eyebrow">Break it down</p>
|
||||
<h2 id="subtasks-heading">Subtasks</h2>
|
||||
{% if task.is_completed %}
|
||||
<ul class="subtasks-list">{% for subtask in task.subtasks.all %}<li><a href="{% url 'planner:task-detail' subtask.pk %}">{{ subtask.title }}</a><span>{{ subtask.scheduled_for|date:"j M" }}</span></li>{% endfor %}</ul>
|
||||
{% else %}
|
||||
<p class="muted">Complete this task to unlock its {{ task.subtasks.count }} subtask{{ task.subtasks.count|pluralize }}.</p>
|
||||
{% endif %}
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,21 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
|
||||
{% block title %}{% if form.instance.pk %}Edit {{ form.instance.title }}{% else %}Create task{% endif %} · Tasknest{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="form-layout">
|
||||
<div class="form-layout__intro">
|
||||
<p class="eyebrow">{% if form.instance.pk %}Refine your plan{% else %}Plan with intention{% endif %}</p>
|
||||
<h1>{% if form.instance.pk %}Edit task{% else %}Create a task{% endif %}</h1>
|
||||
<p>{% if form.instance.pk %}Make this task fit the way you want to work.{% else %}Give your future self a clear next step.{% endif %}</p>
|
||||
</div>
|
||||
<form class="task-form" method="post" novalidate>
|
||||
{% csrf_token %}
|
||||
{% include 'planner/partials/task_form_fields.html' %}
|
||||
<div class="form-actions">
|
||||
<button class="button" type="submit">Save task</button>
|
||||
<a class="text-link" href="{% if form.instance.pk %}{% url 'planner:task-detail' form.instance.pk %}{% else %}{% url 'planner:task-list' %}{% endif %}">Cancel</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,49 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
|
||||
{% block title %}My tasks · Tasknest{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<section class="hero" aria-labelledby="tasks-heading">
|
||||
<div>
|
||||
<p class="eyebrow">Personal planning</p>
|
||||
<h1 id="tasks-heading">Make space for what matters.</h1>
|
||||
<p class="hero__copy">A focused view of your tasks, plans, and next steps.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="home-layout">
|
||||
<div class="home-main">
|
||||
<section class="task-panel" aria-label="Task list">
|
||||
<form class="task-filters" method="get" hx-get="{% url 'planner:task-list' %}" hx-target="#task-list" hx-push-url="true" hx-trigger="change" hx-indicator="#loading-indicator">
|
||||
<div>
|
||||
<label for="status-filter">Show</label>
|
||||
<select id="status-filter" name="status">
|
||||
<option value="all" {% if current_filter == 'all' %}selected{% endif %}>All tasks</option>
|
||||
<option value="active" {% if current_filter == 'active' %}selected{% endif %}>Active tasks</option>
|
||||
<option value="inactive" {% if current_filter == 'inactive' %}selected{% endif %}>Inactive tasks</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="task-filters__actions">
|
||||
<span class="loading-indicator htmx-indicator" id="loading-indicator" role="status">Updating…</span>
|
||||
<button class="button button--secondary button--compact" type="submit">Apply filter</button>
|
||||
<a class="button button--compact" href="{% url 'planner:task-create' %}" hx-get="{% url 'planner:task-create' %}" hx-target="#task-list" hx-swap="innerHTML">
|
||||
<span aria-hidden="true">+</span> New task
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
<div id="task-list" aria-live="polite">
|
||||
{% include 'planner/partials/task_list_content.html' %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% include 'planner/partials/workout_section.html' %}
|
||||
{% include 'planner/partials/neck_headache_checkin.html' %}
|
||||
</div>
|
||||
{% if user.is_authenticated %}
|
||||
<aside class="homepage-sidebar" aria-label="Personal routines">
|
||||
{% include 'planner/partials/weather_widget.html' %}
|
||||
{% include 'planner/partials/fasting_widget.html' %}
|
||||
</aside>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,11 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
{% block title %}Settings · Tasknest{% endblock %}
|
||||
{% block content %}
|
||||
<section class="settings-page">
|
||||
<p class="eyebrow">Personal preferences</p><h1>Settings</h1>
|
||||
<section class="settings-card"><h2>Time zone</h2><p>Dates and displayed times, including fasting, use this time zone. Europe/Amsterdam is the default.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="time-zone">{% for field in time_zone_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save time zone</button></form></section>
|
||||
<section class="settings-card"><h2>Location & weather</h2><p>Location is optional and private. It is used only to retrieve your forecast.</p><form method="post" data-geolocation-form>{% csrf_token %}<input type="hidden" name="section" value="location">{% for field in profile_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endfor %}<button class="button button--secondary" type="button" data-use-location>Use my current location</button><span data-location-status role="status"></span><button class="button" type="submit">Save location</button></form></section>
|
||||
<section class="settings-card"><h2>Sick Day Mode</h2><p>Temporarily defer routine work while you recover.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="sick-day">{% for field in sick_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save Sick Day settings</button></form></section>
|
||||
<section class="settings-card"><h2>Fasting</h2><form method="post">{% csrf_token %}<input type="hidden" name="section" value="fasting">{% for field in fasting_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save fasting settings</button></form></section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1 @@
|
||||
{% extends 'planner/base.html' %}{% block title %}{% if form.instance.pk %}Edit{% else %}Add{% endif %} workout · Tasknest{% endblock %}{% block content %}<div class="form-layout"><div class="form-layout__intro"><p class="eyebrow">Daily movement</p><h1>{% if form.instance.pk %}Edit workout{% else %}Add a workout{% endif %}</h1><p>Workouts are tracked separately from your task plan.</p></div>{% include 'planner/partials/workout_form_panel.html' %}</div>{% endblock %}
|
||||
@@ -0,0 +1,3 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
{% block title %}Log in · Tasknest{% endblock %}
|
||||
{% block content %}<section class="auth-panel"><p class="eyebrow">Welcome back</p><h1>Log in to Tasknest</h1><form method="post">{% csrf_token %}{{ form.non_field_errors }}{% for field in form %}<div class="form-field">{{ field.label_tag }}{{ field }}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Log in</button></form><p>New here? <a href="{% url 'planner:register' %}">Create an account</a>.</p></section>{% endblock %}
|
||||
Reference in New Issue
Block a user