44 lines
2.6 KiB
HTML
44 lines
2.6 KiB
HTML
{% load i18n vite %}
|
|
<!DOCTYPE html>
|
|
<html lang="{{ request.LANGUAGE_CODE|default:'en' }}" data-theme="dark">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>{% trans "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">{% trans "Audio event analysis" %}</p>
|
|
<h1 id="page-title">{% trans "See what your audio heard." %}</h1>
|
|
<p class="lede">{% trans "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="{% trans "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>{% trans "Drop an audio file here" %}</strong>
|
|
<span>{% trans "or click to browse your device" %}</span>
|
|
</span>
|
|
<span class="file-name" id="file-name">{% trans "No file selected" %}</span>
|
|
</label>
|
|
<div class="form-footer">
|
|
<p class="file-note">{% trans "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>{% trans "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="{% trans "Classification results" %}"></section>
|
|
</main>
|
|
</body>
|
|
</html>
|