Fix OAuth page

This commit is contained in:
Joren de Graaf
2026-10-19 16:51:53 +02:00
parent a8418cdba7
commit 743785c2e0
54 changed files with 1794 additions and 27 deletions
+14
View File
@@ -0,0 +1,14 @@
{% csrf_token %}
{% if form.non_field_errors %}<div class="stress-errors">{{ form.non_field_errors }}</div>{% endif %}
<div class="stress-form-grid">
{% for field in form %}
<div class="stress-field{% if field.name == 'narrative' or field.name == 'after_waking_notes' or field.name == 'interpretation' %} stress-field--wide{% endif %}">
{% if field.name == 'is_nightmare' %}<label>{{ field }} {{ field.label }}</label>{% else %}{{ field.label_tag }}{{ field }}{% endif %}
{% if field.name == 'wake_up_date' %}<small>Use the date you woke up, matching Health > Sleep.</small>{% endif %}
{% if field.name == 'tags_text' or field.name == 'emotions_text' %}<small>Separate terms with commas.</small>{% endif %}
{% if field.name == 'interpretation' %}<small>Your own interpretation, kept separate from what happened in the dream.</small>{% endif %}
{% for error in field.errors %}<p class="stress-errors">{{ error }}</p>{% endfor %}
</div>
{% endfor %}
</div>
<button class="button" type="submit">{{ submit_label }}</button>
+3
View File
@@ -0,0 +1,3 @@
{% extends 'planner/base.html' %}{% load static %}
{% block title %}{{ entry.title }} · Dream journal{% endblock %}
{% block content %}<link rel="stylesheet" href="{% static 'stress/stress.css' %}?v=1"><div class="stress-page stress-edit"><a href="{% url 'dreams:journal' %}">← Dream journal</a><article class="stress-panel"><p class="eyebrow">Private dream entry</p><h1>{{ entry.title }}</h1><p class="stress-muted">Woke {{ entry.wake_up_date|date:'j F Y' }}{% if entry.dreamed_at %} · Dreamed around <time datetime="{{ entry.dreamed_at|date:'c' }}">{{ entry.dreamed_at|date:'j M Y, H:i' }}</time>{% endif %}{% if entry.is_nightmare %} · Nightmare{% endif %}{% if entry.vividness is not None %} · Vividness {{ entry.vividness }}/10{% endif %}</p><h2>Dream</h2><p>{{ entry.narrative|linebreaksbr }}</p>{% if entry.tags %}<p class="stress-chips" aria-label="Themes">{% for tag in entry.tags %}<span>{{ tag }}</span>{% endfor %}</p>{% endif %}{% if entry.emotions %}<p><strong>Emotions:</strong> {{ entry.emotions|join:', ' }}</p>{% endif %}{% if entry.after_waking_notes %}<h2>After waking</h2><p>{{ entry.after_waking_notes|linebreaksbr }}</p>{% endif %}{% if entry.interpretation %}<h2>Your interpretation</h2><p>{{ entry.interpretation|linebreaksbr }}</p>{% endif %}<a class="button button--secondary" href="{% url 'dreams:edit' entry.pk %}">Edit dream</a></article></div>{% endblock %}
+3
View File
@@ -0,0 +1,3 @@
{% extends 'planner/base.html' %}{% load static %}
{% block title %}Edit dream · Tasknest{% endblock %}
{% block content %}<link rel="stylesheet" href="{% static 'stress/stress.css' %}?v=1"><div class="stress-page stress-edit"><a href="{% url 'dreams:detail' entry.pk %}">← Dream</a><section class="stress-panel"><h1>Edit dream</h1><form method="post">{% include 'dreams/_form.html' with submit_label='Save changes' %}</form></section><section class="stress-panel stress-delete"><h2>Delete dream</h2><p>This permanently removes this entry.</p><form method="post" action="{% url 'dreams:delete' entry.pk %}" onsubmit="return confirm('Delete this dream?')">{% csrf_token %}<button class="button button--secondary" type="submit">Delete dream</button></form></section></div>{% endblock %}
+15
View File
@@ -0,0 +1,15 @@
{% extends 'planner/base.html' %}{% load static %}
{% block title %}Dream journal · Tasknest{% endblock %}
{% block content %}
<link rel="stylesheet" href="{% static 'stress/stress.css' %}?v=1">
<div class="stress-page">
<header class="stress-header"><p class="eyebrow">Private journal</p><h1>Dream journal</h1><p>Record what you remember. Dream details and your own interpretation stay separate.</p></header>
<div class="stress-layout"><div class="stress-main">
<section class="stress-panel"><h2>Log a dream</h2><p class="stress-muted">Use the date you woke up. You can backdate entries and add details later.</p><form method="post">{% include 'dreams/_form.html' with submit_label='Save dream' %}</form></section>
<section class="stress-panel" id="dream-history"><h2>History</h2><form class="stress-filter" method="get" aria-label="Filter dream history"><label>Search dreams <input type="search" name="q" value="{{ query }}"></label>{% if selected_date %}<input type="hidden" name="date" value="{{ selected_date|date:'Y-m-d' }}">{% endif %}<button class="button button--secondary" type="submit">Filter</button>{% if query or selected_date %}<a href="{% url 'dreams:journal' %}">Clear filters</a>{% endif %}</form>
{% if selected_date %}<p>Dreams for {{ selected_date|date:'j F Y' }}.</p>{% endif %}
<ol class="stress-entries">{% for entry in entries %}<li class="stress-entry"><div class="stress-entry__top"><div><strong><a href="{% url 'dreams:detail' entry.pk %}">{{ entry.title }}</a></strong><time datetime="{{ entry.wake_up_date|date:'Y-m-d' }}">Woke {{ entry.wake_up_date|date:'j M Y' }}</time></div>{% if entry.is_nightmare %}<span class="stress-chips"><span>Nightmare</span></span>{% endif %}</div><p>{{ entry.narrative|truncatewords:45 }}</p>{% if entry.tags %}<p class="stress-chips" aria-label="Themes">{% for tag in entry.tags %}<span>{{ tag }}</span>{% endfor %}</p>{% endif %}</li>{% empty %}<li class="stress-empty">No dreams match this view.</li>{% endfor %}</ol>
</section>
</div><aside class="stress-side"><section class="stress-panel"><h2>Past 30 days</h2><p class="stress-muted">Choose a wake-up date to see its dreams.</p><div class="stress-calendar">{% for day in calendar %}<a href="?date={{ day.date|date:'Y-m-d' }}#dream-history" aria-label="{{ day.date|date:'j F Y' }}: {{ day.count }} dream{{ day.count|pluralize }}" class="{% if day.count %}has-entry{% endif %}{% if selected_date == day.date %} is-selected{% endif %}"><span>{{ day.date|date:'j' }}</span>{% if day.count %}<small>{{ day.count }}</small>{% endif %}</a>{% endfor %}</div></section></aside></div>
</div>
{% endblock %}