This commit is contained in:
@@ -1,16 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script defer src="/static/alpine.min.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<title>Radio bullshit, la radio du paradis !</title>
|
||||
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon">
|
||||
<link rel="icon" href="/static/favicon.ico" type="image/x-icon">
|
||||
</head>
|
||||
<body>
|
||||
<audio controls autoplay>
|
||||
<source src="/radio-bullshit" type="audio/mpeg" preload="none" >
|
||||
</audio>
|
||||
|
||||
<div
|
||||
x-data="{ metadata: { status: 'down' } }"
|
||||
x-init="setInterval(
|
||||
async () => {
|
||||
metadata = await get_metadata()
|
||||
},
|
||||
1000,
|
||||
)
|
||||
"
|
||||
>
|
||||
<p x-show="metadata.status == 'ready'" x-text="metadata.title"></p>
|
||||
<audio controls autoplay>
|
||||
<source src="/radio-bullshit" type="audio/mpeg" preload="none" >
|
||||
</audio>
|
||||
</div>
|
||||
<p>
|
||||
<ul>
|
||||
<li><a href="/radio-bullshit">VLC Stream</a></li>
|
||||
@@ -19,4 +31,11 @@
|
||||
</p>
|
||||
|
||||
</body>
|
||||
<script>
|
||||
const get_metadata = async () => {
|
||||
return Object.fromEntries(
|
||||
await (await fetch("/status.json")).json()
|
||||
)
|
||||
}
|
||||
</script>
|
||||
</html>
|
||||
5
www/static/alpine.min.js
vendored
Normal file
5
www/static/alpine.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user