44 lines
2.4 KiB
HTML
44 lines
2.4 KiB
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.0">
|
|
<title>Sound Signal · Fireworks detection</title>
|
|
<script src="https://cdn.jsdelivr.net/npm/htmx.org@2.0.4/dist/htmx.min.js"></script>
|
|
{% vite_asset "frontend/src/entries/legacy-fireworks-home.js" %}
|
|
</head>
|
|
<body>
|
|
<main class="shell">
|
|
<div class="brand"><span class="brand-mark">✦</span> Sound Signal</div>
|
|
<section class="intro" aria-labelledby="page-title">
|
|
<p class="kicker">Audio event analysis</p>
|
|
<h1 id="page-title">See what your audio heard.</h1>
|
|
<p class="lede">Drop a recording to identify its most likely sounds. Firework-related signals are highlighted in amber; speech-related signals are marked in red for future privacy filtering.</p>
|
|
</section>
|
|
|
|
<section class="upload-card" aria-label="Upload audio for classification">
|
|
<form class="upload-form" action="{% url 'fireworks_detect:classify' %}" method="post" enctype="multipart/form-data" hx-post="{% url 'fireworks_detect:classify' %}" hx-target="#classification-results" hx-swap="innerHTML" hx-encoding="multipart/form-data" hx-indicator="#upload-indicator">
|
|
{% csrf_token %}
|
|
<label class="drop-zone" id="drop-zone">
|
|
<input class="file-input" id="audio-file" type="file" name="audio" accept="audio/*,.wav,.mp3,.m4a,.ogg,.flac,.aac,.opus" required>
|
|
<span>
|
|
<span class="upload-icon">↑</span>
|
|
<strong>Drop an audio file here</strong>
|
|
<span>or click to browse your device</span>
|
|
</span>
|
|
<span class="file-name" id="file-name">No file selected</span>
|
|
</label>
|
|
<div class="form-footer">
|
|
<p class="file-note">WAV, MP3, M4A, OGG and more · 25 MiB maximum</p>
|
|
<button type="submit"><span class="spinner htmx-indicator" id="upload-indicator" aria-hidden="true"></span>Analyse audio</button>
|
|
</div>
|
|
</form>
|
|
<p id="upload-status" role="status" aria-live="polite"></p>
|
|
</section>
|
|
|
|
<section id="classification-results" aria-live="polite" aria-label="Classification results"></section>
|
|
</main>
|
|
</body>
|
|
</html>
|