latest changes
This commit is contained in:
@@ -7,7 +7,8 @@
|
||||
<meta name="description" content="A calm, focused personal task planner.">
|
||||
<title>{% block title %}Tasknest{% endblock %}</title>
|
||||
{% vite_asset 'src/main.js' %}
|
||||
<link rel="stylesheet" href="{% static 'planner/nav_spacing.css' %}?v=1">
|
||||
<link rel="stylesheet" href="{% static 'planner/nav_spacing.css' %}?v=2">
|
||||
<script src="{% static 'planner/navigation.js' %}?v=1" defer></script>
|
||||
</head>
|
||||
<body data-theme="{{ user_appearance }}">
|
||||
<div class="app-shell">
|
||||
@@ -21,14 +22,12 @@
|
||||
<nav class="primary-nav" id="primary-navigation" aria-label="Primary navigation">
|
||||
<button class="mobile-nav-close" type="button" data-nav-close>Close menu <span aria-hidden="true">×</span></button>
|
||||
{% if user.is_authenticated %}
|
||||
<a href="{% url 'planner:task-list' %}">My tasks</a>
|
||||
<a id="daily-planner-nav" class="{% if onboarding_tour.target == 'daily-planner' %}onboarding-highlight{% endif %}" href="{% url 'planner:daily-planner' %}">Daily planner</a>
|
||||
<a id="health-nav" class="{% if onboarding_tour.target == 'wellbeing' %}onboarding-highlight{% endif %}" href="{% url 'planner:health' %}">Health</a>
|
||||
<a href="{% url 'stress:journal' %}"{% if request.resolver_match.namespace == 'stress' %} aria-current="page"{% endif %}>Stress</a>
|
||||
<a href="{% url 'dreams:journal' %}"{% if request.resolver_match.namespace == 'dreams' %} aria-current="page"{% endif %}>Dreams</a>
|
||||
<a href="{% url 'food:diary' %}">Food</a>
|
||||
<a href="{% url 'recipes:list' %}"{% if request.resolver_match.namespace == 'recipes' %} aria-current="page"{% endif %}>Recipes</a>
|
||||
<a href="{% url 'food:inventory' %}">Kitchen Inventory</a>
|
||||
{% for group in nav_groups %}
|
||||
<div class="nav-group{% if group.active %} nav-group--active{% endif %}" data-nav-group>
|
||||
<div class="nav-group__heading"><a href="{{ group.url }}"{% if group.parent_active %} aria-current="page"{% endif %}{% if group.key == 'health' %} id="health-nav" class="{% if onboarding_tour.target == 'wellbeing' %}onboarding-highlight{% endif %}"{% endif %}>{{ group.label }}</a><button type="button" class="nav-group__toggle" aria-label="Toggle {{ group.label }} submenu" aria-expanded="false" aria-controls="nav-submenu-{{ group.key }}" data-nav-submenu-toggle><span aria-hidden="true">⌄</span></button></div>
|
||||
<ul class="nav-submenu" id="nav-submenu-{{ group.key }}" data-nav-submenu hidden>{% for child in group.items %}<li><a href="{{ child.url }}"{% if child.active %} aria-current="page"{% endif %}{% if group.key == 'tasks' %} id="daily-planner-nav" class="{% if onboarding_tour.target == 'daily-planner' %}onboarding-highlight{% endif %}"{% endif %}>{{ child.label }}</a></li>{% endfor %}</ul>
|
||||
</div>
|
||||
{% endfor %}
|
||||
<a id="settings-nav" class="{% if onboarding_tour.target == 'settings' %}onboarding-highlight{% endif %}" href="{% url 'planner:user-settings' %}">Settings</a>
|
||||
<form method="post" action="{% url 'planner:user-settings' %}" class="theme-toggle">{% csrf_token %}<input type="hidden" name="section" value="appearance"><input type="hidden" name="next" value="{{ request.path }}">{% if user_appearance == 'dark' %}<input type="hidden" name="appearance" value="light"><button type="submit" aria-label="Use light mode" title="Use light mode"><span aria-hidden="true">☀</span><span class="sr-only">Use light mode</span></button>{% else %}<input type="hidden" name="appearance" value="dark"><button type="submit" aria-label="Use dark mode" title="Use dark mode"><span aria-hidden="true">☾</span><span class="sr-only">Use dark mode</span></button>{% endif %}</form>
|
||||
<form method="post" action="{% url 'planner:logout' %}" class="nav-logout">{% csrf_token %}<button type="submit">Log out</button></form>
|
||||
@@ -41,6 +40,7 @@
|
||||
</header>
|
||||
<div class="mobile-nav-backdrop" data-nav-backdrop hidden></div>
|
||||
<main class="page-content {% block page_class %}{% endblock %}">
|
||||
{% if is_demo_account %}<p class="flash-message" role="note">Shared demo account: other visitors can see edits you make here. Please do not enter personal information. Demo changes reset at midnight Amsterdam time.</p>{% endif %}
|
||||
{% if messages %}{% for message in messages %}<p class="flash-message" role="status">{{ message }}</p>{% endfor %}{% endif %}
|
||||
{% block content %}{% endblock %}
|
||||
</main>
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends 'planner/base.html' %}
|
||||
{% block title %}Form expired · Tasknest{% endblock %}
|
||||
{% block content %}
|
||||
<section class="settings-page">
|
||||
<p class="eyebrow">Please try again</p>
|
||||
<h1>This form expired</h1>
|
||||
<p>Your security cookie changed or this page was open for too long. Open a fresh page and submit again.</p>
|
||||
<p><a class="button" href="{% url 'planner:login' %}">Go to log in</a></p>
|
||||
</section>
|
||||
{% endblock %}
|
||||
@@ -5,11 +5,11 @@
|
||||
<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>First-run help</h2><p>{% if onboarding_enabled %}The guided tour is ready to continue on your dashboard.{% else %}Help is off. You can run the tour again whenever you want.{% endif %}</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="onboarding"><button class="button" type="submit" name="action" value="restart">Run feature tour</button><button class="text-link" type="submit" name="action" value="disable">Turn help off</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 %}{% if field.name == 'enabled' %}<div class="settings-switch-row"><label class="settings-switch"><span class="settings-switch__copy"><strong>Enable Sick Day Mode</strong><small>Give routine tasks a rest while you recover.</small></span>{{ field }}<span class="settings-switch__track" aria-hidden="true"></span></label>{{ field.errors }}</div>{% else %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endif %}{% endfor %}<button class="button" type="submit">Save Sick Day settings</button></form></section>
|
||||
{% if not is_demo_account %}<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>
|
||||
{% endif %}<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 %}{% if field.name == 'enabled' %}<div class="settings-switch-row"><label class="settings-switch"><span class="settings-switch__copy"><strong>Enable Sick Day Mode</strong><small>Give routine tasks a rest while you recover.</small></span>{{ field }}<span class="settings-switch__track" aria-hidden="true"></span></label>{{ field.errors }}</div>{% else %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endif %}{% endfor %}<button class="button" type="submit">Save Sick Day settings</button></form></section>
|
||||
<section class="settings-card"><h2>Hydration</h2><p>Set your daily fluid goal and how drinks are counted.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="hydration">{% for field in hydration_goal_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save hydration settings</button></form></section>
|
||||
<section class="settings-card"><h2>Food</h2><p>Set optional daily nutrition goals. Exercise calories do not change these goals.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="food">{% for field in food_goal_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save food goals</button></form></section>
|
||||
<section class="settings-card"><h2>API access</h2><p>Create scoped tokens for apps that need access to your food log or kitchen inventory.</p><a class="button" href="{% url 'food:tokens' %}">Manage API tokens</a></section>
|
||||
{% if not is_demo_account %}<section class="settings-card"><h2>API access</h2><p>Create scoped tokens for apps that need access to your food log or kitchen inventory.</p><a class="button" href="{% url 'food:tokens' %}">Manage API tokens</a></section>
|
||||
<section class="settings-card" aria-labelledby="ntfy-title">
|
||||
<h2 id="ntfy-title">Notifications / ntfy</h2>
|
||||
<p>Enter your private topic URL, test it, then enable notifications.</p>
|
||||
@@ -21,6 +21,6 @@
|
||||
<button class="button" type="submit">Save notification 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 %}{% if field.name == 'enabled' %}<div class="settings-switch-row"><label class="settings-switch"><span class="settings-switch__copy"><strong>Track fasting</strong><small>Show the daily fasting and eating timer.</small></span>{{ field }}<span class="settings-switch__track" aria-hidden="true"></span></label>{{ field.errors }}</div>{% else %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endif %}{% endfor %}<button class="button" type="submit">Save fasting settings</button></form></section>
|
||||
{% endif %}<section class="settings-card"><h2>Fasting</h2><form method="post">{% csrf_token %}<input type="hidden" name="section" value="fasting">{% for field in fasting_form %}{% if field.name == 'enabled' %}<div class="settings-switch-row"><label class="settings-switch"><span class="settings-switch__copy"><strong>Track fasting</strong><small>Show the daily fasting and eating timer.</small></span>{{ field }}<span class="settings-switch__track" aria-hidden="true"></span></label>{{ field.errors }}</div>{% else %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endif %}{% endfor %}<button class="button" type="submit">Save fasting settings</button></form></section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user