2023-10-08 00:52:40 +04:00
:go:func Index(mainSite string, songList *radio.SongList, listeners *radio.ListenerCounter, mls *radio.MostListenedSong, r *http.Request)
2022-06-13 18:37:50 +04:00
:go:import "dwelling-radio/internal/radio"
2023-03-13 02:11:33 +04:00
:go:import "dwelling-radio/pkg/utils"
2022-06-13 18:37:50 +04:00
2022-03-08 01:17:24 +04:00
doctype html
html(lang='en')
head
title Arav's dwelling / Radio
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible' content='IE=edge')
meta(name='viewport' content='width=device-width, initial-scale=1.0')
meta(name='theme-color' content='#cd2682')
meta(name='description' content='Internet-radio broadcasting from under my desk.')
link(rel='icon' href='/assets/img/favicon.svg' sizes='any' type='image/svg+xml')
link(href='/assets/css/main.css' rel='stylesheet')
2022-03-08 02:18:20 +04:00
script(src='/assets/js/main.js' defer='')
2022-03-08 01:17:24 +04:00
body
header
2023-08-22 03:38:19 +04:00
svg(viewBox='0 -25 216 40')
text Arav's dwelling
text(y='11') Welcome to my sacred place, wanderer
2022-03-08 01:17:24 +04:00
nav
2022-06-13 18:37:50 +04:00
a(href=mainSite) Back to main website
2022-03-08 01:17:24 +04:00
h1 Radio
2023-08-22 03:38:19 +04:00
section#banner
2023-08-13 00:59:07 +04:00
video(playsinline='' autoplay='' loop='')
source(src="/assets/img/stopit.mp4", type="video/mp4")
2022-03-08 01:17:24 +04:00
section
small.player-links
a(href='/filelist') filelist
a(href='/playlist') playlist (.m3u)
a(href='/live/stream.ogg') direct link
2023-02-23 17:49:01 +04:00
a(href='http://radio.arav.su:8000/stream.ogg') direct link (http)
2022-03-08 01:17:24 +04:00
a(href='http://wsmkgnmhmzqm7kyzv7jnzzafvgm7xlmlfvzhgorpapd5or2arnhuktqd.onion/live/stream.ogg') direct link (Tor)
a(href='http://radio.arav.i2p/live/stream.ogg') direct link (I2P)
2022-03-31 02:10:33 +04:00
a(href="https://dir.xiph.org/search?q=arav's+dwelling") Xiph
2022-03-08 01:17:24 +04:00
| OGG 128 Kb/s
2023-08-22 03:38:19 +04:00
div#player
div
2023-08-21 18:33:00 +04:00
div
2023-08-22 04:37:17 +04:00
button#radio-play
input#radio-volume(type="range" min="0" max="100" orient="vertical")
2023-08-20 01:20:13 +04:00
audio(preload='none' controls='' playsinline='')
2023-08-20 02:38:05 +04:00
source(src='/live/stream.ogg' type='audio/ogg')
2023-08-20 01:20:13 +04:00
| Your browser doesn't support an audio element, it's sad... But you always can take the #[a(href='/playlist') playlist]!
div
2023-10-07 05:35:16 +04:00
if (songList.Current() != nil)
- cur := *songList.Current()
2023-10-07 21:31:00 +04:00
p Now playing: #[span#radio-song #{cur.Artist} - #{cur.Title}] ( #[span#radio-duration-estimate ] #[span#radio-duration #{cur.DurationString()}] )
2023-10-02 03:55:51 +04:00
else
2023-10-02 18:20:07 +04:00
p Now playing: #[span#radio-song ] ( #[span#radio-duration-estimate ] #[span#radio-duration ] )
2023-10-02 03:19:48 +04:00
p Current/peak listeners: #[span#radio-listeners #{listeners.Current()}] / #[span#radio-listener-peak #{listeners.Peak()}]
2023-08-20 01:20:13 +04:00
p
2023-08-22 04:37:17 +04:00
small Notice: information updates every 45 seconds. But you can #[button#radio-update update] it forcibly.
2023-03-12 04:05:07 +04:00
section
2023-10-04 18:15:09 +04:00
h2 Last #{songList.MaxLen()} songs
2023-08-22 04:37:17 +04:00
table#last-songs
2023-10-02 18:20:07 +04:00
tbody
each song in songList.List()
tr
td= utils.ToClientTimezone(song.StartAt, r).Format("15:04")
if song.MaxListeners != 0
td= song.MaxListeners
else
td
2023-10-07 21:31:00 +04:00
td #{song.Artist} - #{song.Title}
2023-10-08 00:52:40 +04:00
if mls != nil
p.right Most listened song was "#{mls.Song}" on #{utils.ToClientTimezone(mls.Date, r).Format(radio.MostListenedDateFormat)} with #[b #{mls.Listeners}] listeners.
2022-03-08 01:17:24 +04:00
footer
2023-06-12 22:01:25 +04:00
| 2017—2023 Alexander "Arav" Andreev <#[a(href='mailto:me@arav.su') me@arav.su]> #[a(href=mainSite+'/privacy') Privacy statements]