added light/dark mode toggle v1, unified menu
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
VITE_HOST=127.0.0.1
|
||||
VITE_PORT=5173
|
||||
VITE_DEV_SERVER_URL=http://127.0.0.1:5173/
|
||||
# Development-only Vite base; keep this aligned with VITE_DEV_SERVER_URL.
|
||||
VITE_DEV_BASE_URL=/
|
||||
VITE_USE_DEV_SERVER=true
|
||||
|
||||
# Django development process (override the whole command for uv, docker, etc.)
|
||||
@@ -9,6 +11,9 @@ DJANGO_HOST=127.0.0.1
|
||||
DJANGO_PORT=8000
|
||||
# DJANGO_DEV_COMMAND=python manage.py runserver 127.0.0.1:8000
|
||||
|
||||
# Vite discovers every .js file beneath VITE_ENTRY_DIR by default.
|
||||
VITE_ENTRY_DIR=frontend/src/entries
|
||||
|
||||
# Production build output and Django static namespace
|
||||
VITE_OUT_DIR=vite_integration/static/vite
|
||||
VITE_STATIC_PREFIX=vite
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# Portable Django + Vite integration
|
||||
|
||||
This repository did not previously contain Vite configuration, package scripts, a manifest, or Vite-aware Django templates. Its only asset setup was Django native static files. The files below add an isolated, reusable Vite integration without attaching any Vite bundle to existing pages.
|
||||
This repository originally used only Django native static files. The Vite integration below is now wired into the rendered public pages and custom Admin pages: shared assets live in `frontend/src/`, while Django still owns template rendering and its native static files.
|
||||
|
||||
## What is included
|
||||
|
||||
- `vite_integration/`: reusable Django app and `{% vite_asset %}` tag
|
||||
- `frontend/src/main.js`: replaceable example entry point
|
||||
- `frontend/src/entries/`: one Vite entry module per rendered page, with shared `styles/` and `scripts/` modules
|
||||
- `vite.config.mjs`: Vite output, manifest, host, port, and entry configuration
|
||||
- `package.json`: `dev`, `django`, `vite`, and `build` scripts
|
||||
- `scripts/dev-django.mjs`: configurable backend process for `concurrently`
|
||||
@@ -36,7 +36,7 @@ Choose an entry point and include it once in the relevant base template:
|
||||
|
||||
```django
|
||||
{% load vite %}
|
||||
{% vite_asset "frontend/src/main.js" %}
|
||||
{% vite_asset "frontend/src/entries/site.js" %}
|
||||
```
|
||||
|
||||
The tag renders Vite's HMR client and the entry point when `VITE_USE_DEV_SERVER=true`. Otherwise it reads Vite's manifest and renders the fingerprinted CSS and JavaScript under Django's static URL. See `vite_integration/templates/vite_integration/example_assets.html` for the same snippet.
|
||||
@@ -64,7 +64,7 @@ package.json
|
||||
.env.vite.example
|
||||
```
|
||||
|
||||
Then add `vite_integration` to `INSTALLED_APPS`, add the template tag to a base template, configure `STATIC_URL`/`STATIC_ROOT`, install npm packages, and use the development or production commands above. The integration contains no application names, routes, or backend URLs.
|
||||
Create `frontend/src/entries/site.js` (or another entry beneath `VITE_ENTRY_DIR`) that imports the page CSS and JavaScript. Then add `vite_integration` to `INSTALLED_APPS`, add the template tag to a base template, configure `STATIC_URL`/`STATIC_ROOT`, install npm packages, and use the development or production commands above. The integration contains no application names, routes, or backend URLs.
|
||||
|
||||
## Configuration values to customize
|
||||
|
||||
@@ -74,8 +74,10 @@ Then add `vite_integration` to `INSTALLED_APPS`, add the template tag to a base
|
||||
| `DJANGO_HOST`, `DJANGO_PORT` | `127.0.0.1`, `8000` | Default backend bind address |
|
||||
| `VITE_HOST`, `VITE_PORT` | `127.0.0.1`, `5173` | Vite bind address and port |
|
||||
| `VITE_DEV_SERVER_URL` | `http://127.0.0.1:5173/` | URL Django templates use for HMR |
|
||||
| `VITE_DEV_BASE_URL` | `/` | Development-only Vite base path |
|
||||
| `VITE_USE_DEV_SERVER` | `false` | Enables HMR tags; set only for development |
|
||||
| `VITE_ENTRY` | `frontend/src/main.js` | Vite Rollup entry point |
|
||||
| `VITE_ENTRY_DIR` | `frontend/src/entries` | Directory Vite scans for page entry points |
|
||||
| `VITE_ENTRY` | unset | Optional comma-separated explicit entry point list |
|
||||
| `VITE_OUT_DIR` | `vite_integration/static/vite` | Build output relative to project root |
|
||||
| `VITE_STATIC_PREFIX` | `vite` | Django static namespace for built files |
|
||||
| `VITE_BASE_URL` | `/static/vite/` | Public base URL emitted by Vite |
|
||||
|
||||
Binary file not shown.
@@ -1 +1,2 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Events · Sound Signal</title><script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script><style>:root{--i:#edf3ff;--m:#aab9d8;--l:#2b3d68}*{box-sizing:border-box}body{margin:0;min-height:100vh;padding:2rem;color:var(--i);font-family:system-ui;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.shell{width:min(100%,70rem);margin:auto}.top{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:3rem}.brand,a{color:inherit}.brand{text-decoration:none;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.top a:not(.brand){padding:.6rem .8rem;border:1px solid var(--l);border-radius:.6rem;text-decoration:none}.eyebrow{color:#bcd4ff;font-size:.76rem;letter-spacing:.15em;text-transform:uppercase;font-weight:800}h1{font-size:clamp(2.5rem,6vw,4.5rem);letter-spacing:-.06em;margin:.4rem 0}.lede{color:var(--m);max-width:38rem;line-height:1.6}.grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:1rem;margin-top:2rem}.panel{border:1px solid var(--l);border-radius:1rem;padding:1rem;background:#111a31d9}.event{width:100%;display:flex;justify-content:space-between;gap:.6rem;text-align:left;margin:.6rem 0;padding:.85rem;border:1px solid #374e7e;border-radius:.7rem;color:var(--i);background:#15223f;cursor:pointer}.event:hover{background:#20345f}.event small,.empty{color:var(--m)}.badge{color:#ffd08a}.detail h2{margin-top:0}.prediction{display:flex;justify-content:space-between;gap:1rem;padding:.65rem;margin:.45rem 0;border-left:3px solid #78a4f0;background:#111c34}.prediction--firework{border-color:#f5aa44}.prediction--speech{border-color:#fb7185}.meta{color:var(--m);font-size:.9rem}@media(max-width:42rem){body{padding:1rem}.grid{grid-template-columns:1fr}}</style></head><body><main class="shell"><header class="top"><a class="brand" href="{% url 'fireworks_detect:fireworks' %}">✦ Sound Signal</a><a href="{% url 'fireworks_detect:map' %}">Map</a></header><p class="eyebrow">Reviewed signal archive</p><h1>Approved events.</h1><p class="lede">This feed refreshes automatically every three seconds after a pending sample is approved in admin.</p><div class="grid"><section class="panel"><h2>Latest events</h2><div id="events-feed" hx-get="{% url 'fireworks_detect:events_list' %}" hx-trigger="load, every 3s" hx-swap="innerHTML"><p class="empty">Loading events…</p></div></section><section class="panel detail" id="event-detail"><h2>Select an event</h2><p class="empty">Choose an approved event to inspect its classification details.</p></section></div></main></body></html>
|
||||
{% load vite %}
|
||||
<!doctype html><html lang="en" data-theme="dark"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Events · Sound Signal</title><script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>{% vite_asset "frontend/src/entries/events.js" %}</head><body><main class="shell">{% include "fireworks_detect/includes/navigation.html" with active_page="events" %}<p class="eyebrow">Reviewed signal archive</p><h1>Approved events.</h1><p class="lede">This feed refreshes automatically every three seconds after a pending sample is approved in admin.</p><div class="grid"><section class="panel"><h2>Latest events</h2><div id="events-feed" hx-get="{% url 'fireworks_detect:events_list' %}" hx-trigger="load, every 3s" hx-swap="innerHTML"><p class="empty">Loading events…</p></div></section><section class="panel detail" id="event-detail"><h2>Select an event</h2><p class="empty">Choose an approved event to inspect its classification details.</p></section></div></main></body></html>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
{% if events %}
|
||||
{% for event in events %}
|
||||
<button class="event{% if event.source_type == 'manual' %} event--manual{% endif %}" {% if event.source_type == 'manual' %}style="border-color:#e2934a;background:linear-gradient(90deg,#70401e,#15223f);"{% endif %} hx-get="{% url 'fireworks_detect:event_detail' event.id %}" hx-target="#event-detail" hx-swap="innerHTML">
|
||||
<span>
|
||||
<button class="event {% if event.source_type == "manual" %}event--manual{% else %}event--sensor{% endif %}" hx-get="{% url 'fireworks_detect:event_detail' event.id %}" hx-target="#event-detail" hx-swap="innerHTML">
|
||||
<span class="event__content">
|
||||
{% if event.source_type == "manual" %}
|
||||
<span class="event__source">Manual report</span>
|
||||
<strong>Manual fireworks report</strong><br>
|
||||
<small>{{ event.occurrences }} occurrence{{ event.occurrences|pluralize }}{% if event.location %} · {{ event.location }}{% endif %}</small>
|
||||
{% else %}
|
||||
<span class="event__source">Sensor classification</span>
|
||||
<strong>{{ event.primary_label }}</strong><br>
|
||||
<small>{{ event.original_filename }} · {{ event.duration }}s</small>
|
||||
{% endif %}
|
||||
|
||||
@@ -1,503 +1,18 @@
|
||||
{% 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>Sound Signal · Fireworks detection</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
||||
<style>
|
||||
:root {
|
||||
--ink: #eaf0ff;
|
||||
--muted: #9caed1;
|
||||
--surface: #111a31;
|
||||
--surface-2: #17223e;
|
||||
--line: #2a3a61;
|
||||
--blue: #6aa8ff;
|
||||
--violet: #a78bfa;
|
||||
--fire: #ffb454;
|
||||
--danger: #ff727c;
|
||||
--success: #6ee7b7;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
background: radial-gradient(circle at 10% 0%, #263a76 0, transparent 30rem), radial-gradient(circle at 90% 20%, #4d236c 0, transparent 28rem), #090e1d;
|
||||
}
|
||||
|
||||
.shell {
|
||||
width: min(100% - 2.5rem, 70rem);
|
||||
margin: 0 auto;
|
||||
padding: clamp(2rem, 6vw, 5rem) 0;
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .75rem;
|
||||
/* margin-bottom: clamp(2.5rem, 6vw, 5rem); */
|
||||
font-size: .9rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
display: grid;
|
||||
width: 2.25rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .75rem;
|
||||
color: #141022;
|
||||
background: linear-gradient(135deg, #fcd34d, #fb7185);
|
||||
box-shadow: 0 .5rem 1.5rem #fb718550;
|
||||
}
|
||||
|
||||
.intro {
|
||||
max-width: 45rem;
|
||||
}
|
||||
|
||||
.kicker {
|
||||
margin: 0 0 .8rem;
|
||||
color: #bfdbfe;
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .15em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1 {
|
||||
max-width: 12ch;
|
||||
margin: 0;
|
||||
font-size: clamp(2.6rem, 7vw, 5.75rem);
|
||||
line-height: .96;
|
||||
letter-spacing: -.065em;
|
||||
}
|
||||
|
||||
.lede {
|
||||
max-width: 38rem;
|
||||
margin: 1.5rem 0 2.5rem;
|
||||
color: var(--muted);
|
||||
font-size: clamp(1rem, 2vw, 1.18rem);
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.upload-card,
|
||||
.results-card {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 1.5rem;
|
||||
background: linear-gradient(145deg, #162240d9, #0e162bdd);
|
||||
box-shadow: 0 1.5rem 4rem #02061680;
|
||||
backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.upload-card {
|
||||
padding: clamp(1rem, 3vw, 1.5rem);
|
||||
}
|
||||
|
||||
.drop-zone {
|
||||
display: grid;
|
||||
min-height: 16rem;
|
||||
place-items: center;
|
||||
padding: 2rem;
|
||||
border: 1.5px dashed #5d75aa;
|
||||
border-radius: 1rem;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, #1b2a4e80, #291c4b66);
|
||||
transition: .2s ease;
|
||||
}
|
||||
|
||||
.drop-zone:hover,
|
||||
.drop-zone.dragging {
|
||||
border-color: var(--blue);
|
||||
transform: translateY(-2px);
|
||||
background: #203360a8;
|
||||
}
|
||||
|
||||
.drop-zone:focus-within {
|
||||
outline: 3px solid #6aa8ff66;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.file-input {
|
||||
width: .1px;
|
||||
height: .1px;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
display: grid;
|
||||
width: 4rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
margin: 0 auto 1rem;
|
||||
border-radius: 50%;
|
||||
color: #dbeafe;
|
||||
font-size: 1.8rem;
|
||||
background: #4777c94d;
|
||||
}
|
||||
|
||||
.drop-zone strong {
|
||||
display: block;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.drop-zone span {
|
||||
display: block;
|
||||
margin-top: .4rem;
|
||||
color: var(--muted);
|
||||
font-size: .92rem;
|
||||
}
|
||||
|
||||
.file-name {
|
||||
min-height: 1.3rem;
|
||||
margin: 1rem 0 0;
|
||||
color: #c7d2fe;
|
||||
font-size: .9rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: .9rem .25rem 0;
|
||||
}
|
||||
|
||||
.file-note {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
button,
|
||||
.button {
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: .6rem;
|
||||
border: 0;
|
||||
border-radius: .8rem;
|
||||
padding: .85rem 1.15rem;
|
||||
cursor: pointer;
|
||||
color: #10172c;
|
||||
font: inherit;
|
||||
font-weight: 800;
|
||||
background: linear-gradient(135deg, #93c5fd, #c4b5fd);
|
||||
box-shadow: 0 .5rem 1.25rem #8b5cf640;
|
||||
transition: transform .2s ease, filter .2s ease;
|
||||
}
|
||||
|
||||
button:hover,
|
||||
.button:hover {
|
||||
transform: translateY(-1px);
|
||||
filter: brightness(1.08);
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
cursor: wait;
|
||||
filter: saturate(.4);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border: 2px solid #263253;
|
||||
border-top-color: currentColor;
|
||||
border-radius: 50%;
|
||||
animation: spin .75s linear infinite;
|
||||
}
|
||||
|
||||
.htmx-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.htmx-request.htmx-indicator {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.upload-form.htmx-request button {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#upload-status {
|
||||
min-height: 1.4rem;
|
||||
margin: 1rem .25rem 0;
|
||||
color: #c7d2fe;
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
.upload-form.htmx-request+#upload-status {
|
||||
color: #fcd34d;
|
||||
}
|
||||
|
||||
#classification-results {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.results-card {
|
||||
padding: clamp(1.25rem, 3vw, 2rem);
|
||||
animation: reveal .35s ease-out;
|
||||
}
|
||||
|
||||
.result-heading {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.result-heading h2 {
|
||||
margin: 0;
|
||||
font-size: clamp(1.4rem, 3vw, 2rem);
|
||||
letter-spacing: -.04em;
|
||||
}
|
||||
|
||||
.result-heading p {
|
||||
margin: .3rem 0 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.result-status {
|
||||
padding: .4rem .65rem;
|
||||
border-radius: 999px;
|
||||
color: #a7f3d0;
|
||||
font-size: .75rem;
|
||||
font-weight: 800;
|
||||
white-space: nowrap;
|
||||
background: #065f464d;
|
||||
}
|
||||
|
||||
.meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .6rem;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.meta span,
|
||||
.legend span {
|
||||
padding: .4rem .65rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
color: #bdc9e5;
|
||||
font-size: .8rem;
|
||||
background: #101a31;
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .5rem;
|
||||
margin: 0 0 1.25rem;
|
||||
}
|
||||
|
||||
.legend .firework {
|
||||
color: #ffd18c;
|
||||
border-color: #c7721e80;
|
||||
}
|
||||
|
||||
.legend .speech {
|
||||
color: #ffadb4;
|
||||
border-color: #d5485880;
|
||||
}
|
||||
.topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:3.5rem; }.brand { display:flex; align-items:center; gap:.7rem; color:var(--ink); font-size:.9rem; font-weight:800; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }.nav { display:flex; gap:.35rem; padding:.25rem; border:1px solid var(--line); border-radius:.75rem; background:#111a31a6; }.nav a { padding:.5rem .75rem; border-radius:.5rem; color:var(--muted); font-size:.86rem; font-weight:700; text-decoration:none; }.nav a[aria-current="page"] { color:var(--ink); background:#2a3b67; }
|
||||
|
||||
.result-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr);
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.result-group {
|
||||
padding: 1.1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 1rem;
|
||||
background: #0b1225a8;
|
||||
}
|
||||
|
||||
.result-group h3 {
|
||||
margin: 0 0 1rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.prediction-list {
|
||||
display: grid;
|
||||
gap: .75rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.prediction {
|
||||
--accent-color: #7799dd;
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: .45rem .75rem;
|
||||
align-items: center;
|
||||
padding: .7rem .75rem;
|
||||
overflow: hidden;
|
||||
border: 1px solid #26365b;
|
||||
border-left: 3px solid var(--accent-color);
|
||||
border-radius: .7rem;
|
||||
background: #121c34;
|
||||
}
|
||||
|
||||
.prediction--firework {
|
||||
--accent-color: var(--fire);
|
||||
background: linear-gradient(90deg, #7a421d55, #121c34);
|
||||
}
|
||||
|
||||
.prediction--speech {
|
||||
--accent-color: var(--danger);
|
||||
background: linear-gradient(90deg, #6c213055, #121c34);
|
||||
}
|
||||
|
||||
.prediction-label {
|
||||
min-width: 0;
|
||||
font-weight: 700;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.prediction-score {
|
||||
color: #c4d1ed;
|
||||
font-size: .85rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.score-bar {
|
||||
grid-column: 1/-1;
|
||||
height: .3rem;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: #263657;
|
||||
}
|
||||
|
||||
.score-bar i {
|
||||
display: block;
|
||||
width: calc(var(--score) * 1%);
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: var(--accent-color);
|
||||
}
|
||||
|
||||
.peak-list {
|
||||
display: grid;
|
||||
gap: .7rem;
|
||||
}
|
||||
|
||||
.peak-item {
|
||||
padding-bottom: .7rem;
|
||||
border-bottom: 1px solid #253453;
|
||||
}
|
||||
|
||||
.peak-item:last-child {
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.peak-time {
|
||||
color: #a9bce0;
|
||||
font-size: .78rem;
|
||||
}
|
||||
|
||||
.peak-item .prediction {
|
||||
margin-top: .35rem;
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.error-card {
|
||||
border-color: #a43d4d;
|
||||
background: linear-gradient(135deg, #4b1724dd, #1a1427dd);
|
||||
}
|
||||
|
||||
.error-card h2 {
|
||||
color: #fecdd3;
|
||||
}
|
||||
|
||||
.error-card p {
|
||||
color: #fecdd3;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes reveal {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(.75rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:42rem) {
|
||||
.shell {
|
||||
width: min(100% - 1.25rem, 70rem);
|
||||
}
|
||||
|
||||
.form-footer,
|
||||
.result-heading {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.form-footer button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.result-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.result-status {
|
||||
align-self: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion:reduce) {
|
||||
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
scroll-behavior: auto !important;
|
||||
animation-duration: .01ms !important;
|
||||
transition-duration: .01ms !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/fireworks-home.js" %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<main class="shell">
|
||||
<header class="topbar" style="display: flex">
|
||||
<a class="brand" href="{% url 'fireworks_detect:fireworks' %}"><span class="brand-mark">✦</span> Sound
|
||||
Signal</a>
|
||||
<nav class="nav" aria-label="Fireworks navigation">
|
||||
<a href="{% url 'fireworks_detect:fireworks' %}" aria-current="page">Analyse</a>
|
||||
<a href="{% url 'fireworks_detect:map' %}" >Map</a>
|
||||
</nav>
|
||||
</header>
|
||||
{% include "fireworks_detect/includes/navigation.html" with active_page="analyse" %}
|
||||
|
||||
|
||||
<section class="intro" aria-labelledby="page-title">
|
||||
@@ -536,36 +51,6 @@
|
||||
<p id="upload-status" role="status" aria-live="polite"></p>
|
||||
</section>
|
||||
</main>
|
||||
<script>
|
||||
const form = document.querySelector('.upload-form');
|
||||
const dropZone = document.querySelector('#drop-zone');
|
||||
const fileInput = document.querySelector('#audio-file');
|
||||
const fileName = document.querySelector('#file-name');
|
||||
const status = document.querySelector('#upload-status');
|
||||
const showFile = (file) => { fileName.textContent = file ? file.name : 'No file selected'; };
|
||||
|
||||
fileInput.addEventListener('change', () => showFile(fileInput.files[0]));
|
||||
['dragenter', 'dragover'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.add('dragging'); }));
|
||||
['dragleave', 'drop'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.remove('dragging'); }));
|
||||
dropZone.addEventListener('drop', (event) => { const [file] = event.dataTransfer.files; if (!file) return; fileInput.files = event.dataTransfer.files; showFile(file); });
|
||||
form.addEventListener('htmx:beforeRequest', () => { status.textContent = 'Analysing your recording…'; form.setAttribute('aria-busy', 'true'); });
|
||||
form.addEventListener('htmx:afterRequest', () => { status.textContent = ''; form.removeAttribute('aria-busy'); });
|
||||
form.addEventListener('htmx:responseError', () => { status.textContent = 'Analysis could not be completed.'; });
|
||||
document.body.addEventListener('htmx:beforeSwap', (event) => {
|
||||
if (event.detail.xhr.status >= 400) {
|
||||
event.detail.shouldSwap = true;
|
||||
event.detail.isError = false;
|
||||
}
|
||||
});
|
||||
window.addEventListener('pageshow', (event) => {
|
||||
if (event.persisted) {
|
||||
fileInput.value = '';
|
||||
showFile();
|
||||
status.textContent = '';
|
||||
document.querySelector('#classification-results').replaceChildren();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,11 @@
|
||||
<header class="fireworks-header">
|
||||
<a class="fireworks-brand" href="{% url "fireworks_detect:fireworks" %}"><span class="brand-mark">✦</span> Sound Signal</a>
|
||||
<div class="fireworks-header__controls">
|
||||
<nav class="fireworks-nav" aria-label="Fireworks navigation">
|
||||
<a href="{% url "fireworks_detect:fireworks" %}"{% if active_page == "analyse" %} aria-current="page"{% endif %}>Analyse</a>
|
||||
<a href="{% url "fireworks_detect:map" %}"{% if active_page == "map" %} aria-current="page"{% endif %}>Map</a>
|
||||
<a href="{% url "fireworks_detect:events" %}"{% if active_page == "events" %} aria-current="page"{% endif %}>Events</a>
|
||||
</nav>
|
||||
<button class="theme-toggle theme-toggle--inline" type="button" aria-label="Switch theme"></button>
|
||||
</div>
|
||||
</header>
|
||||
@@ -1,37 +1,16 @@
|
||||
{% 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>Signal map · Sound Signal</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css">
|
||||
<style>
|
||||
:root { --ink:#eef3ff; --muted:#a9b9d8; --surface:#111a31; --line:#2a3a61; --blue:#83b7ff; --violet:#b69cff; --amber:#ffbc61; --green:#6ee7b7; }
|
||||
* { box-sizing:border-box; }
|
||||
body { min-width:320px; min-height:100vh; margin:0; 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 32rem),radial-gradient(circle at 95% 0%,#492064 0,transparent 27rem),#090e1d; }
|
||||
.shell {
|
||||
width: min(100% - 2.5rem, 70rem);
|
||||
margin: 0 auto;
|
||||
padding: clamp(2rem, 6vw, 5rem) 0;
|
||||
}
|
||||
.topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:3.5rem; }.brand { display:flex; align-items:center; gap:.7rem; color:var(--ink); font-size:.9rem; font-weight:800; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }.nav { display:flex; gap:.35rem; padding:.25rem; border:1px solid var(--line); border-radius:.75rem; background:#111a31a6; }.nav a { padding:.5rem .75rem; border-radius:.5rem; color:var(--muted); font-size:.86rem; font-weight:700; text-decoration:none; }.nav a[aria-current="page"] { color:var(--ink); background:#2a3b67; }
|
||||
.kicker { margin:0 0 .65rem; color:#bfdbfe; font-size:.76rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }.headline { display:flex; align-items:end; justify-content:space-between; gap:2rem; margin-bottom:2rem; }.headline h1 { margin:0; font-size:clamp(2.3rem,5vw,4.5rem); line-height:.98; letter-spacing:-.06em; }.headline p { max-width:30rem; margin:0; color:var(--muted); line-height:1.6; }
|
||||
.filters { display:grid; grid-template-columns:repeat(5,minmax(8rem,1fr)) auto auto; gap:.75rem; align-items:end; margin-bottom:1rem; padding:1rem; border:1px solid var(--line); border-radius:1.1rem; background:#121d37d9; box-shadow:0 1rem 3rem #03071466; }.filter { display:grid; gap:.35rem; }.filter label { color:#9fb1d5; font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }.filter select,.filter input { width:100%; min-height:2.65rem; border:1px solid #354a77; border-radius:.65rem; padding:0 .75rem; color:var(--ink); font:inherit; background:#0c1428; }.filter select:focus,.filter input:focus { outline:2px solid #82b5ff; outline-offset:2px; }.filter-submit { min-height:2.65rem; border:1px solid #8ab7ff; border-radius:.65rem; padding:0 1rem; color:#101a31; font:inherit; font-weight:800; background:#b9d6ff; cursor:pointer; }.map-tag { align-self:center; padding:.46rem .65rem; border:1px solid #4a5f8e; border-radius:999px; color:#c9d8f6; font-size:.75rem; font-weight:700; white-space:nowrap; background:#1d2b4e; }
|
||||
.map-panel { overflow:hidden; border:1px solid var(--line); border-radius:1.25rem; background:var(--surface); box-shadow:0 1.5rem 4rem #0206168a; }.map-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.2rem; border-bottom:1px solid var(--line); }.map-header strong { font-size:.95rem; }.live { display:flex; align-items:center; gap:.45rem; color:#a7f3d0; font-size:.8rem; }.live i { width:.5rem; height:.5rem; border-radius:50%; background:var(--green); box-shadow:0 0 0 .25rem #34d3992e; }.map-wrap { position:relative; }.map { height:clamp(30rem,65vh,45rem); background:#dce4cf; }.legend { position:absolute; z-index:600; right:1rem; bottom:1rem; width:min(15rem,calc(100% - 2rem)); padding:.85rem; border:1px solid #344973; border-radius:.8rem; color:#dce7fe; font-size:.78rem; background:#101a31e8; box-shadow:0 .75rem 2rem #05091480; backdrop-filter:blur(10px); }.legend h2 { margin:0 0 .6rem; font-size:.82rem; }.legend div { display:flex; align-items:center; gap:.5rem; margin-top:.4rem; }.legend-dot { width:.7rem; height:.7rem; border:2px solid #f2c56b; border-radius:50%; background:#ed8e2e88; }.legend-ring { width:.85rem; height:.85rem; border:2px solid #a98af7; border-radius:50%; background:#8b5cf633; }.legend-line { width:1.1rem; border-top:2px dashed #644b9c; }.report-icon { display:grid; width:2.3rem; height:2.3rem; place-items:center; border:2px solid #fff3d5; border-radius:50%; color:#452000; font-size:1rem; font-weight:900; background:#f7a52f; box-shadow:0 .3rem 1rem #a84f2670; }.source-icon { display:grid; width:2.45rem; height:2.45rem; place-items:center; border:2px solid #fff3d5; border-radius:50% 50% 50% 0; color:#452000; font-size:1.15rem; background:#f7a52f; box-shadow:0 .3rem 1rem #a84f2670; transform:rotate(-45deg); }.source-icon span { transform:rotate(45deg); }.direction-marker { display:grid; width:3.5rem; height:3.5rem; place-items:center; border:3px solid #fff7e6; border-radius:50%; color:#fff; background:#6d45a0; box-shadow:0 .3rem 1rem #281642b3; }.direction-marker span { display:block; font-size:2.45rem; font-weight:950; line-height:1; text-shadow:0 .1rem .25rem #1e1136; transform-origin:center; }
|
||||
.map-compass { position:relative; width:5rem; height:5rem; border:2px solid #eaf1ff; border-radius:50%; color:#f7fbff; font-size:.72rem; font-weight:900; background:#111a31e8; box-shadow:0 .5rem 1.5rem #05091480; backdrop-filter:blur(8px); }.map-compass span { position:absolute; display:grid; place-items:center; }.map-compass .compass-n { top:.35rem; left:50%; transform:translateX(-50%); color:#ffd18c; }.map-compass .compass-e { top:50%; right:.45rem; transform:translateY(-50%); }.map-compass .compass-s { bottom:.35rem; left:50%; transform:translateX(-50%); }.map-compass .compass-w { top:50%; left:.45rem; transform:translateY(-50%); }.map-compass .compass-needle { top:1.3rem; left:50%; color:#ffd18c; font-size:2rem; line-height:1; transform:translateX(-50%); text-shadow:0 .1rem .35rem #3b1b48; }.leaflet-control-zoom a { color:#243456!important; }.leaflet-popup-content-wrapper,.leaflet-popup-tip { color:#e9f1ff; background:#14203a; }.leaflet-popup-content { margin:.75rem .9rem; font-family:inherit; }.popup-title { display:block; margin-bottom:.2rem; font-weight:800; }.popup-meta { color:#a9b9d8; font-size:.78rem; }
|
||||
@media (max-width:52rem) { .shell { width:min(100% - 1.25rem,80rem); }.topbar { margin-bottom:2.5rem; }.headline { align-items:start; flex-direction:column; gap:1rem; }.filters { grid-template-columns:1fr 1fr; }.filters .filter:first-child { grid-column:1/-1; }.map { height:32rem; } }
|
||||
@media (max-width:30rem) { .nav a { padding:.5rem; }.filters { grid-template-columns:1fr; }.filters .filter:first-child { grid-column:auto; } }
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/map.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="shell">
|
||||
<header class="topbar">
|
||||
<a class="brand" href="{% url 'fireworks_detect:fireworks' %}"><span class="brand-mark">✦</span> Sound Signal</a>
|
||||
<nav class="nav" aria-label="Fireworks navigation">
|
||||
<a href="{% url 'fireworks_detect:fireworks' %}">Analyse</a>
|
||||
<a href="{% url 'fireworks_detect:map' %}" aria-current="page">Map</a>
|
||||
</nav>
|
||||
</header>
|
||||
{% include "fireworks_detect/includes/navigation.html" with active_page="map" %}
|
||||
|
||||
<section class="headline" aria-labelledby="map-title">
|
||||
<div><p class="kicker">Manual report intelligence</p><h1 id="map-title">Sound activity map.</h1></div>
|
||||
@@ -50,7 +29,7 @@
|
||||
|
||||
<section class="map-panel" aria-label="Manual fireworks report map">
|
||||
<div class="map-header"><strong>Manual reports · privacy-preserving H3 cells</strong><span class="live"><i></i> H3 resolution {{ h3_resolution }} · sensor layer disabled</span></div>
|
||||
<div class="map-wrap"><div id="event-map" class="map" aria-label="Interactive map of manual fireworks reports"></div>
|
||||
<div class="map-wrap"><div id="event-map" class="map" data-h3-resolution="{{ h3_resolution }}" aria-label="Interactive map of manual fireworks reports"></div>
|
||||
<aside class="legend" aria-label="Map legend"><h2>Manual reports</h2><div><span class="legend-dot"></span> Report marker at H3-cell centre</div><div><span class="legend-ring"></span> H3 cell (resolution {{ h3_resolution }})</div><div><span class="legend-line"></span> Saved compass direction</div></aside>
|
||||
</div>
|
||||
</section>
|
||||
@@ -59,101 +38,5 @@
|
||||
{{ h3_cells|json_script:"h3-cells-data" }}
|
||||
{{ map_events|json_script:"map-events-data" }}
|
||||
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
|
||||
<script>
|
||||
const map = L.map("event-map", { zoomControl: false, scrollWheelZoom: false }).setView([52.1326, 5.2913], 7);
|
||||
L.control.zoom({ position: "bottomleft" }).addTo(map);
|
||||
const compassControl = L.control({ position: "topright" });
|
||||
compassControl.onAdd = () => {
|
||||
const compass = L.DomUtil.create("div", "map-compass");
|
||||
compass.setAttribute("role", "img");
|
||||
compass.setAttribute("aria-label", "Map compass: north is up");
|
||||
compass.innerHTML = "<span class=\"compass-n\">N</span><span class=\"compass-e\">E</span><span class=\"compass-s\">S</span><span class=\"compass-w\">W</span><span class=\"compass-needle\">↑</span>";
|
||||
L.DomEvent.disableClickPropagation(compass);
|
||||
return compass;
|
||||
};
|
||||
compassControl.addTo(map);
|
||||
L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png", {
|
||||
maxZoom: 18,
|
||||
attribution: "© OpenStreetMap contributors",
|
||||
}).addTo(map);
|
||||
|
||||
const h3Cells = JSON.parse(document.getElementById("h3-cells-data").textContent);
|
||||
const reports = JSON.parse(document.getElementById("map-events-data").textContent);
|
||||
const bounds = L.latLngBounds([]);
|
||||
|
||||
h3Cells.forEach((cell) => {
|
||||
const polygon = L.polygon(cell.boundary, {
|
||||
color: "#f59e0b", weight: 2, fillColor: "#f59e0b", fillOpacity: 0.25,
|
||||
}).addTo(map);
|
||||
polygon.bindPopup(
|
||||
"<span class=\"popup-title\">H3 " + cell.cell + "</span>" +
|
||||
"<span class=\"popup-meta\">" + cell.reports + " reports · " + cell.occurrences +
|
||||
" occurrences · resolution {{ h3_resolution }}</span>"
|
||||
);
|
||||
bounds.extend(L.latLngBounds(cell.boundary));
|
||||
});
|
||||
|
||||
function cardinalDirection(degrees) {
|
||||
const directions = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"];
|
||||
return directions[Math.floor(((degrees + 22.5) % 360) / 45)];
|
||||
}
|
||||
|
||||
function destinationPoint(origin, bearingDegrees, distanceMetres) {
|
||||
const earthRadius = 6378137;
|
||||
const bearing = bearingDegrees * Math.PI / 180;
|
||||
const latitude = origin[0] * Math.PI / 180;
|
||||
const longitude = origin[1] * Math.PI / 180;
|
||||
const angularDistance = distanceMetres / earthRadius;
|
||||
const targetLatitude = Math.asin(
|
||||
Math.sin(latitude) * Math.cos(angularDistance) +
|
||||
Math.cos(latitude) * Math.sin(angularDistance) * Math.cos(bearing)
|
||||
);
|
||||
const targetLongitude = longitude + Math.atan2(
|
||||
Math.sin(bearing) * Math.sin(angularDistance) * Math.cos(latitude),
|
||||
Math.cos(angularDistance) - Math.sin(latitude) * Math.sin(targetLatitude)
|
||||
);
|
||||
return [targetLatitude * 180 / Math.PI, targetLongitude * 180 / Math.PI];
|
||||
}
|
||||
|
||||
const reportIcon = L.divIcon({
|
||||
className: "", html: "<div class=\"report-icon\">✦</div>", iconSize: [37, 37], iconAnchor: [19, 19],
|
||||
});
|
||||
reports.forEach((report) => {
|
||||
const visualStatus = report.visually_confirmed ? "Visually confirmed" : "Not visually confirmed";
|
||||
let detail = report.occurrences + " occurrence" + (report.occurrences === 1 ? "" : "s") +
|
||||
" · " + visualStatus + "<br>Reported " + report.reported_on;
|
||||
if (report.direction_degrees !== null) {
|
||||
detail += "<br>Compass direction " + Math.round(report.direction_degrees) + "° (" + cardinalDirection(report.direction_degrees) + ")";
|
||||
if (report.direction_accuracy_degrees !== null) {
|
||||
detail += " (±" + Math.round(report.direction_accuracy_degrees) + "°)";
|
||||
}
|
||||
}
|
||||
L.marker(report.center, { icon: reportIcon }).addTo(map).bindPopup(
|
||||
"<span class=\"popup-title\">Manual report · H3 " + report.cell + "</span>" +
|
||||
"<span class=\"popup-meta\">" + detail + "</span>"
|
||||
);
|
||||
|
||||
if (report.direction_degrees !== null) {
|
||||
const arrowEnd = destinationPoint(report.center, report.direction_degrees, 900);
|
||||
L.polyline([report.center, arrowEnd], { color: "#fff7e6", weight: 9, opacity: 0.8 }).addTo(map);
|
||||
L.polyline([report.center, arrowEnd], { color: "#6d45a0", weight: 5, opacity: 1 }).addTo(map);
|
||||
const arrowIcon = L.divIcon({
|
||||
className: "",
|
||||
html: "<div class=\"direction-marker\"><span style=\"transform:rotate(" + report.direction_degrees + "deg)\">↑</span></div>",
|
||||
iconSize: [56, 56], iconAnchor: [28, 28],
|
||||
});
|
||||
L.marker(arrowEnd, { icon: arrowIcon, interactive: false }).addTo(map);
|
||||
}
|
||||
});
|
||||
|
||||
if (bounds.isValid()) {
|
||||
map.fitBounds(bounds.pad(0.18));
|
||||
}
|
||||
|
||||
const range = document.getElementById("range");
|
||||
document.querySelectorAll("#from-date, #to-date").forEach((input) => {
|
||||
input.addEventListener("change", () => { range.value = "custom"; });
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,48 +1,12 @@
|
||||
{% 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>Sound Signal · Fireworks detection</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
||||
<style>
|
||||
:root { --ink:#eaf0ff; --muted:#9caed1; --surface:#111a31; --surface-2:#17223e; --line:#2a3a61; --blue:#6aa8ff; --violet:#a78bfa; --fire:#ffb454; --danger:#ff727c; --success:#6ee7b7; }
|
||||
* { box-sizing:border-box; }
|
||||
body { min-width:320px; min-height:100vh; margin:0; color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:radial-gradient(circle at 10% 0%,#263a76 0,transparent 30rem),radial-gradient(circle at 90% 20%,#4d236c 0,transparent 28rem),#090e1d; }
|
||||
.shell { width:min(100% - 2.5rem,70rem); margin:0 auto; padding:clamp(2rem,6vw,5rem) 0; }
|
||||
.brand { display:flex; align-items:center; gap:.75rem; margin-bottom:clamp(2.5rem,6vw,5rem); font-size:.9rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
|
||||
.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }
|
||||
.intro { max-width:45rem; }
|
||||
.kicker { margin:0 0 .8rem; color:#bfdbfe; font-size:.78rem; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
|
||||
h1 { max-width:12ch; margin:0; font-size:clamp(2.6rem,7vw,5.75rem); line-height:.96; letter-spacing:-.065em; }
|
||||
.lede { max-width:38rem; margin:1.5rem 0 2.5rem; color:var(--muted); font-size:clamp(1rem,2vw,1.18rem); line-height:1.65; }
|
||||
.upload-card,.results-card { border:1px solid var(--line); border-radius:1.5rem; background:linear-gradient(145deg,#162240d9,#0e162bdd); box-shadow:0 1.5rem 4rem #02061680; backdrop-filter:blur(16px); }
|
||||
.upload-card { padding:clamp(1rem,3vw,1.5rem); }
|
||||
.drop-zone { display:grid; min-height:16rem; place-items:center; padding:2rem; border:1.5px dashed #5d75aa; border-radius:1rem; cursor:pointer; text-align:center; background:linear-gradient(135deg,#1b2a4e80,#291c4b66); transition:.2s ease; }
|
||||
.drop-zone:hover,.drop-zone.dragging { border-color:var(--blue); transform:translateY(-2px); background:#203360a8; }
|
||||
.drop-zone:focus-within { outline:3px solid #6aa8ff66; outline-offset:3px; }
|
||||
.file-input { width:.1px; height:.1px; position:absolute; opacity:0; overflow:hidden; }
|
||||
.upload-icon { display:grid; width:4rem; aspect-ratio:1; place-items:center; margin:0 auto 1rem; border-radius:50%; color:#dbeafe; font-size:1.8rem; background:#4777c94d; }
|
||||
.drop-zone strong { display:block; font-size:1.15rem; }
|
||||
.drop-zone span { display:block; margin-top:.4rem; color:var(--muted); font-size:.92rem; }
|
||||
.file-name { min-height:1.3rem; margin:1rem 0 0; color:#c7d2fe; font-size:.9rem; overflow-wrap:anywhere; }
|
||||
.form-footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.9rem .25rem 0; }
|
||||
.file-note { margin:0; color:var(--muted); font-size:.8rem; }
|
||||
button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; border:0; border-radius:.8rem; padding:.85rem 1.15rem; cursor:pointer; color:#10172c; font:inherit; font-weight:800; background:linear-gradient(135deg,#93c5fd,#c4b5fd); box-shadow:0 .5rem 1.25rem #8b5cf640; transition:transform .2s ease,filter .2s ease; }
|
||||
button:hover { transform:translateY(-1px); filter:brightness(1.08); } button:disabled { cursor:wait; filter:saturate(.4); transform:none; }
|
||||
.spinner { width:1rem; height:1rem; border:2px solid #263253; border-top-color:currentColor; border-radius:50%; animation:spin .75s linear infinite; }
|
||||
.htmx-indicator { display:none; }.htmx-request.htmx-indicator { display:inline-block; }.upload-form.htmx-request button { pointer-events:none; }
|
||||
#upload-status { min-height:1.4rem; margin:1rem .25rem 0; color:#c7d2fe; font-size:.9rem; } .upload-form.htmx-request + #upload-status { color:#fcd34d; }
|
||||
#classification-results { margin-top:1.5rem; }
|
||||
.results-card { padding:clamp(1.25rem,3vw,2rem); animation:reveal .35s ease-out; }
|
||||
.result-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; } .result-heading h2 { margin:0; font-size:clamp(1.4rem,3vw,2rem); letter-spacing:-.04em; }.result-heading p { margin:.3rem 0 0; color:var(--muted); }
|
||||
.result-status { padding:.4rem .65rem; border-radius:999px; color:#a7f3d0; font-size:.75rem; font-weight:800; white-space:nowrap; background:#065f464d; }
|
||||
.meta { display:flex; flex-wrap:wrap; gap:.6rem; margin:1.5rem 0; }.meta span,.legend span { padding:.4rem .65rem; border:1px solid var(--line); border-radius:999px; color:#bdc9e5; font-size:.8rem; background:#101a31; }.legend { display:flex; flex-wrap:wrap; gap:.5rem; margin:0 0 1.25rem; }.legend .firework { color:#ffd18c; border-color:#c7721e80; }.legend .speech { color:#ffadb4; border-color:#d5485880; }
|
||||
.result-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(18rem,.75fr); gap:1.25rem; }.result-group { padding:1.1rem; border:1px solid var(--line); border-radius:1rem; background:#0b1225a8; }.result-group h3 { margin:0 0 1rem; font-size:1rem; }.prediction-list { display:grid; gap:.75rem; margin:0; padding:0; list-style:none; }.prediction { --accent-color:#7799dd; position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.45rem .75rem; align-items:center; padding:.7rem .75rem; overflow:hidden; border:1px solid #26365b; border-left:3px solid var(--accent-color); border-radius:.7rem; background:#121c34; }.prediction--firework { --accent-color:var(--fire); background:linear-gradient(90deg,#7a421d55,#121c34); }.prediction--speech { --accent-color:var(--danger); background:linear-gradient(90deg,#6c213055,#121c34); }.prediction-label { min-width:0; font-weight:700; overflow-wrap:anywhere; }.prediction-score { color:#c4d1ed; font-size:.85rem; font-variant-numeric:tabular-nums; }.score-bar { grid-column:1/-1; height:.3rem; overflow:hidden; border-radius:999px; background:#263657; }.score-bar i { display:block; width:calc(var(--score) * 1%); height:100%; border-radius:inherit; background:var(--accent-color); }.peak-list { display:grid; gap:.7rem; }.peak-item { padding-bottom:.7rem; border-bottom:1px solid #253453; }.peak-item:last-child { padding-bottom:0; border-bottom:0; }.peak-time { color:#a9bce0; font-size:.78rem; }.peak-item .prediction { margin-top:.35rem; }.empty { margin:0; color:var(--muted); }.error-card { border-color:#a43d4d; background:linear-gradient(135deg,#4b1724dd,#1a1427dd); }.error-card h2 { color:#fecdd3; }.error-card p { color:#fecdd3; }
|
||||
@keyframes spin { to { transform:rotate(360deg); } } @keyframes reveal { from { opacity:0; transform:translateY(.75rem); } }
|
||||
@media (max-width:42rem) { .shell { width:min(100% - 1.25rem,70rem); }.form-footer,.result-heading { align-items:stretch; flex-direction:column; }.form-footer button { width:100%; }.result-grid { grid-template-columns:1fr; }.result-status { align-self:flex-start; } }
|
||||
@media (prefers-reduced-motion:reduce) { *,::before,::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/legacy-fireworks-home.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="shell">
|
||||
@@ -75,21 +39,5 @@
|
||||
|
||||
<section id="classification-results" aria-live="polite" aria-label="Classification results"></section>
|
||||
</main>
|
||||
<script>
|
||||
const form = document.querySelector('.upload-form');
|
||||
const dropZone = document.querySelector('#drop-zone');
|
||||
const fileInput = document.querySelector('#audio-file');
|
||||
const fileName = document.querySelector('#file-name');
|
||||
const status = document.querySelector('#upload-status');
|
||||
const showFile = (file) => { fileName.textContent = file ? file.name : 'No file selected'; };
|
||||
|
||||
fileInput.addEventListener('change', () => showFile(fileInput.files[0]));
|
||||
['dragenter', 'dragover'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.add('dragging'); }));
|
||||
['dragleave', 'drop'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.remove('dragging'); }));
|
||||
dropZone.addEventListener('drop', (event) => { const [file] = event.dataTransfer.files; if (!file) return; fileInput.files = event.dataTransfer.files; showFile(file); });
|
||||
form.addEventListener('htmx:beforeRequest', () => { status.textContent = 'Analysing your recording…'; form.setAttribute('aria-busy', 'true'); });
|
||||
form.addEventListener('htmx:afterRequest', () => { status.textContent = ''; form.removeAttribute('aria-busy'); });
|
||||
form.addEventListener('htmx:responseError', () => { status.textContent = 'Analysis could not be completed.'; });
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -115,16 +115,11 @@ class ManualPendingEventTests(TestCase):
|
||||
|
||||
self.assertContains(response, "Report fireworks now")
|
||||
self.assertContains(response, "I heard fireworks — send to Pending")
|
||||
self.assertContains(response, "navigator.geolocation")
|
||||
self.assertContains(response, "Capture direction")
|
||||
self.assertContains(response, "DeviceOrientationEvent.requestPermission")
|
||||
self.assertContains(response, 'manual-direction-panel" hidden')
|
||||
self.assertContains(response, "DeviceOrientationEvent.requestPermission(true)")
|
||||
self.assertContains(response, 'webkitCompassHeading" in event')
|
||||
self.assertContains(response, "direction will update live")
|
||||
self.assertContains(response, "Stop direction capture")
|
||||
|
||||
self.assertContains(response, "htmx.ajax")
|
||||
self.assertContains(response, "htmx.min.js")
|
||||
self.assertContains(response, "/static/vite/")
|
||||
self.assertContains(response, 'type="module"')
|
||||
def test_manual_event_appears_in_the_normal_event_list_with_its_details(self):
|
||||
event = Event.objects.create(
|
||||
original_filename="Manual fireworks report",
|
||||
@@ -189,9 +184,9 @@ class ManualPendingEventTests(TestCase):
|
||||
self.assertContains(response, "map-events-data")
|
||||
self.assertContains(response, manual_cell)
|
||||
self.assertContains(response, '"direction_degrees": 237.0')
|
||||
self.assertContains(response, "cardinalDirection(report.direction_degrees)")
|
||||
self.assertContains(response, "data-h3-resolution")
|
||||
self.assertContains(response, 'type="module"')
|
||||
self.assertContains(response, "sensor layer disabled")
|
||||
self.assertContains(response, "Map compass: north is up")
|
||||
self.assertContains(response, "Sensor events — coming soon")
|
||||
self.assertNotContains(response, sensor_cell)
|
||||
self.assertNotContains(response, "52.123456")
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
import "../styles/pages/admin-audio-preview.css";
|
||||
import "../scripts/admin-audio-preview.js";
|
||||
@@ -0,0 +1 @@
|
||||
import "../styles/pages/admin-login.css";
|
||||
@@ -0,0 +1,4 @@
|
||||
import "../styles/components/fireworks-navigation.css";
|
||||
import "../styles/pages/events.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
@@ -0,0 +1,5 @@
|
||||
import "../styles/components/fireworks-navigation.css";
|
||||
import "../styles/pages/fireworks-home.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/audio-upload.js";
|
||||
@@ -0,0 +1,4 @@
|
||||
import "../styles/pages/home.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/manual-report.js";
|
||||
@@ -0,0 +1,4 @@
|
||||
import "../styles/pages/legacy-fireworks-home.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/legacy-audio-upload.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
import "../styles/pages/login.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
@@ -0,0 +1,5 @@
|
||||
import "../styles/components/fireworks-navigation.css";
|
||||
import "../styles/pages/map.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/event-map.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
import "../styles/pages/member-form.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
import "../styles/pages/member-list.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
import "../styles/pages/member-success.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
@@ -0,0 +1,3 @@
|
||||
import "../styles/pages/not-found.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
@@ -0,0 +1,4 @@
|
||||
import "../styles/pages/settings.css";
|
||||
import "../styles/theme.css";
|
||||
import "../scripts/theme.js";
|
||||
import "../scripts/user-settings.js";
|
||||
@@ -0,0 +1 @@
|
||||
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.';});});
|
||||
@@ -0,0 +1,30 @@
|
||||
|
||||
const form = document.querySelector('.upload-form');
|
||||
const dropZone = document.querySelector('#drop-zone');
|
||||
const fileInput = document.querySelector('#audio-file');
|
||||
const fileName = document.querySelector('#file-name');
|
||||
const status = document.querySelector('#upload-status');
|
||||
const showFile = (file) => { fileName.textContent = file ? file.name : 'No file selected'; };
|
||||
|
||||
fileInput.addEventListener('change', () => showFile(fileInput.files[0]));
|
||||
['dragenter', 'dragover'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.add('dragging'); }));
|
||||
['dragleave', 'drop'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.remove('dragging'); }));
|
||||
dropZone.addEventListener('drop', (event) => { const [file] = event.dataTransfer.files; if (!file) return; fileInput.files = event.dataTransfer.files; showFile(file); });
|
||||
form.addEventListener('htmx:beforeRequest', () => { status.textContent = 'Analysing your recording…'; form.setAttribute('aria-busy', 'true'); });
|
||||
form.addEventListener('htmx:afterRequest', () => { status.textContent = ''; form.removeAttribute('aria-busy'); });
|
||||
form.addEventListener('htmx:responseError', () => { status.textContent = 'Analysis could not be completed.'; });
|
||||
document.body.addEventListener('htmx:beforeSwap', (event) => {
|
||||
if (event.detail.xhr.status >= 400) {
|
||||
event.detail.shouldSwap = true;
|
||||
event.detail.isError = false;
|
||||
}
|
||||
});
|
||||
window.addEventListener('pageshow', (event) => {
|
||||
if (event.persisted) {
|
||||
fileInput.value = '';
|
||||
showFile();
|
||||
status.textContent = '';
|
||||
document.querySelector('#classification-results').replaceChildren();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
|
||||
const mapElement = document.getElementById("event-map");
|
||||
const h3Resolution = mapElement.dataset.h3Resolution;
|
||||
const map = L.map(mapElement, { zoomControl: false, scrollWheelZoom: false }).setView([52.1326, 5.2913], 7);
|
||||
L.control.zoom({ position: "bottomleft" }).addTo(map);
|
||||
const compassControl = L.control({ position: "topright" });
|
||||
compassControl.onAdd = () => {
|
||||
const compass = L.DomUtil.create("div", "map-compass");
|
||||
compass.setAttribute("role", "img");
|
||||
compass.setAttribute("aria-label", "Map compass: north is up");
|
||||
compass.innerHTML = "<span class=\"compass-n\">N</span><span class=\"compass-e\">E</span><span class=\"compass-s\">S</span><span class=\"compass-w\">W</span><span class=\"compass-needle\">↑</span>";
|
||||
L.DomEvent.disableClickPropagation(compass);
|
||||
return compass;
|
||||
};
|
||||
compassControl.addTo(map);
|
||||
L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png", {
|
||||
maxZoom: 18,
|
||||
attribution: "© OpenStreetMap contributors",
|
||||
}).addTo(map);
|
||||
|
||||
const h3Cells = JSON.parse(document.getElementById("h3-cells-data").textContent);
|
||||
const reports = JSON.parse(document.getElementById("map-events-data").textContent);
|
||||
const bounds = L.latLngBounds([]);
|
||||
|
||||
h3Cells.forEach((cell) => {
|
||||
const polygon = L.polygon(cell.boundary, {
|
||||
color: "#f59e0b", weight: 2, fillColor: "#f59e0b", fillOpacity: 0.25,
|
||||
}).addTo(map);
|
||||
polygon.bindPopup(
|
||||
"<span class=\"popup-title\">H3 " + cell.cell + "</span>" +
|
||||
"<span class=\"popup-meta\">" + cell.reports + " reports · " + cell.occurrences +
|
||||
" occurrences · resolution " + h3Resolution + "</span>"
|
||||
);
|
||||
bounds.extend(L.latLngBounds(cell.boundary));
|
||||
});
|
||||
|
||||
function cardinalDirection(degrees) {
|
||||
const directions = ["N", "NE", "E", "SE", "S", "SW", "W", "NW"];
|
||||
return directions[Math.floor(((degrees + 22.5) % 360) / 45)];
|
||||
}
|
||||
|
||||
function destinationPoint(origin, bearingDegrees, distanceMetres) {
|
||||
const earthRadius = 6378137;
|
||||
const bearing = bearingDegrees * Math.PI / 180;
|
||||
const latitude = origin[0] * Math.PI / 180;
|
||||
const longitude = origin[1] * Math.PI / 180;
|
||||
const angularDistance = distanceMetres / earthRadius;
|
||||
const targetLatitude = Math.asin(
|
||||
Math.sin(latitude) * Math.cos(angularDistance) +
|
||||
Math.cos(latitude) * Math.sin(angularDistance) * Math.cos(bearing)
|
||||
);
|
||||
const targetLongitude = longitude + Math.atan2(
|
||||
Math.sin(bearing) * Math.sin(angularDistance) * Math.cos(latitude),
|
||||
Math.cos(angularDistance) - Math.sin(latitude) * Math.sin(targetLatitude)
|
||||
);
|
||||
return [targetLatitude * 180 / Math.PI, targetLongitude * 180 / Math.PI];
|
||||
}
|
||||
|
||||
const reportIcon = L.divIcon({
|
||||
className: "", html: "<div class=\"report-icon\">✦</div>", iconSize: [37, 37], iconAnchor: [19, 19],
|
||||
});
|
||||
reports.forEach((report) => {
|
||||
const visualStatus = report.visually_confirmed ? "Visually confirmed" : "Not visually confirmed";
|
||||
let detail = report.occurrences + " occurrence" + (report.occurrences === 1 ? "" : "s") +
|
||||
" · " + visualStatus + "<br>Reported " + report.reported_on;
|
||||
if (report.direction_degrees !== null) {
|
||||
detail += "<br>Compass direction " + Math.round(report.direction_degrees) + "° (" + cardinalDirection(report.direction_degrees) + ")";
|
||||
if (report.direction_accuracy_degrees !== null) {
|
||||
detail += " (±" + Math.round(report.direction_accuracy_degrees) + "°)";
|
||||
}
|
||||
}
|
||||
L.marker(report.center, { icon: reportIcon }).addTo(map).bindPopup(
|
||||
"<span class=\"popup-title\">Manual report · H3 " + report.cell + "</span>" +
|
||||
"<span class=\"popup-meta\">" + detail + "</span>"
|
||||
);
|
||||
|
||||
if (report.direction_degrees !== null) {
|
||||
const arrowEnd = destinationPoint(report.center, report.direction_degrees, 900);
|
||||
L.polyline([report.center, arrowEnd], { color: "#fff7e6", weight: 9, opacity: 0.8 }).addTo(map);
|
||||
L.polyline([report.center, arrowEnd], { color: "#6d45a0", weight: 5, opacity: 1 }).addTo(map);
|
||||
const arrowIcon = L.divIcon({
|
||||
className: "",
|
||||
html: "<div class=\"direction-marker\"><span style=\"transform:rotate(" + report.direction_degrees + "deg)\">↑</span></div>",
|
||||
iconSize: [56, 56], iconAnchor: [28, 28],
|
||||
});
|
||||
L.marker(arrowEnd, { icon: arrowIcon, interactive: false }).addTo(map);
|
||||
}
|
||||
});
|
||||
|
||||
if (bounds.isValid()) {
|
||||
map.fitBounds(bounds.pad(0.18));
|
||||
}
|
||||
|
||||
const range = document.getElementById("range");
|
||||
document.querySelectorAll("#from-date, #to-date").forEach((input) => {
|
||||
input.addEventListener("change", () => { range.value = "custom"; });
|
||||
});
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
const form = document.querySelector('.upload-form');
|
||||
const dropZone = document.querySelector('#drop-zone');
|
||||
const fileInput = document.querySelector('#audio-file');
|
||||
const fileName = document.querySelector('#file-name');
|
||||
const status = document.querySelector('#upload-status');
|
||||
const showFile = (file) => { fileName.textContent = file ? file.name : 'No file selected'; };
|
||||
|
||||
fileInput.addEventListener('change', () => showFile(fileInput.files[0]));
|
||||
['dragenter', 'dragover'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.add('dragging'); }));
|
||||
['dragleave', 'drop'].forEach((eventName) => dropZone.addEventListener(eventName, (event) => { event.preventDefault(); dropZone.classList.remove('dragging'); }));
|
||||
dropZone.addEventListener('drop', (event) => { const [file] = event.dataTransfer.files; if (!file) return; fileInput.files = event.dataTransfer.files; showFile(file); });
|
||||
form.addEventListener('htmx:beforeRequest', () => { status.textContent = 'Analysing your recording…'; form.setAttribute('aria-busy', 'true'); });
|
||||
form.addEventListener('htmx:afterRequest', () => { status.textContent = ''; form.removeAttribute('aria-busy'); });
|
||||
form.addEventListener('htmx:responseError', () => { status.textContent = 'Analysis could not be completed.'; });
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
|
||||
const manualForm = document.querySelector("#manual-report-form");
|
||||
const manualSubmit = document.querySelector("#manual-submit");
|
||||
const manualStatus = document.querySelector("#manual-submission");
|
||||
const latitude = document.querySelector("#manual-latitude");
|
||||
const longitude = document.querySelector("#manual-longitude");
|
||||
const directionDegrees = document.querySelector("#manual-direction-degrees");
|
||||
const directionAccuracy = document.querySelector("#manual-direction-accuracy");
|
||||
const captureDirectionButton = document.querySelector("#manual-capture-direction");
|
||||
const directionStatus = document.querySelector("#manual-direction-status");
|
||||
const directionPanel = document.querySelector("#manual-direction-panel");
|
||||
const isMobileDevice = /Android|iPhone|iPad|iPod|IEMobile|Opera Mini/.test(navigator.userAgent)
|
||||
|| (navigator.userAgent.includes("Macintosh") && navigator.maxTouchPoints > 1);
|
||||
if (isMobileDevice) directionPanel.hidden = false;
|
||||
let orientationListener;
|
||||
let compassUnavailableTimeout;
|
||||
|
||||
const isUsableNumber = (value) => Number.isFinite(value);
|
||||
const cardinalDirection = (heading) => ["N", "NE", "E", "SE", "S", "SW", "W", "NW"][Math.floor(((heading + 22.5) % 360) / 45)];
|
||||
const displayDegrees = (value) => Number(value.toFixed(1)).toString();
|
||||
|
||||
const stopCompassReading = () => {
|
||||
if (orientationListener) window.removeEventListener("deviceorientation", orientationListener);
|
||||
window.clearTimeout(compassUnavailableTimeout);
|
||||
orientationListener = null;
|
||||
compassUnavailableTimeout = null;
|
||||
};
|
||||
|
||||
const showCapturedDirection = (heading, accuracy) => {
|
||||
const accuracyText = accuracy === null ? "Accuracy unavailable" : "Accuracy: ±" + displayDegrees(accuracy) + "°";
|
||||
directionStatus.innerHTML = "<strong>" + displayDegrees(heading) + "° · " + cardinalDirection(heading) + "</strong><br>" + accuracyText;
|
||||
captureDirectionButton.textContent = "Stop direction capture";
|
||||
};
|
||||
|
||||
const listenForCompassReading = () => {
|
||||
stopCompassReading();
|
||||
directionStatus.textContent = "Point the top of your phone toward the sound — direction will update live.";
|
||||
orientationListener = (event) => {
|
||||
const isWebKitCompass = "webkitCompassHeading" in event;
|
||||
const heading = isUsableNumber(event.webkitCompassHeading)
|
||||
? event.webkitCompassHeading
|
||||
: !isWebKitCompass && event.absolute && isUsableNumber(event.alpha)
|
||||
? (360 - event.alpha) % 360
|
||||
: null;
|
||||
if (heading === null || heading < 0 || heading >= 360) return;
|
||||
|
||||
const accuracy = isUsableNumber(event.webkitCompassAccuracy) && event.webkitCompassAccuracy >= 0
|
||||
? event.webkitCompassAccuracy
|
||||
: null;
|
||||
directionDegrees.value = heading;
|
||||
directionAccuracy.value = accuracy === null ? "" : accuracy;
|
||||
showCapturedDirection(heading, accuracy);
|
||||
window.clearTimeout(compassUnavailableTimeout);
|
||||
};
|
||||
window.addEventListener("deviceorientation", orientationListener);
|
||||
compassUnavailableTimeout = window.setTimeout(() => {
|
||||
stopCompassReading();
|
||||
captureDirectionButton.textContent = "Capture direction";
|
||||
directionStatus.textContent = "Compass unavailable on this device.";
|
||||
}, 15000);
|
||||
};
|
||||
|
||||
const captureDirection = async () => {
|
||||
if (orientationListener) {
|
||||
stopCompassReading();
|
||||
captureDirectionButton.textContent = "Capture again";
|
||||
return;
|
||||
}
|
||||
if (!window.isSecureContext) {
|
||||
directionStatus.textContent = "Compass capture requires a secure HTTPS connection.";
|
||||
return;
|
||||
}
|
||||
if (typeof window.DeviceOrientationEvent === "undefined") {
|
||||
directionStatus.textContent = "Compass unavailable on this device.";
|
||||
return;
|
||||
}
|
||||
if (typeof DeviceOrientationEvent.requestPermission === "function") {
|
||||
directionStatus.textContent = "Requesting compass permission…";
|
||||
try {
|
||||
if (await DeviceOrientationEvent.requestPermission(true) !== "granted") {
|
||||
directionStatus.textContent = "Compass permission denied.";
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
directionStatus.textContent = "Compass permission denied.";
|
||||
return;
|
||||
}
|
||||
}
|
||||
listenForCompassReading();
|
||||
};
|
||||
|
||||
const submitManualReport = () => {
|
||||
stopCompassReading();
|
||||
manualSubmit.disabled = true;
|
||||
if (window.htmx) {
|
||||
htmx.ajax("POST", manualForm.action, {
|
||||
source: manualForm,
|
||||
target: "#manual-submission",
|
||||
swap: "outerHTML",
|
||||
});
|
||||
} else {
|
||||
manualForm.submit();
|
||||
}
|
||||
};
|
||||
|
||||
captureDirectionButton.addEventListener("click", captureDirection);
|
||||
manualSubmit.addEventListener("click", () => {
|
||||
if (!navigator.geolocation) {
|
||||
submitManualReport();
|
||||
return;
|
||||
}
|
||||
manualStatus.textContent = "Requesting your optional location…";
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => {
|
||||
latitude.value = position.coords.latitude;
|
||||
longitude.value = position.coords.longitude;
|
||||
submitManualReport();
|
||||
},
|
||||
() => submitManualReport(),
|
||||
{ enableHighAccuracy: false, maximumAge: 300000, timeout: 10000 },
|
||||
);
|
||||
});
|
||||
document.body.addEventListener("htmx:afterRequest", (event) => {
|
||||
if (event.detail.elt === manualForm) manualSubmit.disabled = false;
|
||||
});
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
const storageKey = "sound-signal-theme";
|
||||
const themes = new Set(["dark", "light"]);
|
||||
|
||||
function savedTheme() {
|
||||
try {
|
||||
const value = window.localStorage.getItem(storageKey);
|
||||
return themes.has(value) ? value : "dark";
|
||||
} catch {
|
||||
return "dark";
|
||||
}
|
||||
}
|
||||
|
||||
function applyTheme(theme, button) {
|
||||
document.documentElement.dataset.theme = theme;
|
||||
if (!button) return;
|
||||
const nextTheme = theme === "dark" ? "light" : "dark";
|
||||
button.textContent = nextTheme === "light" ? "☀ Light mode" : "☾ Dark mode";
|
||||
button.setAttribute("aria-label", "Switch to " + nextTheme + " mode");
|
||||
button.setAttribute("aria-pressed", String(theme === "light"));
|
||||
}
|
||||
|
||||
function installThemeToggle() {
|
||||
const button = document.querySelector(".theme-toggle") ?? document.createElement("button");
|
||||
if (!button.isConnected) {
|
||||
button.className = "theme-toggle";
|
||||
button.type = "button";
|
||||
document.body.append(button);
|
||||
}
|
||||
applyTheme(savedTheme(), button);
|
||||
button.addEventListener("click", () => {
|
||||
const nextTheme = document.documentElement.dataset.theme === "dark" ? "light" : "dark";
|
||||
try { window.localStorage.setItem(storageKey, nextTheme); } catch {}
|
||||
applyTheme(nextTheme, button);
|
||||
});
|
||||
}
|
||||
|
||||
applyTheme(savedTheme());
|
||||
if (document.readyState === "loading") {
|
||||
document.addEventListener("DOMContentLoaded", installThemeToggle, { once: true });
|
||||
} else {
|
||||
installThemeToggle();
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
document.querySelector("#ntfy-url").addEventListener("input", () => { document.querySelector("#ntfy-test-result").replaceChildren(); });
|
||||
@@ -0,0 +1,77 @@
|
||||
.fireworks-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
margin-bottom: 3.5rem;
|
||||
}
|
||||
.fireworks-brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .7rem;
|
||||
color: var(--ink, var(--i, #eef3ff));
|
||||
font-size: .9rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .1em;
|
||||
text-decoration: none;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.fireworks-header .brand-mark {
|
||||
display: grid;
|
||||
width: 2.25rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .75rem;
|
||||
color: #141022;
|
||||
background: linear-gradient(135deg, #fcd34d, #fb7185);
|
||||
box-shadow: 0 .5rem 1.5rem #fb718550;
|
||||
}
|
||||
.fireworks-header__controls { display: flex; align-items: center; gap: .65rem; }
|
||||
.fireworks-nav {
|
||||
display: flex;
|
||||
gap: .3rem;
|
||||
padding: .25rem;
|
||||
border: 1px solid var(--line, var(--l, #2b3d68));
|
||||
border-radius: .75rem;
|
||||
background: #111a31d9;
|
||||
box-shadow: 0 .5rem 1.5rem #03071440;
|
||||
}
|
||||
.fireworks-nav a {
|
||||
padding: .5rem .75rem;
|
||||
border-radius: .5rem;
|
||||
color: var(--muted, var(--m, #aab9d8));
|
||||
font-size: .86rem;
|
||||
font-weight: 750;
|
||||
text-decoration: none;
|
||||
}
|
||||
.fireworks-nav a:hover { color: var(--ink, var(--i, #eef3ff)); background: #20345f; }
|
||||
.fireworks-nav a[aria-current="page"] { color: var(--ink, var(--i, #eef3ff)); background: #2a3b67; }
|
||||
.theme-toggle--inline {
|
||||
position: static;
|
||||
flex: 0 0 auto;
|
||||
min-height: 2.35rem;
|
||||
padding: .45rem .7rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
:root[data-theme="light"] .fireworks-nav {
|
||||
border-color: #cbd9ed;
|
||||
background: #edf4ff;
|
||||
box-shadow: 0 .45rem 1.25rem rgba(34, 68, 117, .12);
|
||||
}
|
||||
:root[data-theme="light"] .fireworks-nav a { color: #47617f; }
|
||||
:root[data-theme="light"] .fireworks-nav a:hover { color: #234a7b; background: #dceaff; }
|
||||
:root[data-theme="light"] .fireworks-nav a[aria-current="page"] {
|
||||
color: #173d6a;
|
||||
background: #cfe3ff;
|
||||
box-shadow: inset 0 0 0 1px #9cc0ed;
|
||||
}
|
||||
@media (max-width: 44rem) {
|
||||
.fireworks-header { align-items: flex-start; flex-direction: column; margin-bottom: 2.5rem; }
|
||||
.fireworks-header__controls { width: 100%; justify-content: space-between; }
|
||||
}
|
||||
@media (max-width: 30rem) {
|
||||
.fireworks-header__controls { align-items: stretch; flex-direction: column; }
|
||||
.fireworks-nav { justify-content: space-between; }
|
||||
.fireworks-nav a { flex: 1; padding: .5rem; text-align: center; }
|
||||
.theme-toggle--inline { width: 100%; }
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
.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)}}
|
||||
@@ -0,0 +1 @@
|
||||
: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}}
|
||||
@@ -0,0 +1,48 @@
|
||||
:root{--i:#edf3ff;--m:#aab9d8;--l:#2b3d68}*{box-sizing:border-box}body{margin:0;min-height:100vh;padding:2rem;color:var(--i);font-family:system-ui;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.shell{width:min(100%,70rem);margin:auto}.top{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:3rem}.brand,a{color:inherit}.brand{text-decoration:none;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.top a:not(.brand){padding:.6rem .8rem;border:1px solid var(--l);border-radius:.6rem;text-decoration:none}.eyebrow{color:#bcd4ff;font-size:.76rem;letter-spacing:.15em;text-transform:uppercase;font-weight:800}h1{font-size:clamp(2.5rem,6vw,4.5rem);letter-spacing:-.06em;margin:.4rem 0}.lede{color:var(--m);max-width:38rem;line-height:1.6}.grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:1rem;margin-top:2rem}.panel{border:1px solid var(--l);border-radius:1rem;padding:1rem;background:#111a31d9}.event{width:100%;display:flex;justify-content:space-between;gap:.6rem;text-align:left;margin:.6rem 0;padding:.85rem;border:1px solid #374e7e;border-radius:.7rem;color:var(--i);background:#15223f;cursor:pointer}.event:hover{background:#20345f}.event--manual{border-color:#e2934a;background:linear-gradient(90deg,#70401e,#15223f)}.event small,.empty{color:var(--m)}.badge{color:#ffd08a}.detail h2{margin-top:0}.prediction{display:flex;justify-content:space-between;gap:1rem;padding:.65rem;margin:.45rem 0;border-left:3px solid #78a4f0;background:#111c34}.prediction--firework{border-color:#f5aa44}.prediction--speech{border-color:#fb7185}.meta{color:var(--m);font-size:.9rem}@media(max-width:42rem){body{padding:1rem}.grid{grid-template-columns:1fr}}
|
||||
|
||||
/* Event source styles keep manual reports and sensor classifications recognisable. */
|
||||
.event__content { display: grid; gap: .16rem; }
|
||||
.event__source { color: #bcd4ff; font-size: .67rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
|
||||
.event--sensor { border-color: #5478b7; background: linear-gradient(90deg, #1b355f, #15223f 72%); }
|
||||
.event--sensor .badge { color: #a9ccff; }
|
||||
.event--manual .event__source { color: #ffd08a; }
|
||||
.event--sensor:hover { background: linear-gradient(90deg, #25497e, #20345f 72%); }
|
||||
.event-nav { display: flex; gap: .3rem; padding: .25rem; border: 1px solid var(--l); border-radius: .75rem; background: #111a31d9; box-shadow: 0 .5rem 1.5rem #03071440; }
|
||||
.top .event-nav a { padding: .5rem .75rem; border: 0; border-radius: .5rem; color: var(--m); font-size: .86rem; font-weight: 750; text-decoration: none; }
|
||||
.top .event-nav a:hover { color: var(--i); background: #20345f; }
|
||||
.top .event-nav a[aria-current="page"] { color: var(--i); background: #2a3b67; }
|
||||
|
||||
:root[data-theme="light"] .event-nav {
|
||||
border-color: #cbd9ed;
|
||||
background: #edf4ff;
|
||||
box-shadow: 0 .45rem 1.25rem rgba(34, 68, 117, .12);
|
||||
}
|
||||
:root[data-theme="light"] .top .event-nav a { color: #47617f; }
|
||||
:root[data-theme="light"] .top .event-nav a:hover { color: #234a7b; background: #dceaff; }
|
||||
:root[data-theme="light"] .top .event-nav a[aria-current="page"] {
|
||||
color: #173d6a;
|
||||
background: #cfe3ff;
|
||||
box-shadow: inset 0 0 0 1px #9cc0ed;
|
||||
}
|
||||
:root[data-theme="light"] .event {
|
||||
color: #1d2d46;
|
||||
border-color: #cfdaea;
|
||||
background: #f7faff;
|
||||
box-shadow: 0 .35rem .9rem rgba(38, 62, 101, .06);
|
||||
}
|
||||
:root[data-theme="light"] .event:hover { background: #edf4ff; }
|
||||
:root[data-theme="light"] .event small { color: #61718a; }
|
||||
:root[data-theme="light"] .event__source { color: #426b9f; }
|
||||
:root[data-theme="light"] .event--sensor {
|
||||
border-color: #8eafd9;
|
||||
background: linear-gradient(90deg, #edf6ff, #e1edff 76%);
|
||||
}
|
||||
:root[data-theme="light"] .event--sensor:hover { background: linear-gradient(90deg, #e2f0ff, #d4e6ff 76%); }
|
||||
:root[data-theme="light"] .event--sensor .badge { color: #245b95; }
|
||||
:root[data-theme="light"] .event--manual {
|
||||
border-color: #e4a35c;
|
||||
background: linear-gradient(90deg, #fff8ee, #ffe3bf 76%);
|
||||
}
|
||||
:root[data-theme="light"] .event--manual:hover { background: linear-gradient(90deg, #fff1df, #ffd7a3 76%); }
|
||||
:root[data-theme="light"] .event--manual .event__source,
|
||||
:root[data-theme="light"] .event--manual .badge { color: #9a4b13; }
|
||||
@@ -0,0 +1,480 @@
|
||||
|
||||
:root {
|
||||
--ink: #eaf0ff;
|
||||
--muted: #9caed1;
|
||||
--surface: #111a31;
|
||||
--surface-2: #17223e;
|
||||
--line: #2a3a61;
|
||||
--blue: #6aa8ff;
|
||||
--violet: #a78bfa;
|
||||
--fire: #ffb454;
|
||||
--danger: #ff727c;
|
||||
--success: #6ee7b7;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
color: var(--ink);
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
background: radial-gradient(circle at 10% 0%, #263a76 0, transparent 30rem), radial-gradient(circle at 90% 20%, #4d236c 0, transparent 28rem), #090e1d;
|
||||
}
|
||||
|
||||
.shell {
|
||||
width: min(100% - 2.5rem, 70rem);
|
||||
margin: 0 auto;
|
||||
padding: clamp(2rem, 6vw, 5rem) 0;
|
||||
}
|
||||
|
||||
.brand {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .75rem;
|
||||
/* margin-bottom: clamp(2.5rem, 6vw, 5rem); */
|
||||
font-size: .9rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.brand-mark {
|
||||
display: grid;
|
||||
width: 2.25rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .75rem;
|
||||
color: #141022;
|
||||
background: linear-gradient(135deg, #fcd34d, #fb7185);
|
||||
box-shadow: 0 .5rem 1.5rem #fb718550;
|
||||
}
|
||||
|
||||
.intro {
|
||||
max-width: 45rem;
|
||||
}
|
||||
|
||||
.kicker {
|
||||
margin: 0 0 .8rem;
|
||||
color: #bfdbfe;
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .15em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h1 {
|
||||
max-width: 12ch;
|
||||
margin: 0;
|
||||
font-size: clamp(2.6rem, 7vw, 5.75rem);
|
||||
line-height: .96;
|
||||
letter-spacing: -.065em;
|
||||
}
|
||||
|
||||
.lede {
|
||||
max-width: 38rem;
|
||||
margin: 1.5rem 0 2.5rem;
|
||||
color: var(--muted);
|
||||
font-size: clamp(1rem, 2vw, 1.18rem);
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
.upload-card,
|
||||
.results-card {
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 1.5rem;
|
||||
background: linear-gradient(145deg, #162240d9, #0e162bdd);
|
||||
box-shadow: 0 1.5rem 4rem #02061680;
|
||||
backdrop-filter: blur(16px);
|
||||
}
|
||||
|
||||
.upload-card {
|
||||
padding: clamp(1rem, 3vw, 1.5rem);
|
||||
}
|
||||
|
||||
.drop-zone {
|
||||
display: grid;
|
||||
min-height: 16rem;
|
||||
place-items: center;
|
||||
padding: 2rem;
|
||||
border: 1.5px dashed #5d75aa;
|
||||
border-radius: 1rem;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
background: linear-gradient(135deg, #1b2a4e80, #291c4b66);
|
||||
transition: .2s ease;
|
||||
}
|
||||
|
||||
.drop-zone:hover,
|
||||
.drop-zone.dragging {
|
||||
border-color: var(--blue);
|
||||
transform: translateY(-2px);
|
||||
background: #203360a8;
|
||||
}
|
||||
|
||||
.drop-zone:focus-within {
|
||||
outline: 3px solid #6aa8ff66;
|
||||
outline-offset: 3px;
|
||||
}
|
||||
|
||||
.file-input {
|
||||
width: .1px;
|
||||
height: .1px;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.upload-icon {
|
||||
display: grid;
|
||||
width: 4rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
margin: 0 auto 1rem;
|
||||
border-radius: 50%;
|
||||
color: #dbeafe;
|
||||
font-size: 1.8rem;
|
||||
background: #4777c94d;
|
||||
}
|
||||
|
||||
.drop-zone strong {
|
||||
display: block;
|
||||
font-size: 1.15rem;
|
||||
}
|
||||
|
||||
.drop-zone span {
|
||||
display: block;
|
||||
margin-top: .4rem;
|
||||
color: var(--muted);
|
||||
font-size: .92rem;
|
||||
}
|
||||
|
||||
.file-name {
|
||||
min-height: 1.3rem;
|
||||
margin: 1rem 0 0;
|
||||
color: #c7d2fe;
|
||||
font-size: .9rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.form-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
padding: .9rem .25rem 0;
|
||||
}
|
||||
|
||||
.file-note {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
font-size: .8rem;
|
||||
}
|
||||
|
||||
button,
|
||||
.button {
|
||||
text-decoration: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: .6rem;
|
||||
border: 0;
|
||||
border-radius: .8rem;
|
||||
padding: .85rem 1.15rem;
|
||||
cursor: pointer;
|
||||
color: #10172c;
|
||||
font: inherit;
|
||||
font-weight: 800;
|
||||
background: linear-gradient(135deg, #93c5fd, #c4b5fd);
|
||||
box-shadow: 0 .5rem 1.25rem #8b5cf640;
|
||||
transition: transform .2s ease, filter .2s ease;
|
||||
}
|
||||
|
||||
button:hover,
|
||||
.button:hover {
|
||||
transform: translateY(-1px);
|
||||
filter: brightness(1.08);
|
||||
}
|
||||
|
||||
button:disabled {
|
||||
cursor: wait;
|
||||
filter: saturate(.4);
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.spinner {
|
||||
width: 1rem;
|
||||
height: 1rem;
|
||||
border: 2px solid #263253;
|
||||
border-top-color: currentColor;
|
||||
border-radius: 50%;
|
||||
animation: spin .75s linear infinite;
|
||||
}
|
||||
|
||||
.htmx-indicator {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.htmx-request.htmx-indicator {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.upload-form.htmx-request button {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
#upload-status {
|
||||
min-height: 1.4rem;
|
||||
margin: 1rem .25rem 0;
|
||||
color: #c7d2fe;
|
||||
font-size: .9rem;
|
||||
}
|
||||
|
||||
.upload-form.htmx-request+#upload-status {
|
||||
color: #fcd34d;
|
||||
}
|
||||
|
||||
#classification-results {
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
.results-card {
|
||||
padding: clamp(1.25rem, 3vw, 2rem);
|
||||
animation: reveal .35s ease-out;
|
||||
}
|
||||
|
||||
.result-heading {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.result-heading h2 {
|
||||
margin: 0;
|
||||
font-size: clamp(1.4rem, 3vw, 2rem);
|
||||
letter-spacing: -.04em;
|
||||
}
|
||||
|
||||
.result-heading p {
|
||||
margin: .3rem 0 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.result-status {
|
||||
padding: .4rem .65rem;
|
||||
border-radius: 999px;
|
||||
color: #a7f3d0;
|
||||
font-size: .75rem;
|
||||
font-weight: 800;
|
||||
white-space: nowrap;
|
||||
background: #065f464d;
|
||||
}
|
||||
|
||||
.meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .6rem;
|
||||
margin: 1.5rem 0;
|
||||
}
|
||||
|
||||
.meta span,
|
||||
.legend span {
|
||||
padding: .4rem .65rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 999px;
|
||||
color: #bdc9e5;
|
||||
font-size: .8rem;
|
||||
background: #101a31;
|
||||
}
|
||||
|
||||
.legend {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: .5rem;
|
||||
margin: 0 0 1.25rem;
|
||||
}
|
||||
|
||||
.legend .firework {
|
||||
color: #ffd18c;
|
||||
border-color: #c7721e80;
|
||||
}
|
||||
|
||||
.legend .speech {
|
||||
color: #ffadb4;
|
||||
border-color: #d5485880;
|
||||
}
|
||||
.topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:3.5rem; }.brand { display:flex; align-items:center; gap:.7rem; color:var(--ink); font-size:.9rem; font-weight:800; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }.nav { display:flex; gap:.35rem; padding:.25rem; border:1px solid var(--line); border-radius:.75rem; background:#111a31a6; }.nav a { padding:.5rem .75rem; border-radius:.5rem; color:var(--muted); font-size:.86rem; font-weight:700; text-decoration:none; }.nav a[aria-current="page"] { color:var(--ink); background:#2a3b67; }
|
||||
|
||||
.result-grid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr);
|
||||
gap: 1.25rem;
|
||||
}
|
||||
|
||||
.result-group {
|
||||
padding: 1.1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 1rem;
|
||||
background: #0b1225a8;
|
||||
}
|
||||
|
||||
.result-group h3 {
|
||||
margin: 0 0 1rem;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.prediction-list {
|
||||
display: grid;
|
||||
gap: .75rem;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.prediction {
|
||||
--accent-color: #7799dd;
|
||||
position: relative;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
gap: .45rem .75rem;
|
||||
align-items: center;
|
||||
padding: .7rem .75rem;
|
||||
overflow: hidden;
|
||||
border: 1px solid #26365b;
|
||||
border-left: 3px solid var(--accent-color);
|
||||
border-radius: .7rem;
|
||||
background: #121c34;
|
||||
}
|
||||
|
||||
.prediction--firework {
|
||||
--accent-color: var(--fire);
|
||||
background: linear-gradient(90deg, #7a421d55, #121c34);
|
||||
}
|
||||
|
||||
.prediction--speech {
|
||||
--accent-color: var(--danger);
|
||||
background: linear-gradient(90deg, #6c213055, #121c34);
|
||||
}
|
||||
|
||||
.prediction-label {
|
||||
min-width: 0;
|
||||
font-weight: 700;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.prediction-score {
|
||||
color: #c4d1ed;
|
||||
font-size: .85rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.score-bar {
|
||||
grid-column: 1/-1;
|
||||
height: .3rem;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: #263657;
|
||||
}
|
||||
|
||||
.score-bar i {
|
||||
display: block;
|
||||
width: calc(var(--score) * 1%);
|
||||
height: 100%;
|
||||
border-radius: inherit;
|
||||
background: var(--accent-color);
|
||||
}
|
||||
|
||||
.peak-list {
|
||||
display: grid;
|
||||
gap: .7rem;
|
||||
}
|
||||
|
||||
.peak-item {
|
||||
padding-bottom: .7rem;
|
||||
border-bottom: 1px solid #253453;
|
||||
}
|
||||
|
||||
.peak-item:last-child {
|
||||
padding-bottom: 0;
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.peak-time {
|
||||
color: #a9bce0;
|
||||
font-size: .78rem;
|
||||
}
|
||||
|
||||
.peak-item .prediction {
|
||||
margin-top: .35rem;
|
||||
}
|
||||
|
||||
.empty {
|
||||
margin: 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.error-card {
|
||||
border-color: #a43d4d;
|
||||
background: linear-gradient(135deg, #4b1724dd, #1a1427dd);
|
||||
}
|
||||
|
||||
.error-card h2 {
|
||||
color: #fecdd3;
|
||||
}
|
||||
|
||||
.error-card p {
|
||||
color: #fecdd3;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes reveal {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(.75rem);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:42rem) {
|
||||
.shell {
|
||||
width: min(100% - 1.25rem, 70rem);
|
||||
}
|
||||
|
||||
.form-footer,
|
||||
.result-heading {
|
||||
align-items: stretch;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.form-footer button {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.result-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.result-status {
|
||||
align-self: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion:reduce) {
|
||||
|
||||
*,
|
||||
::before,
|
||||
::after {
|
||||
scroll-behavior: auto !important;
|
||||
animation-duration: .01ms !important;
|
||||
transition-duration: .01ms !important;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
:root { --ink:#eef3ff; --muted:#aab9d8; --line:#2b3d68; --blue:#8abaff; --violet:#b69cff; --amber:#ffbd62; }
|
||||
* { 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; }
|
||||
.welcome-card { width:min(100%,44rem); position:relative; overflow:hidden; padding:clamp(2rem,7vw,4.75rem); border:1px solid var(--line); border-radius:1.5rem; background:linear-gradient(145deg,#172443e8,#10182ddd); box-shadow:0 1.75rem 5rem #01030c99; backdrop-filter:blur(16px); }
|
||||
.welcome-card::before { content:""; width:15rem; height:15rem; position:absolute; top:-8rem; right:-6rem; border-radius:50%; background:linear-gradient(135deg,#609df177,#b27be266); filter:blur(1px); }.welcome-card::after { content:""; width:10rem; height:10rem; position:absolute; bottom:-6rem; left:-4rem; border-radius:50%; background:#f4a74225; }
|
||||
.brand { display:flex; align-items:center; gap:.65rem; margin-bottom:clamp(2rem,5vw,4rem); color:#d9e5ff; font-size:.78rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }.brand-mark { display:grid; width:2.2rem; aspect-ratio:1; place-items:center; border-radius:.7rem; color:#17132b; font-size:1.1rem; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }
|
||||
.eyebrow { margin:0 0 .8rem; color:#bad3ff; font-size:.76rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }.eyebrow::before { content:""; display:inline-block; width:.55rem; height:.55rem; margin-right:.45rem; border-radius:50%; background:var(--amber); box-shadow:0 0 0 .25rem #fbbf2430; }
|
||||
h1 { max-width:10ch; margin:0; font-size:clamp(2.8rem,8vw,5.75rem); line-height:.96; letter-spacing:-.065em; }.subject { max-width:33rem; margin:1.35rem 0 0; color:var(--muted); font-size:clamp(1rem,2vw,1.15rem); line-height:1.65; }.subject strong { color:#e8efff; }.sparkle { color:var(--violet); font-size:1.2em; }
|
||||
.actions { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; margin-top:2.25rem; }
|
||||
.profile-circle { display:grid; width:3rem; height:3rem; position:fixed; top:1.25rem; right:1.25rem; place-items:center; border:1px solid #d0c0ff; border-radius:50%; z-index:2; color:#17132b; font-weight:900; text-decoration:none; background:linear-gradient(135deg,#fcd34d,#c4a5fd); box-shadow:0 .5rem 1.5rem #01030c66; }
|
||||
.profile-circle:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
.button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }.hint { color:#99add2; font-size:.82rem; }
|
||||
@media (max-width:30rem) { .welcome-card { padding:2rem 1.5rem; }.actions { align-items:stretch; flex-direction:column; }.button { width:100%; }.hint { text-align:center; } }
|
||||
@media (prefers-reduced-motion:reduce) { .button { transition:none; } }
|
||||
|
||||
|
||||
.home-grid { width:min(100%,80rem); display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr)); gap:1.25rem; align-items:stretch; }
|
||||
.welcome-card { width:100%; }
|
||||
.manual-report { position:relative; overflow:hidden; padding:clamp(2rem,6vw,4.75rem); border:2px solid #a85a1e; border-radius:1.5rem; background:linear-gradient(145deg,#4a2b16e8,#171225dd); box-shadow:0 1.75rem 5rem #01030c99; }
|
||||
.manual-report__title { margin:.2rem 0 .75rem; font-size:clamp(2rem,4vw,3.1rem); line-height:1; letter-spacing:-.06em; }
|
||||
.manual-report__intro { margin:0 0 1.5rem; color:#f3c8a3; line-height:1.55; }
|
||||
.manual-report__label { display:block; margin-bottom:.5rem; font-weight:800; }
|
||||
#manual-occurrences { width:100%; min-height:3.3rem; margin-bottom:1rem; padding:.75rem .9rem; border:1px solid #e2934a; border-radius:.75rem; color:#eef3ff; font:inherit; font-weight:800; background:#151b31; }
|
||||
.manual-direction-panel { margin:0 0 1rem; padding:1rem; border:1px solid #8d5bb5; border-radius:.75rem; background:#241b38; }
|
||||
.manual-direction-panel__heading { display:block; margin-bottom:.35rem; }
|
||||
.manual-direction-panel__heading span { color:#c7b5eb; font-weight:600; }
|
||||
.manual-direction-panel__copy { margin:0 0 .75rem; color:#d4c6ef; font-size:.88rem; line-height:1.45; }
|
||||
.manual-direction-panel__button { min-height:2.75rem; padding:.65rem .9rem; border:1px solid #c3a5eb; border-radius:.65rem; color:#211234; font:inherit; font-weight:850; background:#d8c1fb; cursor:pointer; }
|
||||
.manual-direction-panel__status { min-height:1.4rem; margin-top:.7rem; color:#e5dcf7; font-size:.9rem; }
|
||||
.manual-report__submit { width:100%; min-height:6rem; border:0; border-radius:1rem; color:#281306; font:inherit; font-size:clamp(1.1rem,2vw,1.45rem); font-weight:900; background:linear-gradient(135deg,#ffd18c,#ff8f5b); box-shadow:0 .75rem 1.8rem #d664344d; cursor:pointer; }
|
||||
.manual-report__submission { min-height:1.5rem; margin-top:1rem; color:#ffd18c; }
|
||||
|
||||
|
||||
/* Homepage-specific light palette: the two cards intentionally retain distinct roles. */
|
||||
:root[data-theme="light"] .home-grid .welcome-card {
|
||||
color: #17233b;
|
||||
border-color: #d5e0f1 !important;
|
||||
background: linear-gradient(145deg, #ffffff 0%, #f4f8ff 100%) !important;
|
||||
box-shadow: 0 1.4rem 3.4rem rgba(38, 65, 111, .16) !important;
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .welcome-card::before {
|
||||
background: linear-gradient(135deg, #a9c9fb99, #d4b8f299);
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .welcome-card::after { background: #ffd49a66; }
|
||||
:root[data-theme="light"] .home-grid .welcome-card .brand { color: #365b97; }
|
||||
:root[data-theme="light"] .home-grid .welcome-card .eyebrow { color: #4269a5; }
|
||||
:root[data-theme="light"] .home-grid .welcome-card .subject strong { color: #182b50; }
|
||||
:root[data-theme="light"] .home-grid .welcome-card .hint { color: #5d7191; }
|
||||
|
||||
:root[data-theme="light"] .home-grid .manual-report {
|
||||
color: #42210f;
|
||||
border-color: #eca851 !important;
|
||||
background: linear-gradient(145deg, #fff8ef 0%, #ffe0bb 100%) !important;
|
||||
box-shadow: 0 1.4rem 3.4rem rgba(116, 69, 25, .18) !important;
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .manual-report .eyebrow { color: #9f4d16; }
|
||||
:root[data-theme="light"] .home-grid .manual-report__title { color: #4a2510; }
|
||||
:root[data-theme="light"] .home-grid .manual-report__intro { color: #70411d; }
|
||||
:root[data-theme="light"] .home-grid .manual-report__label { color: #54311b; }
|
||||
:root[data-theme="light"] .home-grid #manual-occurrences {
|
||||
border-color: #dfaa68;
|
||||
color: #322014;
|
||||
background: #fffdfa;
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .manual-direction-panel {
|
||||
border-color: #d9b4d8;
|
||||
background: #fff5fc;
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .manual-direction-panel__heading { color: #492846; }
|
||||
:root[data-theme="light"] .home-grid .manual-direction-panel__heading span { color: #70466d; }
|
||||
:root[data-theme="light"] .home-grid .manual-direction-panel__copy { color: #694b68; }
|
||||
:root[data-theme="light"] .home-grid .manual-direction-panel__button {
|
||||
border-color: #b68bb5;
|
||||
color: #321a34;
|
||||
background: #ead2eb;
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .manual-direction-panel__status { color: #6b4267; }
|
||||
:root[data-theme="light"] .home-grid .manual-report__submit {
|
||||
color: #281306;
|
||||
box-shadow: 0 .75rem 1.8rem rgba(190, 90, 34, .27);
|
||||
}
|
||||
:root[data-theme="light"] .home-grid .manual-report__submission { color: #87421b; }
|
||||
@@ -0,0 +1,38 @@
|
||||
|
||||
:root { --ink:#eaf0ff; --muted:#9caed1; --surface:#111a31; --surface-2:#17223e; --line:#2a3a61; --blue:#6aa8ff; --violet:#a78bfa; --fire:#ffb454; --danger:#ff727c; --success:#6ee7b7; }
|
||||
* { box-sizing:border-box; }
|
||||
body { min-width:320px; min-height:100vh; margin:0; color:var(--ink); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; background:radial-gradient(circle at 10% 0%,#263a76 0,transparent 30rem),radial-gradient(circle at 90% 20%,#4d236c 0,transparent 28rem),#090e1d; }
|
||||
.shell { width:min(100% - 2.5rem,70rem); margin:0 auto; padding:clamp(2rem,6vw,5rem) 0; }
|
||||
.brand { display:flex; align-items:center; gap:.75rem; margin-bottom:clamp(2.5rem,6vw,5rem); font-size:.9rem; font-weight:800; letter-spacing:.11em; text-transform:uppercase; }
|
||||
.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }
|
||||
.intro { max-width:45rem; }
|
||||
.kicker { margin:0 0 .8rem; color:#bfdbfe; font-size:.78rem; font-weight:800; letter-spacing:.15em; text-transform:uppercase; }
|
||||
h1 { max-width:12ch; margin:0; font-size:clamp(2.6rem,7vw,5.75rem); line-height:.96; letter-spacing:-.065em; }
|
||||
.lede { max-width:38rem; margin:1.5rem 0 2.5rem; color:var(--muted); font-size:clamp(1rem,2vw,1.18rem); line-height:1.65; }
|
||||
.upload-card,.results-card { border:1px solid var(--line); border-radius:1.5rem; background:linear-gradient(145deg,#162240d9,#0e162bdd); box-shadow:0 1.5rem 4rem #02061680; backdrop-filter:blur(16px); }
|
||||
.upload-card { padding:clamp(1rem,3vw,1.5rem); }
|
||||
.drop-zone { display:grid; min-height:16rem; place-items:center; padding:2rem; border:1.5px dashed #5d75aa; border-radius:1rem; cursor:pointer; text-align:center; background:linear-gradient(135deg,#1b2a4e80,#291c4b66); transition:.2s ease; }
|
||||
.drop-zone:hover,.drop-zone.dragging { border-color:var(--blue); transform:translateY(-2px); background:#203360a8; }
|
||||
.drop-zone:focus-within { outline:3px solid #6aa8ff66; outline-offset:3px; }
|
||||
.file-input { width:.1px; height:.1px; position:absolute; opacity:0; overflow:hidden; }
|
||||
.upload-icon { display:grid; width:4rem; aspect-ratio:1; place-items:center; margin:0 auto 1rem; border-radius:50%; color:#dbeafe; font-size:1.8rem; background:#4777c94d; }
|
||||
.drop-zone strong { display:block; font-size:1.15rem; }
|
||||
.drop-zone span { display:block; margin-top:.4rem; color:var(--muted); font-size:.92rem; }
|
||||
.file-name { min-height:1.3rem; margin:1rem 0 0; color:#c7d2fe; font-size:.9rem; overflow-wrap:anywhere; }
|
||||
.form-footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.9rem .25rem 0; }
|
||||
.file-note { margin:0; color:var(--muted); font-size:.8rem; }
|
||||
button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; border:0; border-radius:.8rem; padding:.85rem 1.15rem; cursor:pointer; color:#10172c; font:inherit; font-weight:800; background:linear-gradient(135deg,#93c5fd,#c4b5fd); box-shadow:0 .5rem 1.25rem #8b5cf640; transition:transform .2s ease,filter .2s ease; }
|
||||
button:hover { transform:translateY(-1px); filter:brightness(1.08); } button:disabled { cursor:wait; filter:saturate(.4); transform:none; }
|
||||
.spinner { width:1rem; height:1rem; border:2px solid #263253; border-top-color:currentColor; border-radius:50%; animation:spin .75s linear infinite; }
|
||||
.htmx-indicator { display:none; }.htmx-request.htmx-indicator { display:inline-block; }.upload-form.htmx-request button { pointer-events:none; }
|
||||
#upload-status { min-height:1.4rem; margin:1rem .25rem 0; color:#c7d2fe; font-size:.9rem; } .upload-form.htmx-request + #upload-status { color:#fcd34d; }
|
||||
#classification-results { margin-top:1.5rem; }
|
||||
.results-card { padding:clamp(1.25rem,3vw,2rem); animation:reveal .35s ease-out; }
|
||||
.result-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:1rem; } .result-heading h2 { margin:0; font-size:clamp(1.4rem,3vw,2rem); letter-spacing:-.04em; }.result-heading p { margin:.3rem 0 0; color:var(--muted); }
|
||||
.result-status { padding:.4rem .65rem; border-radius:999px; color:#a7f3d0; font-size:.75rem; font-weight:800; white-space:nowrap; background:#065f464d; }
|
||||
.meta { display:flex; flex-wrap:wrap; gap:.6rem; margin:1.5rem 0; }.meta span,.legend span { padding:.4rem .65rem; border:1px solid var(--line); border-radius:999px; color:#bdc9e5; font-size:.8rem; background:#101a31; }.legend { display:flex; flex-wrap:wrap; gap:.5rem; margin:0 0 1.25rem; }.legend .firework { color:#ffd18c; border-color:#c7721e80; }.legend .speech { color:#ffadb4; border-color:#d5485880; }
|
||||
.result-grid { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(18rem,.75fr); gap:1.25rem; }.result-group { padding:1.1rem; border:1px solid var(--line); border-radius:1rem; background:#0b1225a8; }.result-group h3 { margin:0 0 1rem; font-size:1rem; }.prediction-list { display:grid; gap:.75rem; margin:0; padding:0; list-style:none; }.prediction { --accent-color:#7799dd; position:relative; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.45rem .75rem; align-items:center; padding:.7rem .75rem; overflow:hidden; border:1px solid #26365b; border-left:3px solid var(--accent-color); border-radius:.7rem; background:#121c34; }.prediction--firework { --accent-color:var(--fire); background:linear-gradient(90deg,#7a421d55,#121c34); }.prediction--speech { --accent-color:var(--danger); background:linear-gradient(90deg,#6c213055,#121c34); }.prediction-label { min-width:0; font-weight:700; overflow-wrap:anywhere; }.prediction-score { color:#c4d1ed; font-size:.85rem; font-variant-numeric:tabular-nums; }.score-bar { grid-column:1/-1; height:.3rem; overflow:hidden; border-radius:999px; background:#263657; }.score-bar i { display:block; width:calc(var(--score) * 1%); height:100%; border-radius:inherit; background:var(--accent-color); }.peak-list { display:grid; gap:.7rem; }.peak-item { padding-bottom:.7rem; border-bottom:1px solid #253453; }.peak-item:last-child { padding-bottom:0; border-bottom:0; }.peak-time { color:#a9bce0; font-size:.78rem; }.peak-item .prediction { margin-top:.35rem; }.empty { margin:0; color:var(--muted); }.error-card { border-color:#a43d4d; background:linear-gradient(135deg,#4b1724dd,#1a1427dd); }.error-card h2 { color:#fecdd3; }.error-card p { color:#fecdd3; }
|
||||
@keyframes spin { to { transform:rotate(360deg); } } @keyframes reveal { from { opacity:0; transform:translateY(.75rem); } }
|
||||
@media (max-width:42rem) { .shell { width:min(100% - 1.25rem,70rem); }.form-footer,.result-heading { align-items:stretch; flex-direction:column; }.form-footer button { width:100%; }.result-grid { grid-template-columns:1fr; }.result-status { align-self:flex-start; } }
|
||||
@media (prefers-reduced-motion:reduce) { *,::before,::after { scroll-behavior:auto!important; animation-duration:.01ms!important; transition-duration:.01ms!important; } }
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
body{min-width:320px;min-height:100vh;display:grid;place-items:center;margin:0;padding:1.5rem;color:#eef3ff;font-family:Inter,system-ui,sans-serif;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.card{width:min(100%,27rem);padding:2rem;border:1px solid #2b3d68;border-radius:1.25rem;background:#172443;box-shadow:0 1.75rem 5rem #01030c99}h1{margin:.5rem 0}.intro{color:#aab9d8;line-height:1.5}.error{margin:1rem 0;padding:.75rem;border-radius:.6rem;color:#fee2e2;background:#7f1d1d}label{display:block;margin:1rem 0 .35rem;font-weight:700}input{width:100%;min-height:2.8rem;padding:.65rem;border:1px solid #526b9f;border-radius:.55rem;color:#eef3ff;font:inherit;background:#0a1123}button{width:100%;min-height:2.9rem;margin-top:1.5rem;border:0;border-radius:.65rem;color:#17132b;font:inherit;font-weight:850;background:linear-gradient(135deg,#99c8ff,#c6adff);cursor:pointer}
|
||||
@@ -0,0 +1,17 @@
|
||||
|
||||
:root { --ink:#eef3ff; --muted:#a9b9d8; --surface:#111a31; --line:#2a3a61; --blue:#83b7ff; --violet:#b69cff; --amber:#ffbc61; --green:#6ee7b7; }
|
||||
* { box-sizing:border-box; }
|
||||
body { min-width:320px; min-height:100vh; margin:0; 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 32rem),radial-gradient(circle at 95% 0%,#492064 0,transparent 27rem),#090e1d; }
|
||||
.shell {
|
||||
width: min(100% - 2.5rem, 70rem);
|
||||
margin: 0 auto;
|
||||
padding: clamp(2rem, 6vw, 5rem) 0;
|
||||
}
|
||||
.topbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:3.5rem; }.brand { display:flex; align-items:center; gap:.7rem; color:var(--ink); font-size:.9rem; font-weight:800; letter-spacing:.1em; text-decoration:none; text-transform:uppercase; }.brand-mark { display:grid; width:2.25rem; aspect-ratio:1; place-items:center; border-radius:.75rem; color:#141022; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }.nav { display:flex; gap:.35rem; padding:.25rem; border:1px solid var(--line); border-radius:.75rem; background:#111a31a6; }.nav a { padding:.5rem .75rem; border-radius:.5rem; color:var(--muted); font-size:.86rem; font-weight:700; text-decoration:none; }.nav a[aria-current="page"] { color:var(--ink); background:#2a3b67; }
|
||||
.kicker { margin:0 0 .65rem; color:#bfdbfe; font-size:.76rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }.headline { display:flex; align-items:end; justify-content:space-between; gap:2rem; margin-bottom:2rem; }.headline h1 { margin:0; font-size:clamp(2.3rem,5vw,4.5rem); line-height:.98; letter-spacing:-.06em; }.headline p { max-width:30rem; margin:0; color:var(--muted); line-height:1.6; }
|
||||
.filters { display:grid; grid-template-columns:repeat(5,minmax(8rem,1fr)) auto auto; gap:.75rem; align-items:end; margin-bottom:1rem; padding:1rem; border:1px solid var(--line); border-radius:1.1rem; background:#121d37d9; box-shadow:0 1rem 3rem #03071466; }.filter { display:grid; gap:.35rem; }.filter label { color:#9fb1d5; font-size:.7rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }.filter select,.filter input { width:100%; min-height:2.65rem; border:1px solid #354a77; border-radius:.65rem; padding:0 .75rem; color:var(--ink); font:inherit; background:#0c1428; }.filter select:focus,.filter input:focus { outline:2px solid #82b5ff; outline-offset:2px; }.filter-submit { min-height:2.65rem; border:1px solid #8ab7ff; border-radius:.65rem; padding:0 1rem; color:#101a31; font:inherit; font-weight:800; background:#b9d6ff; cursor:pointer; }.map-tag { align-self:center; padding:.46rem .65rem; border:1px solid #4a5f8e; border-radius:999px; color:#c9d8f6; font-size:.75rem; font-weight:700; white-space:nowrap; background:#1d2b4e; }
|
||||
.map-panel { overflow:hidden; border:1px solid var(--line); border-radius:1.25rem; background:var(--surface); box-shadow:0 1.5rem 4rem #0206168a; }.map-header { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:1rem 1.2rem; border-bottom:1px solid var(--line); }.map-header strong { font-size:.95rem; }.live { display:flex; align-items:center; gap:.45rem; color:#a7f3d0; font-size:.8rem; }.live i { width:.5rem; height:.5rem; border-radius:50%; background:var(--green); box-shadow:0 0 0 .25rem #34d3992e; }.map-wrap { position:relative; }.map { height:clamp(30rem,65vh,45rem); background:#dce4cf; }.legend { position:absolute; z-index:600; right:1rem; bottom:1rem; width:min(15rem,calc(100% - 2rem)); padding:.85rem; border:1px solid #344973; border-radius:.8rem; color:#dce7fe; font-size:.78rem; background:#101a31e8; box-shadow:0 .75rem 2rem #05091480; backdrop-filter:blur(10px); }.legend h2 { margin:0 0 .6rem; font-size:.82rem; }.legend div { display:flex; align-items:center; gap:.5rem; margin-top:.4rem; }.legend-dot { width:.7rem; height:.7rem; border:2px solid #f2c56b; border-radius:50%; background:#ed8e2e88; }.legend-ring { width:.85rem; height:.85rem; border:2px solid #a98af7; border-radius:50%; background:#8b5cf633; }.legend-line { width:1.1rem; border-top:2px dashed #644b9c; }.report-icon { display:grid; width:2.3rem; height:2.3rem; place-items:center; border:2px solid #fff3d5; border-radius:50%; color:#452000; font-size:1rem; font-weight:900; background:#f7a52f; box-shadow:0 .3rem 1rem #a84f2670; }.source-icon { display:grid; width:2.45rem; height:2.45rem; place-items:center; border:2px solid #fff3d5; border-radius:50% 50% 50% 0; color:#452000; font-size:1.15rem; background:#f7a52f; box-shadow:0 .3rem 1rem #a84f2670; transform:rotate(-45deg); }.source-icon span { transform:rotate(45deg); }.direction-marker { display:grid; width:3.5rem; height:3.5rem; place-items:center; border:3px solid #fff7e6; border-radius:50%; color:#fff; background:#6d45a0; box-shadow:0 .3rem 1rem #281642b3; }.direction-marker span { display:block; font-size:2.45rem; font-weight:950; line-height:1; text-shadow:0 .1rem .25rem #1e1136; transform-origin:center; }
|
||||
.map-compass { position:relative; width:5rem; height:5rem; border:2px solid #eaf1ff; border-radius:50%; color:#f7fbff; font-size:.72rem; font-weight:900; background:#111a31e8; box-shadow:0 .5rem 1.5rem #05091480; backdrop-filter:blur(8px); }.map-compass span { position:absolute; display:grid; place-items:center; }.map-compass .compass-n { top:.35rem; left:50%; transform:translateX(-50%); color:#ffd18c; }.map-compass .compass-e { top:50%; right:.45rem; transform:translateY(-50%); }.map-compass .compass-s { bottom:.35rem; left:50%; transform:translateX(-50%); }.map-compass .compass-w { top:50%; left:.45rem; transform:translateY(-50%); }.map-compass .compass-needle { top:1.3rem; left:50%; color:#ffd18c; font-size:2rem; line-height:1; transform:translateX(-50%); text-shadow:0 .1rem .35rem #3b1b48; }.leaflet-control-zoom a { color:#243456!important; }.leaflet-popup-content-wrapper,.leaflet-popup-tip { color:#e9f1ff; background:#14203a; }.leaflet-popup-content { margin:.75rem .9rem; font-family:inherit; }.popup-title { display:block; margin-bottom:.2rem; font-weight:800; }.popup-meta { color:#a9b9d8; font-size:.78rem; }
|
||||
@media (max-width:52rem) { .shell { width:min(100% - 1.25rem,80rem); }.topbar { margin-bottom:2.5rem; }.headline { align-items:start; flex-direction:column; gap:1rem; }.filters { grid-template-columns:1fr 1fr; }.filters .filter:first-child { grid-column:1/-1; }.map { height:32rem; } }
|
||||
@media (max-width:30rem) { .nav a { padding:.5rem; }.filters { grid-template-columns:1fr; }.filters .filter:first-child { grid-column:auto; } }
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
|
||||
:root {
|
||||
--ink: #172033;
|
||||
--muted: #667085;
|
||||
--card: rgba(255, 255, 255, .92);
|
||||
--line: #d7ddea;
|
||||
--primary: #6255e7;
|
||||
--success-bg: #eafaf1;
|
||||
--success-ink: #176b42;
|
||||
}
|
||||
|
||||
* { 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 12% 15%, #cfe1ff 0, transparent 28rem),
|
||||
radial-gradient(circle at 88% 88%, #e6d8ff 0, transparent 26rem),
|
||||
#f6f7fb;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: min(100%, 31rem);
|
||||
padding: clamp(1.75rem, 7vw, 3rem);
|
||||
border: 1px solid rgba(255, 255, 255, .85);
|
||||
border-radius: 1.5rem;
|
||||
background: var(--card);
|
||||
box-shadow: 0 1.5rem 4rem rgba(53, 56, 105, .16);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0 0 1rem;
|
||||
color: var(--primary);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sparkle {
|
||||
display: grid;
|
||||
width: 1.65rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .55rem;
|
||||
color: white;
|
||||
font-size: .95rem;
|
||||
background: linear-gradient(135deg, #7668ff, #a75ff4);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 7vw, 3rem);
|
||||
letter-spacing: -.055em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 1rem 0 2rem;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: .55rem;
|
||||
font-size: .92rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
padding: .75rem 1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: .75rem;
|
||||
outline: none;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
background: white;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 .25rem rgba(98, 85, 231, .15);
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
margin-top: 1rem;
|
||||
border: 0;
|
||||
border-radius: .75rem;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
font: inherit;
|
||||
font-weight: 750;
|
||||
background: linear-gradient(135deg, var(--primary), #8a5ce5);
|
||||
box-shadow: 0 .65rem 1.3rem rgba(98, 85, 231, .24);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.result {
|
||||
margin: 1.5rem 0 0;
|
||||
padding: .9rem 1rem;
|
||||
border-radius: .75rem;
|
||||
color: var(--success-ink);
|
||||
line-height: 1.45;
|
||||
background: var(--success-bg);
|
||||
}
|
||||
.button { width: 100%;display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
|
||||
|
||||
@@ -0,0 +1,209 @@
|
||||
|
||||
:root {
|
||||
--ink: #172033;
|
||||
--muted: #667085;
|
||||
--card: rgba(255, 255, 255, .94);
|
||||
--line: #e1e6ef;
|
||||
--primary: #6255e7;
|
||||
--primary-soft: #f0eeff;
|
||||
--empty-bg: #f7f8fc;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
padding: clamp(1.25rem, 5vw, 4rem);
|
||||
color: var(--ink);
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system,
|
||||
BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
background:
|
||||
radial-gradient(circle at 8% 8%, #d9e7ff 0, transparent 30rem),
|
||||
radial-gradient(circle at 92% 90%, #eadcff 0, transparent 30rem),
|
||||
#f6f7fb;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: min(100%, 70rem);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, .9);
|
||||
border-radius: 1.5rem;
|
||||
background: var(--card);
|
||||
box-shadow: 0 1.5rem 4rem rgba(53, 56, 105, .14);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: space-between;
|
||||
gap: 1.5rem;
|
||||
padding: clamp(1.5rem, 5vw, 3rem);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0 0 .85rem;
|
||||
color: var(--primary);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sparkle {
|
||||
display: grid;
|
||||
width: 1.65rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .55rem;
|
||||
color: white;
|
||||
font-size: .95rem;
|
||||
background: linear-gradient(135deg, #7668ff, #a75ff4);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 5vw, 3.25rem);
|
||||
letter-spacing: -.06em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.intro {
|
||||
max-width: 38rem;
|
||||
margin: .85rem 0 0;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.count {
|
||||
flex: 0 0 auto;
|
||||
margin: 0;
|
||||
padding: .6rem .85rem;
|
||||
border-radius: 999px;
|
||||
color: var(--primary);
|
||||
font-size: .88rem;
|
||||
font-weight: 750;
|
||||
white-space: nowrap;
|
||||
background: var(--primary-soft);
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
min-width: 38rem;
|
||||
border-collapse: collapse;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 1rem clamp(1.25rem, 3vw, 2rem);
|
||||
color: var(--muted);
|
||||
font-size: .75rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .08em;
|
||||
text-transform: uppercase;
|
||||
background: #fafbfe;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1.15rem clamp(1.25rem, 3vw, 2rem);
|
||||
border-top: 1px solid var(--line);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
transition: background .18s ease;
|
||||
}
|
||||
|
||||
tbody tr:hover {
|
||||
background: #faf9ff;
|
||||
}
|
||||
|
||||
.member {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .85rem;
|
||||
font-weight: 750;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
display: grid;
|
||||
width: 2.45rem;
|
||||
aspect-ratio: 1;
|
||||
flex: 0 0 auto;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
color: var(--primary);
|
||||
font-size: .82rem;
|
||||
font-weight: 850;
|
||||
background: var(--primary-soft);
|
||||
}
|
||||
|
||||
.phone {
|
||||
color: var(--muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.empty {
|
||||
padding: clamp(3rem, 10vw, 6rem) 1.5rem;
|
||||
text-align: center;
|
||||
background: var(--empty-bg);
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
display: grid;
|
||||
width: 3.5rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
margin: 0 auto 1rem;
|
||||
border-radius: 1rem;
|
||||
color: var(--primary);
|
||||
font-size: 1.4rem;
|
||||
background: var(--primary-soft);
|
||||
}
|
||||
|
||||
.empty h2 {
|
||||
margin: 0;
|
||||
font-size: 1.2rem;
|
||||
letter-spacing: -.03em;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
margin: .5rem 0 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
@media (max-width: 40rem) {
|
||||
.header {
|
||||
align-items: start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.count {
|
||||
align-self: start;
|
||||
}
|
||||
}
|
||||
.button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
|
||||
:root {
|
||||
--ink: #172033;
|
||||
--muted: #667085;
|
||||
--card: rgba(255, 255, 255, .92);
|
||||
--line: #d7ddea;
|
||||
--primary: #6255e7;
|
||||
--success-bg: #eafaf1;
|
||||
--success-ink: #176b42;
|
||||
}
|
||||
|
||||
* { 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 12% 15%, #cfe1ff 0, transparent 28rem),
|
||||
radial-gradient(circle at 88% 88%, #e6d8ff 0, transparent 26rem),
|
||||
#f6f7fb;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: min(100%, 31rem);
|
||||
padding: clamp(1.75rem, 7vw, 3rem);
|
||||
border: 1px solid rgba(255, 255, 255, .85);
|
||||
border-radius: 1.5rem;
|
||||
background: var(--card);
|
||||
box-shadow: 0 1.5rem 4rem rgba(53, 56, 105, .16);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0 0 1rem;
|
||||
color: var(--primary);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sparkle {
|
||||
display: grid;
|
||||
width: 1.65rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .55rem;
|
||||
color: white;
|
||||
font-size: .95rem;
|
||||
background: linear-gradient(135deg, #7668ff, #a75ff4);
|
||||
}
|
||||
.button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 7vw, 3rem);
|
||||
letter-spacing: -.055em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 1rem 0 2rem;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: .55rem;
|
||||
font-size: .92rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
padding: .75rem 1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: .75rem;
|
||||
outline: none;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
background: white;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 .25rem rgba(98, 85, 231, .15);
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
margin-top: 1rem;
|
||||
border: 0;
|
||||
border-radius: .75rem;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
font: inherit;
|
||||
font-weight: 750;
|
||||
background: linear-gradient(135deg, var(--primary), #8a5ce5);
|
||||
box-shadow: 0 .65rem 1.3rem rgba(98, 85, 231, .24);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.result {
|
||||
margin: 1.5rem 0 0;
|
||||
padding: .9rem 1rem;
|
||||
border-radius: .75rem;
|
||||
color: var(--success-ink);
|
||||
line-height: 1.45;
|
||||
background: var(--success-bg);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
: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; } }
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
body{min-width:320px;margin:0;padding:2rem;color:#eef3ff;font-family:Inter,system-ui,sans-serif;background:#090e1d}.card{width:min(100%,42rem);margin:auto;padding:2rem;border:1px solid #2b3d68;border-radius:1rem;background:#172443}h1{margin-top:0}h2{margin:0}.intro,.help{color:#aab9d8;line-height:1.5}.section{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #2b3d68}label{display:block;margin:.9rem 0 .35rem;font-weight:700}input[type=url]{width:100%;min-height:2.8rem;padding:.65rem;border:1px solid #526b9f;border-radius:.55rem;color:#eef3ff;font:inherit;background:#0a1123}.check{display:flex;gap:.6rem;align-items:center}.check label{margin:0}.button{min-height:2.8rem;margin-top:1rem;padding:.6rem 1rem;border:0;border-radius:.55rem;color:#17132b;font:inherit;font-weight:800;background:#a6ccff;cursor:pointer}.button--secondary{margin-right:.7rem;background:#d8c1fb}.alert,.errorlist{margin-top:1rem;padding:.75rem;border-radius:.55rem}.alert--success{color:#d1fae5;background:#14532d}.alert--error,.errorlist{color:#fee2e2;background:#7f1d1d}.messages{padding:0;list-style:none}@media(max-width:32rem){body{padding:1rem}.card{padding:1.4rem}}
|
||||
@@ -0,0 +1,111 @@
|
||||
:root {
|
||||
color-scheme: dark;
|
||||
--theme-bg: #090e1d;
|
||||
--theme-ink: #eef3ff;
|
||||
--theme-muted: #aab9d8;
|
||||
--theme-surface: #172443;
|
||||
--theme-surface-raised: #111a31;
|
||||
--theme-line: #2b3d68;
|
||||
--theme-input: #0a1123;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] {
|
||||
color-scheme: light;
|
||||
--ink: #172033;
|
||||
--i: #172033;
|
||||
--muted: #536174;
|
||||
--m: #536174;
|
||||
--line: #c4cede;
|
||||
--l: #c4cede;
|
||||
--surface: #ffffff;
|
||||
--surface-2: #f2f6fc;
|
||||
--card: rgba(255, 255, 255, .94);
|
||||
--theme-bg: #f4f7fc;
|
||||
--theme-ink: #172033;
|
||||
--theme-muted: #536174;
|
||||
--theme-surface: #ffffff;
|
||||
--theme-surface-raised: #f2f6fc;
|
||||
--theme-line: #c4cede;
|
||||
--theme-input: #ffffff;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] body {
|
||||
color: var(--theme-ink) !important;
|
||||
background: radial-gradient(circle at 8% 0%, #dbeaff 0, transparent 31rem), radial-gradient(circle at 96% 100%, #eee2ff 0, transparent 29rem), var(--theme-bg) !important;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] .card,
|
||||
:root[data-theme="light"] .welcome-card,
|
||||
:root[data-theme="light"] .upload-card,
|
||||
:root[data-theme="light"] .results-card,
|
||||
:root[data-theme="light"] .panel,
|
||||
:root[data-theme="light"] .map-panel {
|
||||
border-color: var(--theme-line) !important;
|
||||
background: var(--theme-surface) !important;
|
||||
box-shadow: 0 1rem 3rem rgba(32, 54, 92, .14) !important;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] .topbar,
|
||||
:root[data-theme="light"] .map-header,
|
||||
:root[data-theme="light"] .nav,
|
||||
:root[data-theme="light"] .filters,
|
||||
:root[data-theme="light"] .result-group,
|
||||
:root[data-theme="light"] .prediction,
|
||||
:root[data-theme="light"] .event,
|
||||
:root[data-theme="light"] .drop-zone {
|
||||
border-color: var(--theme-line) !important;
|
||||
color: var(--theme-ink);
|
||||
background: var(--theme-surface-raised) !important;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] input,
|
||||
:root[data-theme="light"] select,
|
||||
:root[data-theme="light"] textarea,
|
||||
:root[data-theme="light"] .path {
|
||||
border-color: var(--theme-line) !important;
|
||||
color: var(--theme-ink) !important;
|
||||
background: var(--theme-input) !important;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] .intro,
|
||||
:root[data-theme="light"] .lede,
|
||||
:root[data-theme="light"] .subject,
|
||||
:root[data-theme="light"] .message,
|
||||
:root[data-theme="light"] .help,
|
||||
:root[data-theme="light"] .empty,
|
||||
:root[data-theme="light"] .meta,
|
||||
:root[data-theme="light"] .popup-meta {
|
||||
color: var(--theme-muted) !important;
|
||||
}
|
||||
|
||||
.theme-toggle {
|
||||
position: fixed;
|
||||
top: 1rem;
|
||||
left: 1rem;
|
||||
z-index: 1200;
|
||||
min-height: 2.5rem;
|
||||
padding: .5rem .75rem;
|
||||
border: 1px solid var(--theme-line);
|
||||
border-radius: 999px;
|
||||
color: var(--theme-ink);
|
||||
font: 700 .82rem/1 Inter, ui-sans-serif, system-ui, sans-serif;
|
||||
background: var(--theme-surface);
|
||||
box-shadow: 0 .35rem 1.25rem rgba(1, 3, 12, .24);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.theme-toggle:hover { filter: brightness(1.08); }
|
||||
.theme-toggle:focus-visible { outline: 3px solid #8abaff; outline-offset: 3px; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { transition-duration: .01ms !important; }
|
||||
}
|
||||
|
||||
|
||||
/* Shared light-mode typography for the Fireworks pages. */
|
||||
:root[data-theme="light"] .shell h1 { color: #172b50 !important; }
|
||||
:root[data-theme="light"] .shell h2 { color: #203b63 !important; }
|
||||
:root[data-theme="light"] .shell h3 { color: #31527f !important; }
|
||||
:root[data-theme="light"] .shell .kicker,
|
||||
:root[data-theme="light"] .shell .eyebrow { color: #3f6fa9 !important; }
|
||||
:root[data-theme="light"] .shell .map-header strong { color: #243e65 !important; }
|
||||
+17
-159
@@ -1,33 +1,17 @@
|
||||
{% 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>Welkom · Sound Signal</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
||||
<style>
|
||||
:root { --ink:#eef3ff; --muted:#aab9d8; --line:#2b3d68; --blue:#8abaff; --violet:#b69cff; --amber:#ffbd62; }
|
||||
* { 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; }
|
||||
.welcome-card { width:min(100%,44rem); position:relative; overflow:hidden; padding:clamp(2rem,7vw,4.75rem); border:1px solid var(--line); border-radius:1.5rem; background:linear-gradient(145deg,#172443e8,#10182ddd); box-shadow:0 1.75rem 5rem #01030c99; backdrop-filter:blur(16px); }
|
||||
.welcome-card::before { content:""; width:15rem; height:15rem; position:absolute; top:-8rem; right:-6rem; border-radius:50%; background:linear-gradient(135deg,#609df177,#b27be266); filter:blur(1px); }.welcome-card::after { content:""; width:10rem; height:10rem; position:absolute; bottom:-6rem; left:-4rem; border-radius:50%; background:#f4a74225; }
|
||||
.brand { display:flex; align-items:center; gap:.65rem; margin-bottom:clamp(2rem,5vw,4rem); color:#d9e5ff; font-size:.78rem; font-weight:900; letter-spacing:.14em; text-transform:uppercase; }.brand-mark { display:grid; width:2.2rem; aspect-ratio:1; place-items:center; border-radius:.7rem; color:#17132b; font-size:1.1rem; background:linear-gradient(135deg,#fcd34d,#fb7185); box-shadow:0 .5rem 1.5rem #fb718550; }
|
||||
.eyebrow { margin:0 0 .8rem; color:#bad3ff; font-size:.76rem; font-weight:800; letter-spacing:.14em; text-transform:uppercase; }.eyebrow::before { content:""; display:inline-block; width:.55rem; height:.55rem; margin-right:.45rem; border-radius:50%; background:var(--amber); box-shadow:0 0 0 .25rem #fbbf2430; }
|
||||
h1 { max-width:10ch; margin:0; font-size:clamp(2.8rem,8vw,5.75rem); line-height:.96; letter-spacing:-.065em; }.subject { max-width:33rem; margin:1.35rem 0 0; color:var(--muted); font-size:clamp(1rem,2vw,1.15rem); line-height:1.65; }.subject strong { color:#e8efff; }.sparkle { color:var(--violet); font-size:1.2em; }
|
||||
.actions { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; margin-top:2.25rem; }
|
||||
.profile-circle { display:grid; width:3rem; height:3rem; position:fixed; top:1.25rem; right:1.25rem; place-items:center; border:1px solid #d0c0ff; border-radius:50%; z-index:2; color:#17132b; font-weight:900; text-decoration:none; background:linear-gradient(135deg,#fcd34d,#c4a5fd); box-shadow:0 .5rem 1.5rem #01030c66; }
|
||||
.profile-circle:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
.button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }.hint { color:#99add2; font-size:.82rem; }
|
||||
@media (max-width:30rem) { .welcome-card { padding:2rem 1.5rem; }.actions { align-items:stretch; flex-direction:column; }.button { width:100%; }.hint { text-align:center; } }
|
||||
@media (prefers-reduced-motion:reduce) { .button { transition:none; } }
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/home.js" %}
|
||||
</head>
|
||||
<body>
|
||||
{% if user.is_authenticated %}<a class="profile-circle" href="{% url 'user_settings' %}" aria-label="Open settings for {{ user.get_username }}" title="Settings">{{ user.get_username|first|upper }}</a>{% endif %}
|
||||
<div style="width:min(100%,80rem);display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,20rem),1fr));gap:1.25rem;align-items:stretch;">
|
||||
<main class="welcome-card" style="width:100%;">
|
||||
<div class="home-grid">
|
||||
<main class="welcome-card">
|
||||
<div class="brand"><span class="brand-mark">✦</span> Sound Signal</div>
|
||||
<p class="eyebrow">Control room</p>
|
||||
<h1>Welkom {{ naam }}</h1>
|
||||
@@ -40,154 +24,28 @@
|
||||
<span class="hint">Audio analysis · Sensor map</span>
|
||||
</div>
|
||||
</main>
|
||||
<section aria-labelledby="manual-report-title" style="position:relative;overflow:hidden;padding:clamp(2rem,6vw,4.75rem);border:2px solid #a85a1e;border-radius:1.5rem;background:linear-gradient(145deg,#4a2b16e8,#171225dd);box-shadow:0 1.75rem 5rem #01030c99;">
|
||||
<section class="manual-report" aria-labelledby="manual-report-title">
|
||||
<p class="eyebrow">No recording needed</p>
|
||||
<h2 id="manual-report-title" style="margin:.2rem 0 .75rem;font-size:clamp(2rem,4vw,3.1rem);line-height:1;letter-spacing:-.06em;">Report fireworks now</h2>
|
||||
<p style="margin:0 0 1.5rem;color:#f3c8a3;line-height:1.55;">Choose how many times you heard fireworks, then send it straight to Pending. The report is timestamped now.</p>
|
||||
<h2 class="manual-report__title" id="manual-report-title">Report fireworks now</h2>
|
||||
<p class="manual-report__intro">Choose how many times you heard fireworks, then send it straight to Pending. The report is timestamped now.</p>
|
||||
<form id="manual-report-form" action="{% url 'fireworks_detect:submit_manual_pending' %}" method="post" hx-post="{% url 'fireworks_detect:submit_manual_pending' %}" hx-target="#manual-submission" hx-swap="outerHTML">
|
||||
{% csrf_token %}
|
||||
<label for="manual-occurrences" style="display:block;margin-bottom:.5rem;font-weight:800;">Number of occurrences</label>
|
||||
<label class="manual-report__label" for="manual-occurrences">Number of occurrences</label>
|
||||
<input id="manual-latitude" name="latitude" type="hidden">
|
||||
<input id="manual-longitude" name="longitude" type="hidden">
|
||||
<input id="manual-direction-degrees" name="direction_degrees" type="hidden">
|
||||
<input id="manual-direction-accuracy" name="direction_accuracy_degrees" type="hidden">
|
||||
<input id="manual-occurrences" name="occurrences" type="number" min="1" max="1000" value="1" required inputmode="numeric" style="width:100%;min-height:3.3rem;margin-bottom:1rem;padding:.75rem .9rem;border:1px solid #e2934a;border-radius:.75rem;color:#eef3ff;font:inherit;font-weight:800;background:#151b31;">
|
||||
<div id="manual-direction-panel" hidden style="margin:0 0 1rem;padding:1rem;border:1px solid #8d5bb5;border-radius:.75rem;background:#241b38;">
|
||||
<strong style="display:block;margin-bottom:.35rem;">Direction <span style="color:#c7b5eb;font-weight:600;">(optional)</span></strong>
|
||||
<p style="margin:0 0 .75rem;color:#d4c6ef;font-size:.88rem;line-height:1.45;">Point the top of your phone toward the fireworks, then capture a single compass reading.</p>
|
||||
<button id="manual-capture-direction" type="button" style="min-height:2.75rem;padding:.65rem .9rem;border:1px solid #c3a5eb;border-radius:.65rem;color:#211234;font:inherit;font-weight:850;background:#d8c1fb;cursor:pointer;">Capture direction</button>
|
||||
<div id="manual-direction-status" style="min-height:1.4rem;margin-top:.7rem;color:#e5dcf7;font-size:.9rem;" aria-live="polite"></div>
|
||||
<input id="manual-occurrences" name="occurrences" type="number" min="1" max="1000" value="1" required inputmode="numeric">
|
||||
<div class="manual-direction-panel" id="manual-direction-panel" hidden>
|
||||
<strong class="manual-direction-panel__heading">Direction <span>(optional)</span></strong>
|
||||
<p class="manual-direction-panel__copy">Point the top of your phone toward the fireworks, then capture a single compass reading.</p>
|
||||
<button id="manual-capture-direction" class="manual-direction-panel__button" type="button">Capture direction</button>
|
||||
<div id="manual-direction-status" class="manual-direction-panel__status" aria-live="polite"></div>
|
||||
</div>
|
||||
<button id="manual-submit" type="button" style="width:100%;min-height:6rem;border:0;border-radius:1rem;color:#281306;font:inherit;font-size:clamp(1.1rem,2vw,1.45rem);font-weight:900;background:linear-gradient(135deg,#ffd18c,#ff8f5b);box-shadow:0 .75rem 1.8rem #d664344d;cursor:pointer;">I heard fireworks — send to Pending</button>
|
||||
<button id="manual-submit" class="manual-report__submit" type="button">I heard fireworks — send to Pending</button>
|
||||
</form>
|
||||
<div id="manual-submission" style="min-height:1.5rem;margin-top:1rem;color:#ffd18c;" aria-live="polite"></div>
|
||||
<div id="manual-submission" class="manual-report__submission" aria-live="polite"></div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
const manualForm = document.querySelector("#manual-report-form");
|
||||
const manualSubmit = document.querySelector("#manual-submit");
|
||||
const manualStatus = document.querySelector("#manual-submission");
|
||||
const latitude = document.querySelector("#manual-latitude");
|
||||
const longitude = document.querySelector("#manual-longitude");
|
||||
const directionDegrees = document.querySelector("#manual-direction-degrees");
|
||||
const directionAccuracy = document.querySelector("#manual-direction-accuracy");
|
||||
const captureDirectionButton = document.querySelector("#manual-capture-direction");
|
||||
const directionStatus = document.querySelector("#manual-direction-status");
|
||||
const directionPanel = document.querySelector("#manual-direction-panel");
|
||||
const isMobileDevice = /Android|iPhone|iPad|iPod|IEMobile|Opera Mini/.test(navigator.userAgent)
|
||||
|| (navigator.userAgent.includes("Macintosh") && navigator.maxTouchPoints > 1);
|
||||
if (isMobileDevice) directionPanel.hidden = false;
|
||||
let orientationListener;
|
||||
let compassUnavailableTimeout;
|
||||
|
||||
const isUsableNumber = (value) => Number.isFinite(value);
|
||||
const cardinalDirection = (heading) => ["N", "NE", "E", "SE", "S", "SW", "W", "NW"][Math.floor(((heading + 22.5) % 360) / 45)];
|
||||
const displayDegrees = (value) => Number(value.toFixed(1)).toString();
|
||||
|
||||
const stopCompassReading = () => {
|
||||
if (orientationListener) window.removeEventListener("deviceorientation", orientationListener);
|
||||
window.clearTimeout(compassUnavailableTimeout);
|
||||
orientationListener = null;
|
||||
compassUnavailableTimeout = null;
|
||||
};
|
||||
|
||||
const showCapturedDirection = (heading, accuracy) => {
|
||||
const accuracyText = accuracy === null ? "Accuracy unavailable" : "Accuracy: ±" + displayDegrees(accuracy) + "°";
|
||||
directionStatus.innerHTML = "<strong>" + displayDegrees(heading) + "° · " + cardinalDirection(heading) + "</strong><br>" + accuracyText;
|
||||
captureDirectionButton.textContent = "Stop direction capture";
|
||||
};
|
||||
|
||||
const listenForCompassReading = () => {
|
||||
stopCompassReading();
|
||||
directionStatus.textContent = "Point the top of your phone toward the sound — direction will update live.";
|
||||
orientationListener = (event) => {
|
||||
const isWebKitCompass = "webkitCompassHeading" in event;
|
||||
const heading = isUsableNumber(event.webkitCompassHeading)
|
||||
? event.webkitCompassHeading
|
||||
: !isWebKitCompass && event.absolute && isUsableNumber(event.alpha)
|
||||
? (360 - event.alpha) % 360
|
||||
: null;
|
||||
if (heading === null || heading < 0 || heading >= 360) return;
|
||||
|
||||
const accuracy = isUsableNumber(event.webkitCompassAccuracy) && event.webkitCompassAccuracy >= 0
|
||||
? event.webkitCompassAccuracy
|
||||
: null;
|
||||
directionDegrees.value = heading;
|
||||
directionAccuracy.value = accuracy === null ? "" : accuracy;
|
||||
showCapturedDirection(heading, accuracy);
|
||||
window.clearTimeout(compassUnavailableTimeout);
|
||||
};
|
||||
window.addEventListener("deviceorientation", orientationListener);
|
||||
compassUnavailableTimeout = window.setTimeout(() => {
|
||||
stopCompassReading();
|
||||
captureDirectionButton.textContent = "Capture direction";
|
||||
directionStatus.textContent = "Compass unavailable on this device.";
|
||||
}, 15000);
|
||||
};
|
||||
|
||||
const captureDirection = async () => {
|
||||
if (orientationListener) {
|
||||
stopCompassReading();
|
||||
captureDirectionButton.textContent = "Capture again";
|
||||
return;
|
||||
}
|
||||
if (!window.isSecureContext) {
|
||||
directionStatus.textContent = "Compass capture requires a secure HTTPS connection.";
|
||||
return;
|
||||
}
|
||||
if (typeof window.DeviceOrientationEvent === "undefined") {
|
||||
directionStatus.textContent = "Compass unavailable on this device.";
|
||||
return;
|
||||
}
|
||||
if (typeof DeviceOrientationEvent.requestPermission === "function") {
|
||||
directionStatus.textContent = "Requesting compass permission…";
|
||||
try {
|
||||
if (await DeviceOrientationEvent.requestPermission(true) !== "granted") {
|
||||
directionStatus.textContent = "Compass permission denied.";
|
||||
return;
|
||||
}
|
||||
} catch (error) {
|
||||
directionStatus.textContent = "Compass permission denied.";
|
||||
return;
|
||||
}
|
||||
}
|
||||
listenForCompassReading();
|
||||
};
|
||||
|
||||
const submitManualReport = () => {
|
||||
stopCompassReading();
|
||||
manualSubmit.disabled = true;
|
||||
if (window.htmx) {
|
||||
htmx.ajax("POST", manualForm.action, {
|
||||
source: manualForm,
|
||||
target: "#manual-submission",
|
||||
swap: "outerHTML",
|
||||
});
|
||||
} else {
|
||||
manualForm.submit();
|
||||
}
|
||||
};
|
||||
|
||||
captureDirectionButton.addEventListener("click", captureDirection);
|
||||
manualSubmit.addEventListener("click", () => {
|
||||
if (!navigator.geolocation) {
|
||||
submitManualReport();
|
||||
return;
|
||||
}
|
||||
manualStatus.textContent = "Requesting your optional location…";
|
||||
navigator.geolocation.getCurrentPosition(
|
||||
(position) => {
|
||||
latitude.value = position.coords.latitude;
|
||||
longitude.value = position.coords.longitude;
|
||||
submitManualReport();
|
||||
},
|
||||
() => submitManualReport(),
|
||||
{ enableHighAccuracy: false, maximumAge: 300000, timeout: 10000 },
|
||||
);
|
||||
});
|
||||
document.body.addEventListener("htmx:afterRequest", (event) => {
|
||||
if (event.detail.elt === manualForm) manualSubmit.disabled = false;
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,138 +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>Hello</title>
|
||||
<style>
|
||||
:root {
|
||||
--ink: #172033;
|
||||
--muted: #667085;
|
||||
--card: rgba(255, 255, 255, .92);
|
||||
--line: #d7ddea;
|
||||
--primary: #6255e7;
|
||||
--success-bg: #eafaf1;
|
||||
--success-ink: #176b42;
|
||||
}
|
||||
|
||||
* { 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 12% 15%, #cfe1ff 0, transparent 28rem),
|
||||
radial-gradient(circle at 88% 88%, #e6d8ff 0, transparent 26rem),
|
||||
#f6f7fb;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: min(100%, 31rem);
|
||||
padding: clamp(1.75rem, 7vw, 3rem);
|
||||
border: 1px solid rgba(255, 255, 255, .85);
|
||||
border-radius: 1.5rem;
|
||||
background: var(--card);
|
||||
box-shadow: 0 1.5rem 4rem rgba(53, 56, 105, .16);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0 0 1rem;
|
||||
color: var(--primary);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sparkle {
|
||||
display: grid;
|
||||
width: 1.65rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .55rem;
|
||||
color: white;
|
||||
font-size: .95rem;
|
||||
background: linear-gradient(135deg, #7668ff, #a75ff4);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 7vw, 3rem);
|
||||
letter-spacing: -.055em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 1rem 0 2rem;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: .55rem;
|
||||
font-size: .92rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
padding: .75rem 1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: .75rem;
|
||||
outline: none;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
background: white;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 .25rem rgba(98, 85, 231, .15);
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
margin-top: 1rem;
|
||||
border: 0;
|
||||
border-radius: .75rem;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
font: inherit;
|
||||
font-weight: 750;
|
||||
background: linear-gradient(135deg, var(--primary), #8a5ce5);
|
||||
box-shadow: 0 .65rem 1.3rem rgba(98, 85, 231, .24);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.result {
|
||||
margin: 1.5rem 0 0;
|
||||
padding: .9rem 1rem;
|
||||
border-radius: .75rem;
|
||||
color: var(--success-ink);
|
||||
line-height: 1.45;
|
||||
background: var(--success-bg);
|
||||
}
|
||||
.button { width: 100%;display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/member-form.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="card">
|
||||
|
||||
@@ -1,218 +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>Members</title>
|
||||
<style>
|
||||
:root {
|
||||
--ink: #172033;
|
||||
--muted: #667085;
|
||||
--card: rgba(255, 255, 255, .94);
|
||||
--line: #e1e6ef;
|
||||
--primary: #6255e7;
|
||||
--primary-soft: #f0eeff;
|
||||
--empty-bg: #f7f8fc;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
min-width: 320px;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
padding: clamp(1.25rem, 5vw, 4rem);
|
||||
color: var(--ink);
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system,
|
||||
BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
background:
|
||||
radial-gradient(circle at 8% 8%, #d9e7ff 0, transparent 30rem),
|
||||
radial-gradient(circle at 92% 90%, #eadcff 0, transparent 30rem),
|
||||
#f6f7fb;
|
||||
}
|
||||
|
||||
.page {
|
||||
width: min(100%, 70rem);
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(255, 255, 255, .9);
|
||||
border-radius: 1.5rem;
|
||||
background: var(--card);
|
||||
box-shadow: 0 1.5rem 4rem rgba(53, 56, 105, .14);
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: end;
|
||||
justify-content: space-between;
|
||||
gap: 1.5rem;
|
||||
padding: clamp(1.5rem, 5vw, 3rem);
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0 0 .85rem;
|
||||
color: var(--primary);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sparkle {
|
||||
display: grid;
|
||||
width: 1.65rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .55rem;
|
||||
color: white;
|
||||
font-size: .95rem;
|
||||
background: linear-gradient(135deg, #7668ff, #a75ff4);
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 5vw, 3.25rem);
|
||||
letter-spacing: -.06em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.intro {
|
||||
max-width: 38rem;
|
||||
margin: .85rem 0 0;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.count {
|
||||
flex: 0 0 auto;
|
||||
margin: 0;
|
||||
padding: .6rem .85rem;
|
||||
border-radius: 999px;
|
||||
color: var(--primary);
|
||||
font-size: .88rem;
|
||||
font-weight: 750;
|
||||
white-space: nowrap;
|
||||
background: var(--primary-soft);
|
||||
}
|
||||
|
||||
.table-wrap {
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
min-width: 38rem;
|
||||
border-collapse: collapse;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
th {
|
||||
padding: 1rem clamp(1.25rem, 3vw, 2rem);
|
||||
color: var(--muted);
|
||||
font-size: .75rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .08em;
|
||||
text-transform: uppercase;
|
||||
background: #fafbfe;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 1.15rem clamp(1.25rem, 3vw, 2rem);
|
||||
border-top: 1px solid var(--line);
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
tbody tr {
|
||||
transition: background .18s ease;
|
||||
}
|
||||
|
||||
tbody tr:hover {
|
||||
background: #faf9ff;
|
||||
}
|
||||
|
||||
.member {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: .85rem;
|
||||
font-weight: 750;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
display: grid;
|
||||
width: 2.45rem;
|
||||
aspect-ratio: 1;
|
||||
flex: 0 0 auto;
|
||||
place-items: center;
|
||||
border-radius: 50%;
|
||||
color: var(--primary);
|
||||
font-size: .82rem;
|
||||
font-weight: 850;
|
||||
background: var(--primary-soft);
|
||||
}
|
||||
|
||||
.phone {
|
||||
color: var(--muted);
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.date {
|
||||
color: var(--muted);
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.empty {
|
||||
padding: clamp(3rem, 10vw, 6rem) 1.5rem;
|
||||
text-align: center;
|
||||
background: var(--empty-bg);
|
||||
}
|
||||
|
||||
.empty-icon {
|
||||
display: grid;
|
||||
width: 3.5rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
margin: 0 auto 1rem;
|
||||
border-radius: 1rem;
|
||||
color: var(--primary);
|
||||
font-size: 1.4rem;
|
||||
background: var(--primary-soft);
|
||||
}
|
||||
|
||||
.empty h2 {
|
||||
margin: 0;
|
||||
font-size: 1.2rem;
|
||||
letter-spacing: -.03em;
|
||||
}
|
||||
|
||||
.empty p {
|
||||
margin: .5rem 0 0;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
@media (max-width: 40rem) {
|
||||
.header {
|
||||
align-items: start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.count {
|
||||
align-self: start;
|
||||
}
|
||||
}
|
||||
.button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/member-list.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="page">
|
||||
|
||||
@@ -1,10 +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">
|
||||
<title>Sign in · Sound Signal</title>
|
||||
<style>body{min-width:320px;min-height:100vh;display:grid;place-items:center;margin:0;padding:1.5rem;color:#eef3ff;font-family:Inter,system-ui,sans-serif;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.card{width:min(100%,27rem);padding:2rem;border:1px solid #2b3d68;border-radius:1.25rem;background:#172443;box-shadow:0 1.75rem 5rem #01030c99}h1{margin:.5rem 0}.intro{color:#aab9d8;line-height:1.5}.error{margin:1rem 0;padding:.75rem;border-radius:.6rem;color:#fee2e2;background:#7f1d1d}label{display:block;margin:1rem 0 .35rem;font-weight:700}input{width:100%;min-height:2.8rem;padding:.65rem;border:1px solid #526b9f;border-radius:.55rem;color:#eef3ff;font:inherit;background:#0a1123}button{width:100%;min-height:2.9rem;margin-top:1.5rem;border:0;border-radius:.65rem;color:#17132b;font:inherit;font-weight:850;background:linear-gradient(135deg,#99c8ff,#c6adff);cursor:pointer}</style>
|
||||
{% vite_asset "frontend/src/entries/login.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="card">
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
{% 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">
|
||||
<title>Settings · Sound Signal</title>
|
||||
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
||||
<style>body{min-width:320px;margin:0;padding:2rem;color:#eef3ff;font-family:Inter,system-ui,sans-serif;background:#090e1d}.card{width:min(100%,42rem);margin:auto;padding:2rem;border:1px solid #2b3d68;border-radius:1rem;background:#172443}h1{margin-top:0}h2{margin:0}.intro,.help{color:#aab9d8;line-height:1.5}.section{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #2b3d68}label{display:block;margin:.9rem 0 .35rem;font-weight:700}input[type=url]{width:100%;min-height:2.8rem;padding:.65rem;border:1px solid #526b9f;border-radius:.55rem;color:#eef3ff;font:inherit;background:#0a1123}.check{display:flex;gap:.6rem;align-items:center}.check label{margin:0}.button{min-height:2.8rem;margin-top:1rem;padding:.6rem 1rem;border:0;border-radius:.55rem;color:#17132b;font:inherit;font-weight:800;background:#a6ccff;cursor:pointer}.button--secondary{margin-right:.7rem;background:#d8c1fb}.alert,.errorlist{margin-top:1rem;padding:.75rem;border-radius:.55rem}.alert--success{color:#d1fae5;background:#14532d}.alert--error,.errorlist{color:#fee2e2;background:#7f1d1d}.messages{padding:0;list-style:none}@media(max-width:32rem){body{padding:1rem}.card{padding:1.4rem}}</style>
|
||||
{% vite_asset "frontend/src/entries/settings.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="card">
|
||||
@@ -27,6 +28,5 @@
|
||||
<button class="button" type="submit">Save settings</button>
|
||||
</form>
|
||||
</main>
|
||||
<script>document.querySelector("#ntfy-url").addEventListener("input", () => { document.querySelector("#ntfy-test-result").replaceChildren(); });</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,136 +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>Hello</title>
|
||||
<style>
|
||||
:root {
|
||||
--ink: #172033;
|
||||
--muted: #667085;
|
||||
--card: rgba(255, 255, 255, .92);
|
||||
--line: #d7ddea;
|
||||
--primary: #6255e7;
|
||||
--success-bg: #eafaf1;
|
||||
--success-ink: #176b42;
|
||||
}
|
||||
|
||||
* { 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 12% 15%, #cfe1ff 0, transparent 28rem),
|
||||
radial-gradient(circle at 88% 88%, #e6d8ff 0, transparent 26rem),
|
||||
#f6f7fb;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: min(100%, 31rem);
|
||||
padding: clamp(1.75rem, 7vw, 3rem);
|
||||
border: 1px solid rgba(255, 255, 255, .85);
|
||||
border-radius: 1.5rem;
|
||||
background: var(--card);
|
||||
box-shadow: 0 1.5rem 4rem rgba(53, 56, 105, .16);
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
margin: 0 0 1rem;
|
||||
color: var(--primary);
|
||||
font-size: .78rem;
|
||||
font-weight: 800;
|
||||
letter-spacing: .11em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.sparkle {
|
||||
display: grid;
|
||||
width: 1.65rem;
|
||||
aspect-ratio: 1;
|
||||
place-items: center;
|
||||
border-radius: .55rem;
|
||||
color: white;
|
||||
font-size: .95rem;
|
||||
background: linear-gradient(135deg, #7668ff, #a75ff4);
|
||||
}
|
||||
.button { display:inline-flex; align-items:center; justify-content:center; gap:.6rem; min-height:2.9rem; padding:.75rem 1.05rem; border:1px solid #b3c9ff; border-radius:.8rem; color:#121a34; font:inherit; font-size:.93rem; font-weight:850; text-decoration:none; background:linear-gradient(135deg,#99c8ff,#c6adff); box-shadow:0 .65rem 1.75rem #7058dd50; transition:transform .2s ease,filter .2s ease; }
|
||||
.button:hover { transform:translateY(-2px); filter:brightness(1.08); }
|
||||
.button:focus-visible { outline:3px solid #a5c9ff80; outline-offset:3px; }
|
||||
h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2rem, 7vw, 3rem);
|
||||
letter-spacing: -.055em;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
.intro {
|
||||
margin: 1rem 0 2rem;
|
||||
color: var(--muted);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
margin-bottom: .55rem;
|
||||
font-size: .92rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
padding: .75rem 1rem;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: .75rem;
|
||||
outline: none;
|
||||
color: var(--ink);
|
||||
font: inherit;
|
||||
background: white;
|
||||
}
|
||||
|
||||
input:focus {
|
||||
border-color: var(--primary);
|
||||
box-shadow: 0 0 0 .25rem rgba(98, 85, 231, .15);
|
||||
}
|
||||
|
||||
button {
|
||||
width: 100%;
|
||||
min-height: 3.15rem;
|
||||
margin-top: 1rem;
|
||||
border: 0;
|
||||
border-radius: .75rem;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
font: inherit;
|
||||
font-weight: 750;
|
||||
background: linear-gradient(135deg, var(--primary), #8a5ce5);
|
||||
box-shadow: 0 .65rem 1.3rem rgba(98, 85, 231, .24);
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.result {
|
||||
margin: 1.5rem 0 0;
|
||||
padding: .9rem 1rem;
|
||||
border-radius: .75rem;
|
||||
color: var(--success-ink);
|
||||
line-height: 1.45;
|
||||
background: var(--success-bg);
|
||||
}
|
||||
</style>
|
||||
{% vite_asset "frontend/src/entries/member-success.js" %}
|
||||
</head>
|
||||
<body>
|
||||
<main class="card">
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
.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)}}
|
||||
@@ -0,0 +1 @@
|
||||
: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;-webkit-backdrop-filter:blur(16px);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}}
|
||||
@@ -0,0 +1 @@
|
||||
:root{--i:#edf3ff;--m:#aab9d8;--l:#2b3d68}*{box-sizing:border-box}body{margin:0;min-height:100vh;padding:2rem;color:var(--i);font-family:system-ui;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.shell{width:min(100%,70rem);margin:auto}.top{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:3rem}.brand,a{color:inherit}.brand{text-decoration:none;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.top a:not(.brand){padding:.6rem .8rem;border:1px solid var(--l);border-radius:.6rem;text-decoration:none}.eyebrow{color:#bcd4ff;font-size:.76rem;letter-spacing:.15em;text-transform:uppercase;font-weight:800}h1{font-size:clamp(2.5rem,6vw,4.5rem);letter-spacing:-.06em;margin:.4rem 0}.lede{color:var(--m);max-width:38rem;line-height:1.6}.grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:1rem;margin-top:2rem}.panel{border:1px solid var(--l);border-radius:1rem;padding:1rem;background:#111a31d9}.event{width:100%;display:flex;justify-content:space-between;gap:.6rem;text-align:left;margin:.6rem 0;padding:.85rem;border:1px solid #374e7e;border-radius:.7rem;color:var(--i);background:#15223f;cursor:pointer}.event:hover{background:#20345f}.event--manual{border-color:#e2934a;background:linear-gradient(90deg,#70401e,#15223f)}.event small,.empty{color:var(--m)}.badge{color:#ffd08a}.detail h2{margin-top:0}.prediction{display:flex;justify-content:space-between;gap:1rem;padding:.65rem;margin:.45rem 0;border-left:3px solid #78a4f0;background:#111c34}.prediction--firework{border-color:#f5aa44}.prediction--speech{border-color:#fb7185}.meta{color:var(--m);font-size:.9rem}@media(max-width:42rem){body{padding:1rem}.grid{grid-template-columns:1fr}}.event__content{display:grid;gap:.16rem}.event__source{color:#bcd4ff;font-size:.67rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}.event--sensor{border-color:#5478b7;background:linear-gradient(90deg,#1b355f,#15223f 72%)}.event--sensor .badge{color:#a9ccff}.event--manual .event__source{color:#ffd08a}.event--sensor:hover{background:linear-gradient(90deg,#25497e,#20345f 72%)}.event-nav{display:flex;gap:.3rem;padding:.25rem;border:1px solid var(--l);border-radius:.75rem;background:#111a31d9;box-shadow:0 .5rem 1.5rem #03071440}.top .event-nav a{padding:.5rem .75rem;border:0;border-radius:.5rem;color:var(--m);font-size:.86rem;font-weight:750;text-decoration:none}.top .event-nav a:hover{color:var(--i);background:#20345f}.top .event-nav a[aria-current=page]{color:var(--i);background:#2a3b67}:root[data-theme=light] .event-nav{border-color:#cbd9ed;background:#edf4ff;box-shadow:0 .45rem 1.25rem #2244751f}:root[data-theme=light] .top .event-nav a{color:#47617f}:root[data-theme=light] .top .event-nav a:hover{color:#234a7b;background:#dceaff}:root[data-theme=light] .top .event-nav a[aria-current=page]{color:#173d6a;background:#cfe3ff;box-shadow:inset 0 0 0 1px #9cc0ed}:root[data-theme=light] .event{color:#1d2d46;border-color:#cfdaea;background:#f7faff;box-shadow:0 .35rem .9rem #263e650f}:root[data-theme=light] .event:hover{background:#edf4ff}:root[data-theme=light] .event small{color:#61718a}:root[data-theme=light] .event__source{color:#426b9f}:root[data-theme=light] .event--sensor{border-color:#8eafd9;background:linear-gradient(90deg,#edf6ff,#e1edff 76%)}:root[data-theme=light] .event--sensor:hover{background:linear-gradient(90deg,#e2f0ff,#d4e6ff 76%)}:root[data-theme=light] .event--sensor .badge{color:#245b95}:root[data-theme=light] .event--manual{border-color:#e4a35c;background:linear-gradient(90deg,#fff8ee,#ffe3bf 76%)}:root[data-theme=light] .event--manual:hover{background:linear-gradient(90deg,#fff1df,#ffd7a3 76%)}:root[data-theme=light] .event--manual .event__source,:root[data-theme=light] .event--manual .badge{color:#9a4b13}
|
||||
@@ -0,0 +1 @@
|
||||
:root{--i:#edf3ff;--m:#aab9d8;--l:#2b3d68}*{box-sizing:border-box}body{margin:0;min-height:100vh;padding:2rem;color:var(--i);font-family:system-ui;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.shell{width:min(100%,70rem);margin:auto}.top{display:flex;justify-content:space-between;gap:1rem;align-items:center;margin-bottom:3rem}.brand,a{color:inherit}.brand{text-decoration:none;font-weight:900;letter-spacing:.1em;text-transform:uppercase}.top a:not(.brand){padding:.6rem .8rem;border:1px solid var(--l);border-radius:.6rem;text-decoration:none}.eyebrow{color:#bcd4ff;font-size:.76rem;letter-spacing:.15em;text-transform:uppercase;font-weight:800}h1{font-size:clamp(2.5rem,6vw,4.5rem);letter-spacing:-.06em;margin:.4rem 0}.lede{color:var(--m);max-width:38rem;line-height:1.6}.grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:1rem;margin-top:2rem}.panel{border:1px solid var(--l);border-radius:1rem;padding:1rem;background:#111a31d9}.event{width:100%;display:flex;justify-content:space-between;gap:.6rem;text-align:left;margin:.6rem 0;padding:.85rem;border:1px solid #374e7e;border-radius:.7rem;color:var(--i);background:#15223f;cursor:pointer}.event:hover{background:#20345f}.event--manual{border-color:#e2934a;background:linear-gradient(90deg,#70401e,#15223f)}.event small,.empty{color:var(--m)}.badge{color:#ffd08a}.detail h2{margin-top:0}.prediction{display:flex;justify-content:space-between;gap:1rem;padding:.65rem;margin:.45rem 0;border-left:3px solid #78a4f0;background:#111c34}.prediction--firework{border-color:#f5aa44}.prediction--speech{border-color:#fb7185}.meta{color:var(--m);font-size:.9rem}@media(max-width:42rem){body{padding:1rem}.grid{grid-template-columns:1fr}}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
.fireworks-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:3.5rem}.fireworks-brand{display:flex;align-items:center;gap:.7rem;color:var(--ink, var(--i, #eef3ff));font-size:.9rem;font-weight:800;letter-spacing:.1em;text-decoration:none;text-transform:uppercase}.fireworks-header .brand-mark{display:grid;width:2.25rem;aspect-ratio:1;place-items:center;border-radius:.75rem;color:#141022;background:linear-gradient(135deg,#fcd34d,#fb7185);box-shadow:0 .5rem 1.5rem #fb718550}.fireworks-header__controls{display:flex;align-items:center;gap:.65rem}.fireworks-nav{display:flex;gap:.3rem;padding:.25rem;border:1px solid var(--line, var(--l, #2b3d68));border-radius:.75rem;background:#111a31d9;box-shadow:0 .5rem 1.5rem #03071440}.fireworks-nav a{padding:.5rem .75rem;border-radius:.5rem;color:var(--muted, var(--m, #aab9d8));font-size:.86rem;font-weight:750;text-decoration:none}.fireworks-nav a:hover{color:var(--ink, var(--i, #eef3ff));background:#20345f}.fireworks-nav a[aria-current=page]{color:var(--ink, var(--i, #eef3ff));background:#2a3b67}.theme-toggle--inline{position:static;flex:0 0 auto;min-height:2.35rem;padding:.45rem .7rem;white-space:nowrap}:root[data-theme=light] .fireworks-nav{border-color:#cbd9ed;background:#edf4ff;box-shadow:0 .45rem 1.25rem #2244751f}:root[data-theme=light] .fireworks-nav a{color:#47617f}:root[data-theme=light] .fireworks-nav a:hover{color:#234a7b;background:#dceaff}:root[data-theme=light] .fireworks-nav a[aria-current=page]{color:#173d6a;background:#cfe3ff;box-shadow:inset 0 0 0 1px #9cc0ed}@media(max-width:44rem){.fireworks-header{align-items:flex-start;flex-direction:column;margin-bottom:2.5rem}.fireworks-header__controls{width:100%;justify-content:space-between}}@media(max-width:30rem){.fireworks-header__controls{align-items:stretch;flex-direction:column}.fireworks-nav{justify-content:space-between}.fireworks-nav a{flex:1;padding:.5rem;text-align:center}.theme-toggle--inline{width:100%}}
|
||||
@@ -0,0 +1 @@
|
||||
document.querySelectorAll(".audio-preview").forEach(function(i){var t=i.querySelector(".audio-play"),e=i.querySelector("audio"),o=i.querySelector(".audio-play__label"),n=i.querySelector(".audio-status");t.addEventListener("click",function(){e.src||(e.src=t.dataset.audioUrl,t.classList.add("is-loading"),n.textContent="Loading recording…"),e.paused?e.play().catch(function(){t.classList.remove("is-loading"),n.textContent="Could not play this recording."}):e.pause()}),e.addEventListener("playing",function(){t.classList.remove("is-loading"),o.textContent="Pause recording",n.textContent="Playing now"}),e.addEventListener("pause",function(){e.ended||(o.textContent="Resume recording",n.textContent="Paused")}),e.addEventListener("ended",function(){o.textContent="Replay recording",n.textContent="Finished"}),e.addEventListener("waiting",function(){t.classList.add("is-loading"),n.textContent="Buffering…"}),e.addEventListener("canplay",function(){t.classList.remove("is-loading")}),e.addEventListener("error",function(){t.classList.remove("is-loading"),n.textContent="Could not load this recording."})});
|
||||
@@ -0,0 +1 @@
|
||||
/* empty css */import"../../../theme-BwRovl8e.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
/* empty css */import"../../../theme-BwRovl8e.js";const r=document.querySelector(".upload-form"),n=document.querySelector("#drop-zone"),o=document.querySelector("#audio-file"),d=document.querySelector("#file-name"),a=document.querySelector("#upload-status"),s=e=>{d.textContent=e?e.name:"No file selected"};o.addEventListener("change",()=>s(o.files[0]));["dragenter","dragover"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.add("dragging")}));["dragleave","drop"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.remove("dragging")}));n.addEventListener("drop",e=>{const[t]=e.dataTransfer.files;t&&(o.files=e.dataTransfer.files,s(t))});r.addEventListener("htmx:beforeRequest",()=>{a.textContent="Analysing your recording…",r.setAttribute("aria-busy","true")});r.addEventListener("htmx:afterRequest",()=>{a.textContent="",r.removeAttribute("aria-busy")});r.addEventListener("htmx:responseError",()=>{a.textContent="Analysis could not be completed."});document.body.addEventListener("htmx:beforeSwap",e=>{e.detail.xhr.status>=400&&(e.detail.shouldSwap=!0,e.detail.isError=!1)});window.addEventListener("pageshow",e=>{e.persisted&&(o.value="",s(),a.textContent="",document.querySelector("#classification-results").replaceChildren())});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";const r=document.querySelector(".upload-form"),n=document.querySelector("#drop-zone"),o=document.querySelector("#audio-file"),d=document.querySelector("#file-name"),a=document.querySelector("#upload-status"),s=e=>{d.textContent=e?e.name:"No file selected"};o.addEventListener("change",()=>s(o.files[0]));["dragenter","dragover"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.add("dragging")}));["dragleave","drop"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.remove("dragging")}));n.addEventListener("drop",e=>{const[t]=e.dataTransfer.files;t&&(o.files=e.dataTransfer.files,s(t))});r.addEventListener("htmx:beforeRequest",()=>{a.textContent="Analysing your recording…",r.setAttribute("aria-busy","true")});r.addEventListener("htmx:afterRequest",()=>{a.textContent="",r.removeAttribute("aria-busy")});r.addEventListener("htmx:responseError",()=>{a.textContent="Analysis could not be completed."});document.body.addEventListener("htmx:beforeSwap",e=>{e.detail.xhr.status>=400&&(e.detail.shouldSwap=!0,e.detail.isError=!1)});window.addEventListener("pageshow",e=>{e.persisted&&(o.value="",s(),a.textContent="",document.querySelector("#classification-results").replaceChildren())});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";const a=document.querySelector("#manual-report-form"),m=document.querySelector("#manual-submit"),g=document.querySelector("#manual-submission"),C=document.querySelector("#manual-latitude"),b=document.querySelector("#manual-longitude"),w=document.querySelector("#manual-direction-degrees"),y=document.querySelector("#manual-direction-accuracy"),c=document.querySelector("#manual-capture-direction"),t=document.querySelector("#manual-direction-status"),v=document.querySelector("#manual-direction-panel"),f=/Android|iPhone|iPad|iPod|IEMobile|Opera Mini/.test(navigator.userAgent)||navigator.userAgent.includes("Macintosh")&&navigator.maxTouchPoints>1;f&&(v.hidden=!1);let o,r;const l=e=>Number.isFinite(e),S=e=>["N","NE","E","SE","S","SW","W","NW"][Math.floor((e+22.5)%360/45)],p=e=>Number(e.toFixed(1)).toString(),s=()=>{o&&window.removeEventListener("deviceorientation",o),window.clearTimeout(r),o=null,r=null},x=(e,i)=>{const n=i===null?"Accuracy unavailable":"Accuracy: ±"+p(i)+"°";t.innerHTML="<strong>"+p(e)+"° · "+S(e)+"</strong><br>"+n,c.textContent="Stop direction capture"},h=()=>{s(),t.textContent="Point the top of your phone toward the sound — direction will update live.",o=e=>{const i="webkitCompassHeading"in e,n=l(e.webkitCompassHeading)?e.webkitCompassHeading:!i&&e.absolute&&l(e.alpha)?(360-e.alpha)%360:null;if(n===null||n<0||n>=360)return;const u=l(e.webkitCompassAccuracy)&&e.webkitCompassAccuracy>=0?e.webkitCompassAccuracy:null;w.value=n,y.value=u===null?"":u,x(n,u),window.clearTimeout(r)},window.addEventListener("deviceorientation",o),r=window.setTimeout(()=>{s(),c.textContent="Capture direction",t.textContent="Compass unavailable on this device."},15e3)},q=async()=>{if(o){s(),c.textContent="Capture again";return}if(!window.isSecureContext){t.textContent="Compass capture requires a secure HTTPS connection.";return}if(typeof window.DeviceOrientationEvent>"u"){t.textContent="Compass unavailable on this device.";return}if(typeof DeviceOrientationEvent.requestPermission=="function"){t.textContent="Requesting compass permission…";try{if(await DeviceOrientationEvent.requestPermission(!0)!=="granted"){t.textContent="Compass permission denied.";return}}catch{t.textContent="Compass permission denied.";return}}h()},d=()=>{s(),m.disabled=!0,window.htmx?htmx.ajax("POST",a.action,{source:a,target:"#manual-submission",swap:"outerHTML"}):a.submit()};c.addEventListener("click",q);m.addEventListener("click",()=>{if(!navigator.geolocation){d();return}g.textContent="Requesting your optional location…",navigator.geolocation.getCurrentPosition(e=>{C.value=e.coords.latitude,b.value=e.coords.longitude,d()},()=>d(),{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4})});document.body.addEventListener("htmx:afterRequest",e=>{e.detail.elt===a&&(m.disabled=!1)});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";const a=document.querySelector("#manual-report-form"),m=document.querySelector("#manual-submit"),g=document.querySelector("#manual-submission"),C=document.querySelector("#manual-latitude"),b=document.querySelector("#manual-longitude"),w=document.querySelector("#manual-direction-degrees"),y=document.querySelector("#manual-direction-accuracy"),c=document.querySelector("#manual-capture-direction"),t=document.querySelector("#manual-direction-status"),v=document.querySelector("#manual-direction-panel"),f=/Android|iPhone|iPad|iPod|IEMobile|Opera Mini/.test(navigator.userAgent)||navigator.userAgent.includes("Macintosh")&&navigator.maxTouchPoints>1;f&&(v.hidden=!1);let o,r;const l=e=>Number.isFinite(e),S=e=>["N","NE","E","SE","S","SW","W","NW"][Math.floor((e+22.5)%360/45)],p=e=>Number(e.toFixed(1)).toString(),s=()=>{o&&window.removeEventListener("deviceorientation",o),window.clearTimeout(r),o=null,r=null},x=(e,i)=>{const n=i===null?"Accuracy unavailable":"Accuracy: ±"+p(i)+"°";t.innerHTML="<strong>"+p(e)+"° · "+S(e)+"</strong><br>"+n,c.textContent="Stop direction capture"},h=()=>{s(),t.textContent="Point the top of your phone toward the sound — direction will update live.",o=e=>{const i="webkitCompassHeading"in e,n=l(e.webkitCompassHeading)?e.webkitCompassHeading:!i&&e.absolute&&l(e.alpha)?(360-e.alpha)%360:null;if(n===null||n<0||n>=360)return;const u=l(e.webkitCompassAccuracy)&&e.webkitCompassAccuracy>=0?e.webkitCompassAccuracy:null;w.value=n,y.value=u===null?"":u,x(n,u),window.clearTimeout(r)},window.addEventListener("deviceorientation",o),r=window.setTimeout(()=>{s(),c.textContent="Capture direction",t.textContent="Compass unavailable on this device."},15e3)},q=async()=>{if(o){s(),c.textContent="Capture again";return}if(!window.isSecureContext){t.textContent="Compass capture requires a secure HTTPS connection.";return}if(typeof window.DeviceOrientationEvent>"u"){t.textContent="Compass unavailable on this device.";return}if(typeof DeviceOrientationEvent.requestPermission=="function"){t.textContent="Requesting compass permission…";try{if(await DeviceOrientationEvent.requestPermission(!0)!=="granted"){t.textContent="Compass permission denied.";return}}catch{t.textContent="Compass permission denied.";return}}h()},d=()=>{s(),m.disabled=!0,window.htmx?htmx.ajax("POST",a.action,{source:a,target:"#manual-submission",swap:"outerHTML"}):a.submit()};c.addEventListener("click",q);m.addEventListener("click",()=>{if(!navigator.geolocation){d();return}g.textContent="Requesting your optional location…",navigator.geolocation.getCurrentPosition(e=>{C.value=e.coords.latitude,b.value=e.coords.longitude,d()},()=>d(),{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4})});document.body.addEventListener("htmx:afterRequest",e=>{e.detail.elt===a&&(m.disabled=!1)});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";const a=document.querySelector("#manual-report-form"),m=document.querySelector("#manual-submit"),g=document.querySelector("#manual-submission"),C=document.querySelector("#manual-latitude"),b=document.querySelector("#manual-longitude"),w=document.querySelector("#manual-direction-degrees"),y=document.querySelector("#manual-direction-accuracy"),c=document.querySelector("#manual-capture-direction"),t=document.querySelector("#manual-direction-status"),v=document.querySelector("#manual-direction-panel"),f=/Android|iPhone|iPad|iPod|IEMobile|Opera Mini/.test(navigator.userAgent)||navigator.userAgent.includes("Macintosh")&&navigator.maxTouchPoints>1;f&&(v.hidden=!1);let o,r;const l=e=>Number.isFinite(e),S=e=>["N","NE","E","SE","S","SW","W","NW"][Math.floor((e+22.5)%360/45)],p=e=>Number(e.toFixed(1)).toString(),s=()=>{o&&window.removeEventListener("deviceorientation",o),window.clearTimeout(r),o=null,r=null},x=(e,i)=>{const n=i===null?"Accuracy unavailable":"Accuracy: ±"+p(i)+"°";t.innerHTML="<strong>"+p(e)+"° · "+S(e)+"</strong><br>"+n,c.textContent="Stop direction capture"},h=()=>{s(),t.textContent="Point the top of your phone toward the sound — direction will update live.",o=e=>{const i="webkitCompassHeading"in e,n=l(e.webkitCompassHeading)?e.webkitCompassHeading:!i&&e.absolute&&l(e.alpha)?(360-e.alpha)%360:null;if(n===null||n<0||n>=360)return;const u=l(e.webkitCompassAccuracy)&&e.webkitCompassAccuracy>=0?e.webkitCompassAccuracy:null;w.value=n,y.value=u===null?"":u,x(n,u),window.clearTimeout(r)},window.addEventListener("deviceorientation",o),r=window.setTimeout(()=>{s(),c.textContent="Capture direction",t.textContent="Compass unavailable on this device."},15e3)},q=async()=>{if(o){s(),c.textContent="Capture again";return}if(!window.isSecureContext){t.textContent="Compass capture requires a secure HTTPS connection.";return}if(typeof window.DeviceOrientationEvent>"u"){t.textContent="Compass unavailable on this device.";return}if(typeof DeviceOrientationEvent.requestPermission=="function"){t.textContent="Requesting compass permission…";try{if(await DeviceOrientationEvent.requestPermission(!0)!=="granted"){t.textContent="Compass permission denied.";return}}catch{t.textContent="Compass permission denied.";return}}h()},d=()=>{s(),m.disabled=!0,window.htmx?htmx.ajax("POST",a.action,{source:a,target:"#manual-submission",swap:"outerHTML"}):a.submit()};c.addEventListener("click",q);m.addEventListener("click",()=>{if(!navigator.geolocation){d();return}g.textContent="Requesting your optional location…",navigator.geolocation.getCurrentPosition(e=>{C.value=e.coords.latitude,b.value=e.coords.longitude,d()},()=>d(),{enableHighAccuracy:!1,maximumAge:3e5,timeout:1e4})});document.body.addEventListener("htmx:afterRequest",e=>{e.detail.elt===a&&(m.disabled=!1)});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";const r=document.querySelector(".upload-form"),n=document.querySelector("#drop-zone"),o=document.querySelector("#audio-file"),d=document.querySelector("#file-name"),a=document.querySelector("#upload-status"),s=e=>{d.textContent=e?e.name:"No file selected"};o.addEventListener("change",()=>s(o.files[0]));["dragenter","dragover"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.add("dragging")}));["dragleave","drop"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.remove("dragging")}));n.addEventListener("drop",e=>{const[t]=e.dataTransfer.files;t&&(o.files=e.dataTransfer.files,s(t))});r.addEventListener("htmx:beforeRequest",()=>{a.textContent="Analysing your recording…",r.setAttribute("aria-busy","true")});r.addEventListener("htmx:afterRequest",()=>{a.textContent="",r.removeAttribute("aria-busy")});r.addEventListener("htmx:responseError",()=>{a.textContent="Analysis could not be completed."});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";const r=document.querySelector(".upload-form"),n=document.querySelector("#drop-zone"),o=document.querySelector("#audio-file"),d=document.querySelector("#file-name"),a=document.querySelector("#upload-status"),s=e=>{d.textContent=e?e.name:"No file selected"};o.addEventListener("change",()=>s(o.files[0]));["dragenter","dragover"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.add("dragging")}));["dragleave","drop"].forEach(e=>n.addEventListener(e,t=>{t.preventDefault(),n.classList.remove("dragging")}));n.addEventListener("drop",e=>{const[t]=e.dataTransfer.files;t&&(o.files=e.dataTransfer.files,s(t))});r.addEventListener("htmx:beforeRequest",()=>{a.textContent="Analysing your recording…",r.setAttribute("aria-busy","true")});r.addEventListener("htmx:afterRequest",()=>{a.textContent="",r.removeAttribute("aria-busy")});r.addEventListener("htmx:responseError",()=>{a.textContent="Analysis could not be completed."});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";const l=document.getElementById("event-map"),h=l.dataset.h3Resolution,o=L.map(l,{zoomControl:!1,scrollWheelZoom:!1}).setView([52.1326,5.2913],7);L.control.zoom({position:"bottomleft"}).addTo(o);const p=L.control({position:"topright"});p.onAdd=()=>{const t=L.DomUtil.create("div","map-compass");return t.setAttribute("role","img"),t.setAttribute("aria-label","Map compass: north is up"),t.innerHTML='<span class="compass-n">N</span><span class="compass-e">E</span><span class="compass-s">S</span><span class="compass-w">W</span><span class="compass-needle">↑</span>',L.DomEvent.disableClickPropagation(t),t};p.addTo(o);L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{maxZoom:18,attribution:"© OpenStreetMap contributors"}).addTo(o);const g=JSON.parse(document.getElementById("h3-cells-data").textContent),f=JSON.parse(document.getElementById("map-events-data").textContent),r=L.latLngBounds([]);g.forEach(t=>{L.polygon(t.boundary,{color:"#f59e0b",weight:2,fillColor:"#f59e0b",fillOpacity:.25}).addTo(o).bindPopup('<span class="popup-title">H3 '+t.cell+'</span><span class="popup-meta">'+t.reports+" reports · "+t.occurrences+" occurrences · resolution "+h+"</span>"),r.extend(L.latLngBounds(t.boundary))});function M(t){return["N","NE","E","SE","S","SW","W","NW"][Math.floor((t+22.5)%360/45)]}function y(t,e,n){const s=e*Math.PI/180,c=t[0]*Math.PI/180,u=t[1]*Math.PI/180,i=n/6378137,d=Math.asin(Math.sin(c)*Math.cos(i)+Math.cos(c)*Math.sin(i)*Math.cos(s)),m=u+Math.atan2(Math.sin(s)*Math.sin(i)*Math.cos(c),Math.cos(i)-Math.sin(c)*Math.sin(d));return[d*180/Math.PI,m*180/Math.PI]}const b=L.divIcon({className:"",html:'<div class="report-icon">✦</div>',iconSize:[37,37],iconAnchor:[19,19]});f.forEach(t=>{const e=t.visually_confirmed?"Visually confirmed":"Not visually confirmed";let n=t.occurrences+" occurrence"+(t.occurrences===1?"":"s")+" · "+e+"<br>Reported "+t.reported_on;if(t.direction_degrees!==null&&(n+="<br>Compass direction "+Math.round(t.direction_degrees)+"° ("+M(t.direction_degrees)+")",t.direction_accuracy_degrees!==null&&(n+=" (±"+Math.round(t.direction_accuracy_degrees)+"°)")),L.marker(t.center,{icon:b}).addTo(o).bindPopup('<span class="popup-title">Manual report · H3 '+t.cell+'</span><span class="popup-meta">'+n+"</span>"),t.direction_degrees!==null){const a=y(t.center,t.direction_degrees,900);L.polyline([t.center,a],{color:"#fff7e6",weight:9,opacity:.8}).addTo(o),L.polyline([t.center,a],{color:"#6d45a0",weight:5,opacity:1}).addTo(o);const s=L.divIcon({className:"",html:'<div class="direction-marker"><span style="transform:rotate('+t.direction_degrees+'deg)">↑</span></div>',iconSize:[56,56],iconAnchor:[28,28]});L.marker(a,{icon:s,interactive:!1}).addTo(o)}});r.isValid()&&o.fitBounds(r.pad(.18));const v=document.getElementById("range");document.querySelectorAll("#from-date, #to-date").forEach(t=>{t.addEventListener("change",()=>{v.value="custom"})});
|
||||
@@ -0,0 +1 @@
|
||||
/* empty css */import"../../../theme-BwRovl8e.js";const l=document.getElementById("event-map"),h=l.dataset.h3Resolution,o=L.map(l,{zoomControl:!1,scrollWheelZoom:!1}).setView([52.1326,5.2913],7);L.control.zoom({position:"bottomleft"}).addTo(o);const p=L.control({position:"topright"});p.onAdd=()=>{const t=L.DomUtil.create("div","map-compass");return t.setAttribute("role","img"),t.setAttribute("aria-label","Map compass: north is up"),t.innerHTML='<span class="compass-n">N</span><span class="compass-e">E</span><span class="compass-s">S</span><span class="compass-w">W</span><span class="compass-needle">↑</span>',L.DomEvent.disableClickPropagation(t),t};p.addTo(o);L.tileLayer("https://{s}.tile.openstreetmap.de/{z}/{x}/{y}.png",{maxZoom:18,attribution:"© OpenStreetMap contributors"}).addTo(o);const g=JSON.parse(document.getElementById("h3-cells-data").textContent),f=JSON.parse(document.getElementById("map-events-data").textContent),r=L.latLngBounds([]);g.forEach(t=>{L.polygon(t.boundary,{color:"#f59e0b",weight:2,fillColor:"#f59e0b",fillOpacity:.25}).addTo(o).bindPopup('<span class="popup-title">H3 '+t.cell+'</span><span class="popup-meta">'+t.reports+" reports · "+t.occurrences+" occurrences · resolution "+h+"</span>"),r.extend(L.latLngBounds(t.boundary))});function M(t){return["N","NE","E","SE","S","SW","W","NW"][Math.floor((t+22.5)%360/45)]}function y(t,e,n){const s=e*Math.PI/180,c=t[0]*Math.PI/180,u=t[1]*Math.PI/180,i=n/6378137,d=Math.asin(Math.sin(c)*Math.cos(i)+Math.cos(c)*Math.sin(i)*Math.cos(s)),m=u+Math.atan2(Math.sin(s)*Math.sin(i)*Math.cos(c),Math.cos(i)-Math.sin(c)*Math.sin(d));return[d*180/Math.PI,m*180/Math.PI]}const b=L.divIcon({className:"",html:'<div class="report-icon">✦</div>',iconSize:[37,37],iconAnchor:[19,19]});f.forEach(t=>{const e=t.visually_confirmed?"Visually confirmed":"Not visually confirmed";let n=t.occurrences+" occurrence"+(t.occurrences===1?"":"s")+" · "+e+"<br>Reported "+t.reported_on;if(t.direction_degrees!==null&&(n+="<br>Compass direction "+Math.round(t.direction_degrees)+"° ("+M(t.direction_degrees)+")",t.direction_accuracy_degrees!==null&&(n+=" (±"+Math.round(t.direction_accuracy_degrees)+"°)")),L.marker(t.center,{icon:b}).addTo(o).bindPopup('<span class="popup-title">Manual report · H3 '+t.cell+'</span><span class="popup-meta">'+n+"</span>"),t.direction_degrees!==null){const a=y(t.center,t.direction_degrees,900);L.polyline([t.center,a],{color:"#fff7e6",weight:9,opacity:.8}).addTo(o),L.polyline([t.center,a],{color:"#6d45a0",weight:5,opacity:1}).addTo(o);const s=L.divIcon({className:"",html:'<div class="direction-marker"><span style="transform:rotate('+t.direction_degrees+'deg)">↑</span></div>',iconSize:[56,56],iconAnchor:[28,28]});L.marker(a,{icon:s,interactive:!1}).addTo(o)}});r.isValid()&&o.fitBounds(r.pad(.18));const v=document.getElementById("range");document.querySelectorAll("#from-date, #to-date").forEach(t=>{t.addEventListener("change",()=>{v.value="custom"})});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-CWKDkjBK.js";document.querySelector("#ntfy-url").addEventListener("input",()=>{document.querySelector("#ntfy-test-result").replaceChildren()});
|
||||
@@ -0,0 +1 @@
|
||||
import"../../../theme-BwRovl8e.js";document.querySelector("#ntfy-url").addEventListener("input",()=>{document.querySelector("#ntfy-test-result").replaceChildren()});
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
body{min-width:320px;min-height:100vh;display:grid;place-items:center;margin:0;padding:1.5rem;color:#eef3ff;font-family:Inter,system-ui,sans-serif;background:radial-gradient(circle at 8% 0,#263a76,transparent 31rem),#090e1d}.card{width:min(100%,27rem);padding:2rem;border:1px solid #2b3d68;border-radius:1.25rem;background:#172443;box-shadow:0 1.75rem 5rem #01030c99}h1{margin:.5rem 0}.intro{color:#aab9d8;line-height:1.5}.error{margin:1rem 0;padding:.75rem;border-radius:.6rem;color:#fee2e2;background:#7f1d1d}label{display:block;margin:1rem 0 .35rem;font-weight:700}input{width:100%;min-height:2.8rem;padding:.65rem;border:1px solid #526b9f;border-radius:.55rem;color:#eef3ff;font:inherit;background:#0a1123}button{width:100%;min-height:2.9rem;margin-top:1.5rem;border:0;border-radius:.65rem;color:#17132b;font:inherit;font-weight:850;background:linear-gradient(135deg,#99c8ff,#c6adff);cursor:pointer}
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
:root{--ink: #172033;--muted: #667085;--card: rgba(255, 255, 255, .92);--line: #d7ddea;--primary: #6255e7;--success-bg: #eafaf1;--success-ink: #176b42}*{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 12% 15%,#cfe1ff 0,transparent 28rem),radial-gradient(circle at 88% 88%,#e6d8ff 0,transparent 26rem),#f6f7fb}.card{width:min(100%,31rem);padding:clamp(1.75rem,7vw,3rem);border:1px solid rgba(255,255,255,.85);border-radius:1.5rem;background:var(--card);box-shadow:0 1.5rem 4rem #35386929}.eyebrow{display:inline-flex;align-items:center;gap:.5rem;margin:0 0 1rem;color:var(--primary);font-size:.78rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.sparkle{display:grid;width:1.65rem;aspect-ratio:1;place-items:center;border-radius:.55rem;color:#fff;font-size:.95rem;background:linear-gradient(135deg,#7668ff,#a75ff4)}h1{margin:0;font-size:clamp(2rem,7vw,3rem);letter-spacing:-.055em;line-height:1.05}.intro{margin:1rem 0 2rem;color:var(--muted);line-height:1.6}label{display:block;margin-bottom:.55rem;font-size:.92rem;font-weight:700}input{width:100%;min-height:3.15rem;padding:.75rem 1rem;border:1px solid var(--line);border-radius:.75rem;outline:none;color:var(--ink);font:inherit;background:#fff}input:focus{border-color:var(--primary);box-shadow:0 0 0 .25rem #6255e726}button{width:100%;min-height:3.15rem;margin-top:1rem;border:0;border-radius:.75rem;cursor:pointer;color:#fff;font:inherit;font-weight:750;background:linear-gradient(135deg,var(--primary),#8a5ce5);box-shadow:0 .65rem 1.3rem #6255e73d}button:hover{transform:translateY(-1px)}.result{margin:1.5rem 0 0;padding:.9rem 1rem;border-radius:.75rem;color:var(--success-ink);line-height:1.45;background:var(--success-bg)}.button{width:100%;display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:2.9rem;padding:.75rem 1.05rem;border:1px solid #b3c9ff;border-radius:.8rem;color:#121a34;font:inherit;font-size:.93rem;font-weight:850;text-decoration:none;background:linear-gradient(135deg,#99c8ff,#c6adff);box-shadow:0 .65rem 1.75rem #7058dd50;transition:transform .2s ease,filter .2s ease}.button:hover{transform:translateY(-2px);filter:brightness(1.08)}.button:focus-visible{outline:3px solid #a5c9ff80;outline-offset:3px}
|
||||
@@ -0,0 +1 @@
|
||||
:root{--ink: #172033;--muted: #667085;--card: rgba(255, 255, 255, .94);--line: #e1e6ef;--primary: #6255e7;--primary-soft: #f0eeff;--empty-bg: #f7f8fc}*{box-sizing:border-box}body{min-width:320px;min-height:100vh;margin:0;padding:clamp(1.25rem,5vw,4rem);color:var(--ink);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;background:radial-gradient(circle at 8% 8%,#d9e7ff 0,transparent 30rem),radial-gradient(circle at 92% 90%,#eadcff 0,transparent 30rem),#f6f7fb}.page{width:min(100%,70rem);margin:0 auto}.card{overflow:hidden;border:1px solid rgba(255,255,255,.9);border-radius:1.5rem;background:var(--card);box-shadow:0 1.5rem 4rem #35386924}.header{display:flex;align-items:end;justify-content:space-between;gap:1.5rem;padding:clamp(1.5rem,5vw,3rem);border-bottom:1px solid var(--line)}.eyebrow{display:inline-flex;align-items:center;gap:.5rem;margin:0 0 .85rem;color:var(--primary);font-size:.78rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.sparkle{display:grid;width:1.65rem;aspect-ratio:1;place-items:center;border-radius:.55rem;color:#fff;font-size:.95rem;background:linear-gradient(135deg,#7668ff,#a75ff4)}h1{margin:0;font-size:clamp(2rem,5vw,3.25rem);letter-spacing:-.06em;line-height:1.05}.intro{max-width:38rem;margin:.85rem 0 0;color:var(--muted);line-height:1.6}.count{flex:0 0 auto;margin:0;padding:.6rem .85rem;border-radius:999px;color:var(--primary);font-size:.88rem;font-weight:750;white-space:nowrap;background:var(--primary-soft)}.table-wrap{overflow-x:auto}table{width:100%;min-width:38rem;border-collapse:collapse;text-align:left}th{padding:1rem clamp(1.25rem,3vw,2rem);color:var(--muted);font-size:.75rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;background:#fafbfe}td{padding:1.15rem clamp(1.25rem,3vw,2rem);border-top:1px solid var(--line);vertical-align:middle}tbody tr{transition:background .18s ease}tbody tr:hover{background:#faf9ff}.member{display:flex;align-items:center;gap:.85rem;font-weight:750}.avatar{display:grid;width:2.45rem;aspect-ratio:1;flex:0 0 auto;place-items:center;border-radius:50%;color:var(--primary);font-size:.82rem;font-weight:850;background:var(--primary-soft)}.phone{color:var(--muted);font-variant-numeric:tabular-nums}.date{color:var(--muted);white-space:nowrap}.empty{padding:clamp(3rem,10vw,6rem) 1.5rem;text-align:center;background:var(--empty-bg)}.empty-icon{display:grid;width:3.5rem;aspect-ratio:1;place-items:center;margin:0 auto 1rem;border-radius:1rem;color:var(--primary);font-size:1.4rem;background:var(--primary-soft)}.empty h2{margin:0;font-size:1.2rem;letter-spacing:-.03em}.empty p{margin:.5rem 0 0;color:var(--muted)}@media(max-width:40rem){.header{align-items:start;flex-direction:column}.count{align-self:start}}.button{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:2.9rem;padding:.75rem 1.05rem;border:1px solid #b3c9ff;border-radius:.8rem;color:#121a34;font:inherit;font-size:.93rem;font-weight:850;text-decoration:none;background:linear-gradient(135deg,#99c8ff,#c6adff);box-shadow:0 .65rem 1.75rem #7058dd50;transition:transform .2s ease,filter .2s ease}.button:hover{transform:translateY(-2px);filter:brightness(1.08)}.button:focus-visible{outline:3px solid #a5c9ff80;outline-offset:3px}
|
||||
@@ -0,0 +1 @@
|
||||
:root{--ink: #172033;--muted: #667085;--card: rgba(255, 255, 255, .92);--line: #d7ddea;--primary: #6255e7;--success-bg: #eafaf1;--success-ink: #176b42}*{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 12% 15%,#cfe1ff 0,transparent 28rem),radial-gradient(circle at 88% 88%,#e6d8ff 0,transparent 26rem),#f6f7fb}.card{width:min(100%,31rem);padding:clamp(1.75rem,7vw,3rem);border:1px solid rgba(255,255,255,.85);border-radius:1.5rem;background:var(--card);box-shadow:0 1.5rem 4rem #35386929}.eyebrow{display:inline-flex;align-items:center;gap:.5rem;margin:0 0 1rem;color:var(--primary);font-size:.78rem;font-weight:800;letter-spacing:.11em;text-transform:uppercase}.sparkle{display:grid;width:1.65rem;aspect-ratio:1;place-items:center;border-radius:.55rem;color:#fff;font-size:.95rem;background:linear-gradient(135deg,#7668ff,#a75ff4)}.button{display:inline-flex;align-items:center;justify-content:center;gap:.6rem;min-height:2.9rem;padding:.75rem 1.05rem;border:1px solid #b3c9ff;border-radius:.8rem;color:#121a34;font:inherit;font-size:.93rem;font-weight:850;text-decoration:none;background:linear-gradient(135deg,#99c8ff,#c6adff);box-shadow:0 .65rem 1.75rem #7058dd50;transition:transform .2s ease,filter .2s ease}.button:hover{transform:translateY(-2px);filter:brightness(1.08)}.button:focus-visible{outline:3px solid #a5c9ff80;outline-offset:3px}h1{margin:0;font-size:clamp(2rem,7vw,3rem);letter-spacing:-.055em;line-height:1.05}.intro{margin:1rem 0 2rem;color:var(--muted);line-height:1.6}label{display:block;margin-bottom:.55rem;font-size:.92rem;font-weight:700}input{width:100%;min-height:3.15rem;padding:.75rem 1rem;border:1px solid var(--line);border-radius:.75rem;outline:none;color:var(--ink);font:inherit;background:#fff}input:focus{border-color:var(--primary);box-shadow:0 0 0 .25rem #6255e726}button{width:100%;min-height:3.15rem;margin-top:1rem;border:0;border-radius:.75rem;cursor:pointer;color:#fff;font:inherit;font-weight:750;background:linear-gradient(135deg,var(--primary),#8a5ce5);box-shadow:0 .65rem 1.3rem #6255e73d}button:hover{transform:translateY(-1px)}.result{margin:1.5rem 0 0;padding:.9rem 1rem;border-radius:.75rem;color:var(--success-ink);line-height:1.45;background:var(--success-bg)}
|
||||
@@ -0,0 +1 @@
|
||||
: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;-webkit-backdrop-filter:blur(16px);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}}
|
||||
@@ -0,0 +1 @@
|
||||
body{min-width:320px;margin:0;padding:2rem;color:#eef3ff;font-family:Inter,system-ui,sans-serif;background:#090e1d}.card{width:min(100%,42rem);margin:auto;padding:2rem;border:1px solid #2b3d68;border-radius:1rem;background:#172443}h1{margin-top:0}h2{margin:0}.intro,.help{color:#aab9d8;line-height:1.5}.section{margin-top:2rem;padding-top:1.5rem;border-top:1px solid #2b3d68}label{display:block;margin:.9rem 0 .35rem;font-weight:700}input[type=url]{width:100%;min-height:2.8rem;padding:.65rem;border:1px solid #526b9f;border-radius:.55rem;color:#eef3ff;font:inherit;background:#0a1123}.check{display:flex;gap:.6rem;align-items:center}.check label{margin:0}.button{min-height:2.8rem;margin-top:1rem;padding:.6rem 1rem;border:0;border-radius:.55rem;color:#17132b;font:inherit;font-weight:800;background:#a6ccff;cursor:pointer}.button--secondary{margin-right:.7rem;background:#d8c1fb}.alert,.errorlist{margin-top:1rem;padding:.75rem;border-radius:.55rem}.alert--success{color:#d1fae5;background:#14532d}.alert--error,.errorlist{color:#fee2e2;background:#7f1d1d}.messages{padding:0;list-style:none}@media(max-width:32rem){body{padding:1rem}.card{padding:1.4rem}}
|
||||
@@ -0,0 +1 @@
|
||||
const d="sound-signal-theme",r=new Set(["dark","light"]);function c(){try{const e=window.localStorage.getItem(d);return r.has(e)?e:"dark"}catch{return"dark"}}function n(e,t){if(document.documentElement.dataset.theme=e,!t)return;const o=e==="dark"?"light":"dark";t.textContent=o==="light"?"☀ Light mode":"☾ Dark mode",t.setAttribute("aria-label","Switch to "+o+" mode"),t.setAttribute("aria-pressed",String(e==="light"))}function a(){const e=document.querySelector(".theme-toggle")??document.createElement("button");e.isConnected||(e.className="theme-toggle",e.type="button",document.body.append(e)),n(c(),e),e.addEventListener("click",()=>{const t=document.documentElement.dataset.theme==="dark"?"light":"dark";try{window.localStorage.setItem(d,t)}catch{}n(t,e)})}n(c());document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a,{once:!0}):a();
|
||||
@@ -0,0 +1 @@
|
||||
:root{color-scheme:dark;--theme-bg: #090e1d;--theme-ink: #eef3ff;--theme-muted: #aab9d8;--theme-surface: #172443;--theme-surface-raised: #111a31;--theme-line: #2b3d68;--theme-input: #0a1123}:root[data-theme=light]{color-scheme:light;--ink: #172033;--i: #172033;--muted: #536174;--m: #536174;--line: #c4cede;--l: #c4cede;--surface: #ffffff;--surface-2: #f2f6fc;--card: rgba(255, 255, 255, .94);--theme-bg: #f4f7fc;--theme-ink: #172033;--theme-muted: #536174;--theme-surface: #ffffff;--theme-surface-raised: #f2f6fc;--theme-line: #c4cede;--theme-input: #ffffff}:root[data-theme=light] body{color:var(--theme-ink)!important;background:radial-gradient(circle at 8% 0%,#dbeaff 0,transparent 31rem),radial-gradient(circle at 96% 100%,#eee2ff 0,transparent 29rem),var(--theme-bg)!important}:root[data-theme=light] .card,:root[data-theme=light] .welcome-card,:root[data-theme=light] .upload-card,:root[data-theme=light] .results-card,:root[data-theme=light] .panel,:root[data-theme=light] .map-panel{border-color:var(--theme-line)!important;background:var(--theme-surface)!important;box-shadow:0 1rem 3rem #20365c24!important}:root[data-theme=light] .topbar,:root[data-theme=light] .map-header,:root[data-theme=light] .nav,:root[data-theme=light] .filters,:root[data-theme=light] .result-group,:root[data-theme=light] .prediction,:root[data-theme=light] .event,:root[data-theme=light] .drop-zone{border-color:var(--theme-line)!important;color:var(--theme-ink);background:var(--theme-surface-raised)!important}:root[data-theme=light] input,:root[data-theme=light] select,:root[data-theme=light] textarea,:root[data-theme=light] .path{border-color:var(--theme-line)!important;color:var(--theme-ink)!important;background:var(--theme-input)!important}:root[data-theme=light] .intro,:root[data-theme=light] .lede,:root[data-theme=light] .subject,:root[data-theme=light] .message,:root[data-theme=light] .help,:root[data-theme=light] .empty,:root[data-theme=light] .meta,:root[data-theme=light] .popup-meta{color:var(--theme-muted)!important}.theme-toggle{position:fixed;top:1rem;left:1rem;z-index:1200;min-height:2.5rem;padding:.5rem .75rem;border:1px solid var(--theme-line);border-radius:999px;color:var(--theme-ink);font:700 .82rem/1 Inter,ui-sans-serif,system-ui,sans-serif;background:var(--theme-surface);box-shadow:0 .35rem 1.25rem #01030c3d;cursor:pointer}.theme-toggle:hover{filter:brightness(1.08)}.theme-toggle:focus-visible{outline:3px solid #8abaff;outline-offset:3px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition-duration:.01ms!important}}:root[data-theme=light] .shell h1{color:#172b50!important}:root[data-theme=light] .shell h2{color:#203b63!important}:root[data-theme=light] .shell h3{color:#31527f!important}:root[data-theme=light] .shell .kicker,:root[data-theme=light] .shell .eyebrow{color:#3f6fa9!important}:root[data-theme=light] .shell .map-header strong{color:#243e65!important}
|
||||
@@ -0,0 +1 @@
|
||||
const d="sound-signal-theme",c=new Set(["dark","light"]);function r(){try{const e=window.localStorage.getItem(d);return c.has(e)?e:"dark"}catch{return"dark"}}function n(e,t){if(document.documentElement.dataset.theme=e,!t)return;const a=e==="dark"?"light":"dark";t.textContent=a==="light"?"☀ Light mode":"☾ Dark mode",t.setAttribute("aria-label","Switch to "+a+" mode"),t.setAttribute("aria-pressed",String(e==="light"))}function o(){const e=document.createElement("button");e.className="theme-toggle",e.type="button",document.body.append(e),n(r(),e),e.addEventListener("click",()=>{const t=document.documentElement.dataset.theme==="dark"?"light":"dark";try{window.localStorage.setItem(d,t)}catch{}n(t,e)})}n(r());document.readyState==="loading"?document.addEventListener("DOMContentLoaded",o,{once:!0}):o();
|
||||
@@ -0,0 +1 @@
|
||||
:root{color-scheme:dark;--theme-bg: #090e1d;--theme-ink: #eef3ff;--theme-muted: #aab9d8;--theme-surface: #172443;--theme-surface-raised: #111a31;--theme-line: #2b3d68;--theme-input: #0a1123}:root[data-theme=light]{color-scheme:light;--ink: #172033;--i: #172033;--muted: #536174;--m: #536174;--line: #c4cede;--l: #c4cede;--surface: #ffffff;--surface-2: #f2f6fc;--card: rgba(255, 255, 255, .94);--theme-bg: #f4f7fc;--theme-ink: #172033;--theme-muted: #536174;--theme-surface: #ffffff;--theme-surface-raised: #f2f6fc;--theme-line: #c4cede;--theme-input: #ffffff}:root[data-theme=light] body{color:var(--theme-ink)!important;background:radial-gradient(circle at 8% 0%,#dbeaff 0,transparent 31rem),radial-gradient(circle at 96% 100%,#eee2ff 0,transparent 29rem),var(--theme-bg)!important}:root[data-theme=light] .card,:root[data-theme=light] .welcome-card,:root[data-theme=light] .upload-card,:root[data-theme=light] .results-card,:root[data-theme=light] .panel,:root[data-theme=light] .map-panel{border-color:var(--theme-line)!important;background:var(--theme-surface)!important;box-shadow:0 1rem 3rem #20365c24!important}:root[data-theme=light] .topbar,:root[data-theme=light] .map-header,:root[data-theme=light] .nav,:root[data-theme=light] .filters,:root[data-theme=light] .result-group,:root[data-theme=light] .prediction,:root[data-theme=light] .event,:root[data-theme=light] .drop-zone{border-color:var(--theme-line)!important;color:var(--theme-ink);background:var(--theme-surface-raised)!important}:root[data-theme=light] input,:root[data-theme=light] select,:root[data-theme=light] textarea,:root[data-theme=light] .path{border-color:var(--theme-line)!important;color:var(--theme-ink)!important;background:var(--theme-input)!important}:root[data-theme=light] .intro,:root[data-theme=light] .lede,:root[data-theme=light] .subject,:root[data-theme=light] .message,:root[data-theme=light] .help,:root[data-theme=light] .empty,:root[data-theme=light] .meta,:root[data-theme=light] .popup-meta{color:var(--theme-muted)!important}.theme-toggle{position:fixed;top:1rem;left:1rem;z-index:1200;min-height:2.5rem;padding:.5rem .75rem;border:1px solid var(--theme-line);border-radius:999px;color:var(--theme-ink);font:700 .82rem/1 Inter,ui-sans-serif,system-ui,sans-serif;background:var(--theme-surface);box-shadow:0 .35rem 1.25rem #01030c3d;cursor:pointer}.theme-toggle:hover{filter:brightness(1.08)}.theme-toggle:focus-visible{outline:3px solid #8abaff;outline-offset:3px}@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition-duration:.01ms!important}}
|
||||
+3
-9
@@ -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 @@
|
||||
{% 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>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user