added light/dark mode toggle v1, unified menu

This commit is contained in:
Joren de Graaf
2026-10-01 17:14:19 +02:00
parent 884e2e8a11
commit 66db97b6f7
102 changed files with 1870 additions and 1365 deletions
+3 -9
View File
@@ -1,17 +1,11 @@
{% load vite %}
<!DOCTYPE html>
<html lang="en">
<html lang="en" data-theme="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page not found · Sound Signal</title>
<style>
:root { --ink:#eef3ff; --muted:#aab9d8; --line:#2b3d68; --violet:#b69cff; --blue:#8abaff; }
* { box-sizing:border-box; }
body { min-width:320px; min-height:100vh; display:grid; place-items:center; margin:0; padding:1.5rem; color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:radial-gradient(circle at 8% 0%,#263a76 0,transparent 31rem),radial-gradient(circle at 96% 100%,#512363 0,transparent 29rem),#090e1d; }
.card { width:min(100%,42rem); position:relative; overflow:hidden; padding:clamp(2rem,7vw,4.75rem); border:1px solid var(--line); border-radius:1.5rem; text-align:center; background:linear-gradient(145deg,#172443e8,#10182ddd); box-shadow:0 1.75rem 5rem #01030c99; backdrop-filter:blur(16px); }.card::before,.card::after { content:""; position:absolute; border-radius:50%; filter:blur(1px); pointer-events:none; }.card::before { width:14rem; height:14rem; top:-8rem; left:-5rem; background:#5888e536; }.card::after { width:11rem; height:11rem; right:-5rem; bottom:-5rem; background:#b069e73d; }
.mark { display:grid; width:4.25rem; aspect-ratio:1; place-items:center; margin:0 auto 1.75rem; border:1px solid #a7c7ff66; border-radius:1.1rem; color:#141c39; font-size:1.7rem; background:linear-gradient(135deg,#a8ceff,#c5b3ff); box-shadow:0 .65rem 1.75rem #735ee150; transform:rotate(8deg); }.mark span { transform:rotate(-8deg); }.code { margin:0; color:#bfcfff; font-size:.78rem; font-weight:900; letter-spacing:.2em; text-transform:uppercase; }.code strong { color:#f2d07f; }.title { max-width:10ch; margin:.75rem auto 1rem; font-size:clamp(2.5rem,8vw,5rem); line-height:.96; letter-spacing:-.065em; }.message { max-width:31rem; margin:0 auto; color:var(--muted); line-height:1.65; }.path { display:inline-block; max-width:100%; margin-top:1.1rem; padding:.45rem .7rem; overflow-wrap:anywhere; border:1px solid #354b7a; border-radius:.55rem; color:#c6d5f3; font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:.78rem; background:#0a1123; }.actions { display:flex; justify-content:center; gap:.75rem; flex-wrap:wrap; margin-top:2rem; }.button { display:inline-flex; align-items:center; justify-content:center; min-height:2.8rem; padding:.7rem 1rem; border:1px solid #455d92; border-radius:.75rem; color:#dce7ff; font-size:.92rem; font-weight:800; text-decoration:none; background:#1b2949; transition:transform .2s ease,background .2s ease; }.button:hover { transform:translateY(-2px); background:#263b69; }.button-primary { border-color:#b2c8ff; color:#121a34; background:linear-gradient(135deg,#97c5ff,#c2adff); }.button-primary:hover { background:linear-gradient(135deg,#b0d4ff,#d1c2ff); }
@media (prefers-reduced-motion:reduce) { .button { transition:none; } }
</style>
{% vite_asset "frontend/src/entries/not-found.js" %}
</head>
<body>
<main class="card">
@@ -1 +1,20 @@
{% extends "admin/fireworks_detect/classification_change_form.html" %}{% block after_field_sets %}{{ block.super }}{% if original.audio_file %}<section class="audio-preview"><style>.audio-preview{display:flex;align-items:center;gap:12px;margin:18px 0;padding:14px;border:1px solid #2b3d68;border-radius:10px;background:#14203a}.audio-play{display:inline-flex;align-items:center;gap:9px;border:0;border-radius:999px;padding:10px 15px!important;color:#121a34;font-weight:850;background:linear-gradient(135deg,#99c8ff,#c6adff);cursor:pointer}.audio-play__icon{display:grid;width:22px;height:22px;place-items:center;border-radius:50%;color:#fff;background:#172443}.audio-play.is-loading .audio-play__icon{color:transparent;border:2px solid #263a76;border-top-color:#fff;animation:audio-spin .7s linear infinite}.audio-status{color:#aab9d8;font-size:.85rem}@keyframes audio-spin{to{transform:rotate(360deg)}}</style><button class="audio-play" type="button" data-audio-url="{% url original.admin_audio_route original.pk %}"><span class="audio-play__icon">▶</span><span class="audio-play__label">Play recording</span></button><span class="audio-status" aria-live="polite">Loads only when played</span><audio preload="none"></audio></section><script>document.querySelectorAll('.audio-preview').forEach(function(box){var button=box.querySelector('.audio-play'),audio=box.querySelector('audio'),label=box.querySelector('.audio-play__label'),status=box.querySelector('.audio-status');button.addEventListener('click',function(){if(!audio.src){audio.src=button.dataset.audioUrl;button.classList.add('is-loading');status.textContent='Loading recording…';}if(audio.paused){audio.play().catch(function(){button.classList.remove('is-loading');status.textContent='Could not play this recording.';});}else{audio.pause();}});audio.addEventListener('playing',function(){button.classList.remove('is-loading');label.textContent='Pause recording';status.textContent='Playing now';});audio.addEventListener('pause',function(){if(!audio.ended){label.textContent='Resume recording';status.textContent='Paused';}});audio.addEventListener('ended',function(){label.textContent='Replay recording';status.textContent='Finished';});audio.addEventListener('waiting',function(){button.classList.add('is-loading');status.textContent='Buffering…';});audio.addEventListener('canplay',function(){button.classList.remove('is-loading');});audio.addEventListener('error',function(){button.classList.remove('is-loading');status.textContent='Could not load this recording.';});});</script>{% endif %}{% endblock %}
{% extends "admin/fireworks_detect/classification_change_form.html" %}
{% load vite %}
{% block extrahead %}
{{ block.super }}
{% vite_asset "frontend/src/entries/admin-audio-preview.js" %}
{% endblock %}
{% block after_field_sets %}
{{ block.super }}
{% if original.audio_file %}
<section class="audio-preview">
<button class="audio-play" type="button" data-audio-url="{% url original.admin_audio_route original.pk %}">
<span class="audio-play__icon">▶</span><span class="audio-play__label">Play recording</span>
</button>
<span class="audio-status" aria-live="polite">Loads only when played</span>
<audio preload="none"></audio>
</section>
{% endif %}
{% endblock %}
+1 -1
View File
@@ -1 +1 @@
{% load i18n %}<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{% translate 'Log in' %} · Sound Signal</title><style>:root{--ink:#edf3ff;--muted:#aab9d8;--line:#2b3d68;--danger:#ff9ea8}*{box-sizing:border-box}body{min-width:320px;min-height:100vh;display:grid;place-items:center;margin:0;padding:1.5rem;color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),radial-gradient(circle at 96% 100%,#512363,transparent 29rem),#090e1d}.card{width:min(100%,27rem);position:relative;overflow:hidden;padding:clamp(2rem,7vw,3.5rem);border:1px solid var(--line);border-radius:1.4rem;background:linear-gradient(145deg,#172443e8,#10182ddd);box-shadow:0 1.75rem 5rem #01030c99;backdrop-filter:blur(16px)}.card:before{content:"";width:12rem;height:12rem;position:absolute;top:-7rem;right:-5rem;border-radius:50%;background:#78a8ef45}.brand{display:flex;align-items:center;gap:.65rem;margin-bottom:2.7rem;font-size:.78rem;font-weight:900;letter-spacing:.14em;text-transform:uppercase}.mark{display:grid;width:2.25rem;aspect-ratio:1;place-items:center;border-radius:.72rem;color:#17132b;font-size:1.1rem;background:linear-gradient(135deg,#fcd34d,#fb7185);box-shadow:0 .5rem 1.5rem #fb718550}.eyebrow{margin:0;color:#bcd4ff;font-size:.75rem;font-weight:800;letter-spacing:.14em;text-transform:uppercase}h1{margin:.55rem 0 .75rem;font-size:clamp(2rem,7vw,3.2rem);line-height:1;letter-spacing:-.06em}.intro{margin:0 0 1.8rem;color:var(--muted);line-height:1.55}.error{margin:0 0 1rem;padding:.75rem;border:1px solid #994957;border-radius:.7rem;color:#ffd6da;font-size:.88rem;background:#551d2b70}label{display:block;margin:1rem 0 .4rem;color:#c7d6f4;font-size:.82rem;font-weight:800}input{width:100%;min-height:2.85rem;padding:.7rem .8rem;border:1px solid #3d5487;border-radius:.7rem;color:var(--ink);font:inherit;background:#0a1123}input:focus{outline:2px solid #9bc8ff;outline-offset:2px}button{width:100%;min-height:2.9rem;margin-top:1.5rem;border:1px solid #b3c9ff;border-radius:.75rem;color:#121a34;font:inherit;font-weight:850;background:linear-gradient(135deg,#99c8ff,#c6adff);box-shadow:0 .65rem 1.75rem #7058dd50;cursor:pointer;transition:transform .2s}button:hover{transform:translateY(-2px)}.foot{margin:1.5rem 0 0;color:#8498c1;font-size:.78rem;text-align:center}@media(prefers-reduced-motion:reduce){button{transition:none}}</style></head><body><main class="card"><div class="brand"><span class="mark">✦</span> Sound Signal</div><p class="eyebrow">Secure access</p><h1>Welcome back.</h1><p class="intro">Sign in to review pending audio samples and manage approved events.</p>{% if form.errors %}<div class="error">{% translate 'Your username and password did not match. Please try again.' %}</div>{% endif %}{% if user.is_authenticated %}<div class="error">{% blocktranslate trimmed %}You are authenticated as {{ username }}, but are not authorized to access this page. Would you like to log in to a different account?{% endblocktranslate %}</div>{% endif %}<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}<label for="{{ form.username.id_for_label }}">{% translate 'Username' %}</label>{{ form.username }}<label for="{{ form.password.id_for_label }}">{% translate 'Password' %}</label>{{ form.password }}{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}<button type="submit">{% translate 'Sign in' %} <span aria-hidden="true">→</span></button></form><p class="foot">Sound Signal administration</p></main></body></html>
{% load i18n vite %}<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{% translate 'Log in' %} · Sound Signal</title>{% vite_asset "frontend/src/entries/admin-login.js" %}</head><body><main class="card"><div class="brand"><span class="mark">✦</span> Sound Signal</div><p class="eyebrow">Secure access</p><h1>Welcome back.</h1><p class="intro">Sign in to review pending audio samples and manage approved events.</p>{% if form.errors %}<div class="error">{% translate 'Your username and password did not match. Please try again.' %}</div>{% endif %}{% if user.is_authenticated %}<div class="error">{% blocktranslate trimmed %}You are authenticated as {{ username }}, but are not authorized to access this page. Would you like to log in to a different account?{% endblocktranslate %}</div>{% endif %}<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}<label for="{{ form.username.id_for_label }}">{% translate 'Username' %}</label>{{ form.username }}<label for="{{ form.password.id_for_label }}">{% translate 'Password' %}</label>{{ form.password }}{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}<button type="submit">{% translate 'Sign in' %} <span aria-hidden="true">→</span></button></form><p class="foot">Sound Signal administration</p></main></body></html>