ho fatto cose ma al momento non hanno molta importanza

This commit is contained in:
encrypt 2021-11-16 17:57:18 +01:00
parent d4448b72d7
commit 9e4eb625b8
3 changed files with 25 additions and 14 deletions

View file

@ -7,10 +7,10 @@
<link rel="stylesheet" type="text/css" href="/player.css">
</head>
<body>
<audio id="radio" controls></audio>
<audio id="radio"></audio>
<div id="player">
<div id="contents" hidden>
<div id="menu" class="tags">
<div id="menu">
<input type="radio" name="tab-selector" id="tab-other-radios" checked/>
<label for="tab-other-radios"> Altre Radio</label>
<input type="radio" name="tab-selector" id="tab-programmi"/>
@ -19,7 +19,7 @@
<label for="tab-playlist"> Playlist</label>
</div>
<div class="tabs">
<div id="other-radios" class="tags">
<div id="other-radios" class="show-list">
</div>
<div id="programmi" class="hidden">
<div class="show-list">
@ -28,7 +28,7 @@
<img id="next-show" class="arrow arrow-right" alt="Scorri a destra" src="/icons/ico-arrow.png" />
</div>
<div class="show-content">
<img id="prev-show-card" class="arrow arrow-left" alt="Scorri a sinistra" src="/icons/ico-arrow.png"/>
<img id="prev-show-card" class="arrow arrow-left hidden" alt="Scorri a sinistra" src="/icons/ico-arrow.png"/>
<div id="programmi-content">
<template id="show-card-template">
<div class="show-card">
@ -42,14 +42,16 @@
</div>
</template>
</div>
<img id="next-show-card" class="arrow arrow-right" alt="Scorri a destra" src="/icons/ico-arrow.png"/>
<img id="next-show-card" class="arrow arrow-right hidden" alt="Scorri a destra" src="/icons/ico-arrow.png"/>
</div>
</div>
<div id="playlist" class="hidden">
Qui ci va la playlist, ancora non puoi riprodurla, però puoi scaricarle l'<span onclick="downloadPlaylist"><b>m3u 📥</b></span>
Qui ci va la playlist, ancora non puoi riprodurla, però puoi scaricarle l'<span onclick="downloadPlaylist()"><b>m3u 📥</b></span>
</div>
</div>
</div>
<div id="progress-bar">
</div>
<div id="controls" class="controls">
<div class="controlBlock controlLeft">
<div class="info-content">

View file

@ -1,3 +1,14 @@
.hidden {
display: none !important;
}
#progress-bar {
background-color: #42414d;
width: 4%;
margin-left: 0px !important;
height: 4px;
}
#player {
/* background-color: #0c0c0d;*/
background-color: #1c1b22;
@ -20,7 +31,7 @@
overflow: hidden;
}
#programmi-lista > span{
#programmi-lista > span, #other-radios > span{
border-radius: 5px 15px;
/* background: #38383d; */
border: solid 1px #fff;
@ -168,10 +179,6 @@
overflow: hidden;
}
.hidden {
display: none;
}
#contents > div {
margin-top: 5px;

View file

@ -184,13 +184,15 @@ async function setupProgrammi() {
el.innerHTML = p.name;
el.addEventListener('click', (e) => {
const id = p.name.replaceAll(/[\W_]+/g," ").replaceAll(' ','-');
for(let box of document.getElementById("programmi-content").getElementsByClassName("content-box")) {
for(let box of document.querySelectorAll("#programmi-content > .content-box")) {
if(box.id != id) {
box.classList.add("hidden");
}
}
console.log(id)
document.getElementById(id).classList.toggle("hidden");
document.querySelectorAll("#programmi > .show-content > .arrow").forEach((el) => {
el.classList.remove("hidden")
})
})
showListEl.appendChild(el)
fetch(p.feed)