- index.theme con Directories=stereo, OutputProfile=stereo, Inherits=freedesktop ed Example=theme-demo - 61 cue sintetizzati da zero (Ogg Vorbis 48 kHz stereo) piu' il montaggio di anteprima theme-demo.oga - tools/gen_sounds.py: motore di sintesi riproducibile (voci FM, pluck Karplus-Strong, rumore a banda variabile, sub-impact, pad additivi, riverbero a convoluzione, modello di degrado) - tools/verify_theme.py: verifica della spec, igiene audio (clipping, DC, click ai bordi) e copertura dei nomi suono richiesti dai notifyrc di KDE - preview/index.html: player nel browser per ogni cue del tema - Makefile, install.sh, LICENSES (audio CC-BY-SA-4.0, codice BSD-2-Clause)
109 lines
6.4 KiB
HTML
109 lines
6.4 KiB
HTML
<!-- preview_template.html — sorgente di preview/index.html.
|
|
Generato da scaffold_repo.py; usa str.format(), quindi le graffe
|
|
di CSS e JavaScript sono raddoppiate. Rigenera la pagina con:
|
|
python3 tools/make_preview.py DeepSpace preview/index.html
|
|
SPDX-License-Identifier: BSD-2-Clause -->
|
|
<!DOCTYPE html>
|
|
<html lang="it">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>DeepSpace — sound theme</title>
|
|
<style>
|
|
:root { --accent: #2fb4d2; --accent2: #70c493; --bg: #0c1822; --fg: #d7e6ee; }
|
|
* { box-sizing: border-box; }
|
|
body { margin: 0; padding: 2.5rem 1.25rem 4rem;
|
|
background: radial-gradient(120% 80% at 50% 0%, #1a2634 0%, var(--bg) 55%, #05080c 100%);
|
|
color: var(--fg); min-height: 100vh;
|
|
font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
|
|
.wrap { max-width: 960px; margin: 0 auto; }
|
|
h1 { font-size: 2.4rem; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 .2rem; }
|
|
h1 span { color: var(--accent); }
|
|
.tag { color: var(--accent); font-style: italic; margin: 0 0 1.2rem; }
|
|
.meta { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; margin: 0 0 2rem;
|
|
opacity: .75; font-size: .9rem; }
|
|
.meta b { font-weight: 600; color: var(--accent2); }
|
|
.demo { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.10);
|
|
border-left: 3px solid var(--accent); border-radius: 10px;
|
|
padding: 1rem 1.2rem; margin: 0 0 2rem; }
|
|
.demo h2 { margin: 0 0 .5rem; font-size: 1rem; font-weight: 600; }
|
|
.grid { display: grid; gap: 6px;
|
|
grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }
|
|
.row { display: flex; align-items: center; gap: .7rem;
|
|
padding: .45rem .7rem; border-radius: 8px;
|
|
background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
|
|
transition: background .15s, border-color .15s; }
|
|
.row:hover { background: rgba(255,255,255,.07); border-color: var(--accent); }
|
|
.row.playing { border-color: var(--accent); background: rgba(255,255,255,.09); }
|
|
.row button { flex: 0 0 30px; height: 30px; border-radius: 50%; cursor: pointer;
|
|
border: 1px solid var(--accent); background: transparent;
|
|
color: var(--accent); font-size: 12px; line-height: 1;
|
|
display: grid; place-items: center; }
|
|
.row button:hover { background: var(--accent); color: var(--bg); }
|
|
.row .n { flex: 1; font-size: .87rem; font-family: ui-monospace, monospace;
|
|
overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.row .d { flex: 0 0 auto; font-size: .76rem; opacity: .55;
|
|
font-variant-numeric: tabular-nums; }
|
|
footer { margin-top: 3rem; padding-top: 1.2rem; font-size: .82rem; opacity: .6;
|
|
border-top: 1px solid rgba(255,255,255,.08); }
|
|
footer a { color: var(--accent); }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="wrap">
|
|
<h1>DeepSpace</h1>
|
|
<p class="tag">Operational telemetry for the long haul</p>
|
|
<div class="meta">
|
|
<span><b>61</b> cue</span>
|
|
<span><b>48 kHz</b> stereo Ogg Vorbis</span>
|
|
<span><b>freedesktop</b> sound theme spec</span>
|
|
<span><b>KDE Plasma 6</b></span>
|
|
</div>
|
|
|
|
<div class="demo">
|
|
<h2>theme-demo — anteprima del tema</h2>
|
|
<audio id="demo" controls preload="none" src="../DeepSpace/stereo/theme-demo.oga"></audio>
|
|
</div>
|
|
|
|
<div class="grid" id="grid"></div>
|
|
|
|
<footer>
|
|
DeepSpace — CC BY-SA 4.0. I cue sono sintetizzati da zero con
|
|
<code>tools/gen_sounds.py</code>: nessun campione di terze parti.
|
|
</footer>
|
|
</div>
|
|
<script>
|
|
const NAMES = [ ["alarm-clock-elapsed", 2.66], ["audio-test-signal", 1.10], ["audio-volume-change", 0.13], ["battery-caution", 1.18], ["battery-full", 1.05], ["battery-low", 1.18], ["bell-terminal", 0.15], ["bell-window-system-attention", 0.94], ["bell-window-system", 0.88], ["bell", 1.26], ["button-pressed-modifier", 0.12], ["button-pressed", 0.11], ["camera-shutter", 0.26], ["complete-media-burn", 2.26], ["complete-media-error", 1.72], ["complete", 0.83], ["completion-fail", 1.38], ["completion-partial", 1.12], ["completion-rotation", 1.68], ["completion-success", 2.14], ["desktop-login", 2.90], ["desktop-logout", 2.20], ["device-added", 0.64], ["device-removed", 0.64], ["dialog-error-critical", 2.32], ["dialog-error-serious", 1.80], ["dialog-error-veryserious", 2.70], ["dialog-error", 1.48], ["dialog-information", 1.13], ["dialog-question", 1.14], ["dialog-special", 1.86], ["dialog-warning-auth", 1.00], ["dialog-warning", 1.27], ["game-over-loser", 2.60], ["game-over-winner", 3.02], ["media-insert-request", 0.87], ["message-attention", 1.16], ["message-contact-in", 1.05], ["message-contact-out", 1.05], ["message-highlight", 0.86], ["message-new-email", 1.48], ["message-new-instant", 0.92], ["message-sent-instant", 0.45], ["message", 0.80], ["network-connectivity-established", 1.66], ["network-connectivity-lost", 1.26], ["outcome-failure", 1.32], ["outcome-success", 1.62], ["phone-incoming-call", 2.44], ["phone-outgoing-busy", 1.30], ["phone-outgoing-calling", 1.16], ["power-plug", 0.78], ["power-unplug", 0.88], ["screen-capture", 0.30], ["service-login", 1.34], ["service-logout", 1.24], ["suspend-error", 1.92], ["trash-empty", 0.95], ["window-attention", 1.43], ["window-question", 1.04] ];
|
|
const grid = document.getElementById('grid');
|
|
let current = null;
|
|
for (const [name, dur] of NAMES) {
|
|
const row = document.createElement('div');
|
|
row.className = 'row';
|
|
const btn = document.createElement('button');
|
|
btn.textContent = '▶';
|
|
btn.setAttribute('aria-label', 'riproduci ' + name);
|
|
const label = document.createElement('span');
|
|
label.className = 'n';
|
|
label.textContent = name;
|
|
const d = document.createElement('span');
|
|
d.className = 'd';
|
|
d.textContent = dur + 's';
|
|
const audio = new Audio('../DeepSpace/stereo/' + name + '.oga');
|
|
audio.preload = 'none';
|
|
btn.onclick = () => {
|
|
if (current && current !== audio) { current.pause(); current.currentTime = 0; }
|
|
document.querySelectorAll('.row.playing').forEach(r => r.classList.remove('playing'));
|
|
if (!audio.paused) { audio.pause(); audio.currentTime = 0; btn.textContent = '▶'; return; }
|
|
current = audio;
|
|
btn.textContent = '❚❚';
|
|
row.classList.add('playing');
|
|
audio.play();
|
|
};
|
|
audio.onended = () => { btn.textContent = '▶'; row.classList.remove('playing'); };
|
|
row.append(btn, label, d);
|
|
grid.append(row);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|