1
0

Spaces was converted to tabs in templ.

This commit is contained in:
Alexander Andreev 2024-06-20 01:38:28 +04:00
parent 398b38561a
commit 3d7e3b0193
Signed by: Arav
GPG Key ID: 25969B23DCB5CA34

View File

@ -10,115 +10,115 @@ templ Index(curSong *radio.Song, sl []radio.Song, slLen int64, lstnrs *radio.Lis
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="#cd2682" /> <meta name="theme-color" content="#cd2682" />
<meta name="color-scheme" content="light dark" /> <meta name="color-scheme" content="light dark" />
<title>Arav's dwelling / Radio</title> <title>Arav's dwelling / Radio</title>
<meta name="author" content={ "Alexander \"Arav\" Andreev" } /> <meta name="author" content={ "Alexander \"Arav\" Andreev" } />
<meta name="description" content="Internet-radio broadcasting from under my desk." /> <meta name="description" content="Internet-radio broadcasting from under my desk." />
<meta name="keywords" content="self-host radio home-radio various music" /> <meta name="keywords" content="self-host radio home-radio various music" />
<link rel="canonical" href={ utils.Site(r.Host) } /> <link rel="canonical" href={ utils.Site(r.Host) } />
<link rel="icon" href="/assets/img/favicon.svg" sizes="any" type="image/svg+xml" /> <link rel="icon" href="/assets/img/favicon.svg" sizes="any" type="image/svg+xml" />
<link rel="stylesheet" href="/assets/css/main.css" /> <link rel="stylesheet" href="/assets/css/main.css" />
<script src="/assets/js/main.js" defer /> <script src="/assets/js/main.js" defer />
</head> </head>
<body> <body>
<header> <header>
<svg width="360" viewBox="0 -36 360 66"> <svg width="360" viewBox="0 -36 360 66">
<text y="7" textLength="360" lengthAdjust="spacingAndGlyphs">Arav's dwelling</text> <text y="7" textLength="360" lengthAdjust="spacingAndGlyphs">Arav's dwelling</text>
<text y="25" textLength="360" lengthAdjust="spacingAndGlyphs">Welcome to my sacred place, wanderer</text> <text y="25" textLength="360" lengthAdjust="spacingAndGlyphs">Welcome to my sacred place, wanderer</text>
</svg> </svg>
<nav> <nav>
<a href={ templ.SafeURL(utils.MainSite(r.Host)) }>Back to home</a> <a href={ templ.SafeURL(utils.MainSite(r.Host)) }>Back to home</a>
<h1>Radio</h1> <h1>Radio</h1>
</nav> </nav>
</header> </header>
<section id="banner"> <section id="banner">
<video playsinline autoplay loop muted> <video playsinline autoplay loop muted>
<source src="/assets/img/stopit.mp4" type="video/mp4" /> <source src="/assets/img/stopit.mp4" type="video/mp4" />
</video> </video>
</section> </section>
<section> <section>
<div class="small player-links"> <div class="small player-links">
<a href="/filelist">filelist</a> <a href="/filelist">filelist</a>
<a href="/playlist">playlist</a> <a href="/playlist">playlist</a>
<a href="/live/stream.ogg">direct link</a> <a href="/live/stream.ogg">direct link</a>
(<a href="http://radio.arav.su:8000/stream.ogg">http</a> (<a href="http://radio.arav.su:8000/stream.ogg">http</a>
<a href="http://wsmkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion/live/stream.ogg">Tor</a> <a href="http://wsmkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion/live/stream.ogg">Tor</a>
<a href="http://radio.arav.i2p/live/stream.ogg">I2P</a> <a href="http://radio.arav.i2p/live/stream.ogg">I2P</a>
<a href="http://[300:a98d:d6d0:8a08::e]/live/stream.ogg">Ygg</a>) <a href="http://[300:a98d:d6d0:8a08::e]/live/stream.ogg">Ygg</a>)
<a href="https://dir.xiph.org/search?q=arav's+dwelling">Xiph</a> <a href="https://dir.xiph.org/search?q=arav's+dwelling">Xiph</a>
| OGG 128 Kb/s | OGG 128 Kb/s
</div> </div>
<div id="player"> <div id="player">
<div> <div>
<button id="radio-play" /> <button id="radio-play" />
<input id="radio-volume" type="range" min="0" max="100" orient="vertical" /> <input id="radio-volume" type="range" min="0" max="100" orient="vertical" />
</div> </div>
<audio preload="none" controls playsinline> <audio preload="none" controls playsinline>
<source src="/live/stream.ogg" type="audio/ogg" /> <source src="/live/stream.ogg" type="audio/ogg" />
Your browser doesn't support an audio element, it's sad... But you always can take the <a href="/playlist">playlist</a>! Your browser doesn't support an audio element, it's sad... But you always can take the <a href="/playlist">playlist</a>!
</audio> </audio>
<div> <div>
<p> <p>
<img src="/assets/img/listener.svg" alt="Listeners" title="Listeners" /> <img src="/assets/img/listener.svg" alt="Listeners" title="Listeners" />
<span id="radio-listeners">{ strconv.FormatInt(lstnrs.Current(), 10) }</span> <span id="radio-listeners">{ strconv.FormatInt(lstnrs.Current(), 10) }</span>
<img src="/assets/img/duration.svg" alt="Duration" title="Duration" /> <img src="/assets/img/duration.svg" alt="Duration" title="Duration" />
<span id="radio-duration-estimate"></span> <span id="radio-duration-estimate"></span>
<span id="radio-duration"> <span id="radio-duration">
if curSong != nil && curSong.Artist != "" { if curSong != nil && curSong.Artist != "" {
{ curSong.DurationString() } { curSong.DurationString() }
} else { } else {
0:00 0:00
} }
</span> </span>
</p> </p>
<p> <p>
<img src="/assets/img/note.svg" /> <img src="/assets/img/note.svg" />
<span id="radio-song"> <span id="radio-song">
if curSong != nil && curSong.Artist != "" { if curSong != nil && curSong.Artist != "" {
{ curSong.Artist } - { curSong.Title } { curSong.Artist } - { curSong.Title }
} }
</span> </span>
</p> </p>
</div> </div>
</div> </div>
</section> </section>
<section> <section>
<h2>Last { strconv.FormatInt(slLen, 10) } songs</h2> <h2>Last { strconv.FormatInt(slLen, 10) } songs</h2>
<table id="last-songs"> <table id="last-songs">
<thead class="small"> <thead class="small">
<tr> <tr>
<td>Start</td> <td>Start</td>
<td><abbr title="Overall/Peak listeners">O/P</abbr></td> <td><abbr title="Overall/Peak listeners">O/P</abbr></td>
<td>Song</td> <td>Song</td>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
for _, song := range sl { for _, song := range sl {
<tr> <tr>
<td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td> <td>{ utils.ToClientTimezone(song.StartAt, r).Format("15:04") }</td>
<td> <td>
if song.PeakListeners != 0 { if song.PeakListeners != 0 {
{ strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) } { strconv.FormatInt(song.Listeners, 10) }/{ strconv.FormatInt(song.PeakListeners, 10) }
} }
</td> </td>
<td>{ song.Artist } - { song.Title }</td> <td>{ song.Artist } - { song.Title }</td>
</tr> </tr>
} }
</tbody> </tbody>
</table> </table>
</section> </section>
<footer> <footer>
2017&mdash;2024 Alexander &quot;Arav&quot; Andreev &lt;<a href="mailto:me@arav.su">me@arav.su</a>&gt; <a href={ templ.SafeURL(utils.MainSite(r.Host) + "/privacy") }>Privacy statements</a> 2017&mdash;2024 Alexander &quot;Arav&quot; Andreev &lt;<a href="mailto:me@arav.su">me@arav.su</a>&gt; <a href={ templ.SafeURL(utils.MainSite(r.Host) + "/privacy") }>Privacy statements</a>
</footer> </footer>
</body> </body>
</html> </html>
} }