fuggen homegrown maddafaggin radio shiet
comming soon, on a URL near you
This commit is contained in:
parent
e1ebc2fc18
commit
fb55f64cf1
2 changed files with 162 additions and 11 deletions
|
|
@ -181,7 +181,7 @@ time {
|
||||||
font-size: .5em;
|
font-size: .5em;
|
||||||
}
|
}
|
||||||
.section-headers {
|
.section-headers {
|
||||||
margin: 2px 4px;
|
margin: 2px;
|
||||||
border-radius: 100px;
|
border-radius: 100px;
|
||||||
padding: 80px 20px;
|
padding: 80px 20px;
|
||||||
border-style: double;
|
border-style: double;
|
||||||
|
|
@ -210,7 +210,7 @@ time {
|
||||||
border-width: 10px;
|
border-width: 10px;
|
||||||
flex: 1 1 100% !important;
|
flex: 1 1 100% !important;
|
||||||
border-radius: 0 0 100px 100px;
|
border-radius: 0 0 100px 100px;
|
||||||
margin: 2px 4px;
|
margin: 2px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.border {
|
.border {
|
||||||
|
|
@ -267,7 +267,7 @@ time {
|
||||||
flex: 1 1 100%;
|
flex: 1 1 100%;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
margin: 2px 4px;
|
margin: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.support {
|
.support {
|
||||||
|
|
@ -364,7 +364,7 @@ justify-content: space-between;
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
max-height: 200px;
|
height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -384,12 +384,62 @@ justify-content: space-between;
|
||||||
|
|
||||||
#radio {
|
#radio {
|
||||||
|
|
||||||
.border {
|
#recordPlayer {
|
||||||
margin: 2px 4px;
|
height: 300px;
|
||||||
|
width: 300px;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center center;
|
||||||
|
border-radius:7px;
|
||||||
|
transition: all linear 1s;
|
||||||
}
|
}
|
||||||
|
.spinner {
|
||||||
|
border-radius: 300px !important;
|
||||||
|
animation: rotate 10s linear infinite;
|
||||||
|
}
|
||||||
|
.stop {
|
||||||
|
animation-play-state: paused;
|
||||||
|
}
|
||||||
|
|
||||||
|
.radioplayer {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.legend-container {
|
||||||
|
align-content: center;
|
||||||
|
margin-left: 40px;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.legend {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.border {
|
||||||
|
margin: 2px;
|
||||||
|
}
|
||||||
|
audio {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background: transparent;
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes rotate {
|
||||||
|
0% {
|
||||||
|
transform: rotate(0deg)
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: rotate(360deg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 720px) {
|
@media screen and (max-width: 720px) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,10 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<section id="radio">
|
<section id="radio">
|
||||||
<div class="section-headers" style="background-image: url(/2025/images/radio.webp);">
|
<div class="section-headers" style="background-image: url(/2025/images/radio.webp);">
|
||||||
<h2>RadioStation</h2>
|
<h2>RadioStation</h2>
|
||||||
|
|
@ -5,11 +12,105 @@
|
||||||
<p>777% music, without commercials! RobotDJ-sets and live interventions! This is the sound of freedom.</p>
|
<p>777% music, without commercials! RobotDJ-sets and live interventions! This is the sound of freedom.</p>
|
||||||
<a class="button" href="https://radio.basspistol.com/">Request song 📻</a>
|
<a class="button" href="https://radio.basspistol.com/">Request song 📻</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="border">
|
<div class="border radioplayer">
|
||||||
<iframe src="https://radio.basspistol.com/public/basspistol/embed?theme=dark" frameborder="0" allowtransparency="true" style="width: 100%; min-height: 150px; border: 0;"></iframe>
|
<div id="recordPlayer">
|
||||||
|
<img src="" />
|
||||||
<iframe src="https://radio.basspistol.com/public/basspistol/history?theme=dark" frameborder="0" allowtransparency="true" style="width: 100%; min-height: 480px; border: 0;"></iframe>
|
</div>
|
||||||
|
<div class="legend-container">
|
||||||
|
<div class="legend">
|
||||||
|
<button id="myBtn">▶️</button>
|
||||||
|
<div>
|
||||||
|
<h4 id="npTitle"></h4>
|
||||||
|
<p id="npArtist"></p>
|
||||||
|
<audio preload="none" id="radioAudio">
|
||||||
|
<source src="https://radio.basspistol.com/listen/basspistol/radio.mp3" type="audio/mpeg">
|
||||||
|
Your browser does not support the audio element.
|
||||||
|
</audio>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a href="" id="supportButtonDelux" class="button player">🫰 Support this Artist</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="section-footers"></div>
|
<div class="section-footers"></div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
console.log("Loading Basspistol Radio! Enjoy!");
|
||||||
|
|
||||||
|
// Logic to fetch URL of currently playing artist
|
||||||
|
|
||||||
|
const list = document.createDocumentFragment();
|
||||||
|
const supportUrl = 'https://radio.basspistol.com/api/nowplaying';
|
||||||
|
|
||||||
|
// Catch elements that need influece
|
||||||
|
// support button
|
||||||
|
let supportButtonDelux = document.getElementById('supportButtonDelux');
|
||||||
|
|
||||||
|
// record player
|
||||||
|
let recordPlayer = document.getElementById('recordPlayer');
|
||||||
|
recordPlayer.classList.add("btn");
|
||||||
|
|
||||||
|
// Title and Artist
|
||||||
|
let npArtist = document.getElementById('npArtist');
|
||||||
|
let npTitle = document.getElementById('npTitle');
|
||||||
|
|
||||||
|
function timeleyManner(){
|
||||||
|
fetch(supportUrl)
|
||||||
|
.then((response) => {
|
||||||
|
return response.json();
|
||||||
|
})
|
||||||
|
.then((data) => {
|
||||||
|
let supportClicker = data;
|
||||||
|
|
||||||
|
|
||||||
|
supportClicker.map(function(support) {
|
||||||
|
|
||||||
|
// set background image in record player
|
||||||
|
recordPlayer.style.backgroundImage = "url(" + `${support.now_playing.song.art}` + ")";
|
||||||
|
|
||||||
|
// print text
|
||||||
|
|
||||||
|
npTitle.innerHTML = `${support.now_playing.song.title}`;
|
||||||
|
|
||||||
|
npArtist.innerHTML = `by ${support.now_playing.song.artist}`;
|
||||||
|
|
||||||
|
if(`${support.now_playing.song.custom_fields.support_url}` != "null") {
|
||||||
|
supportButtonDelux.href = `${support.now_playing.song.custom_fields.support_url}` + "?ref=radio.basspistol.com" + "&title=" + `${support.now_playing.song.text}`;
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
supportButtonDelux.href = "https://www.urbandictionary.com/define.php?term=Anon";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(function(error) {
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
timeleyManner();
|
||||||
|
|
||||||
|
setInterval
|
||||||
|
|
||||||
|
// player logic
|
||||||
|
var audio = document.getElementById("radioAudio");
|
||||||
|
var btn = document.getElementById("myBtn");
|
||||||
|
|
||||||
|
btn.onclick = function() {
|
||||||
|
if (audio.paused) {
|
||||||
|
audio.play();
|
||||||
|
btn.innerHTML = "⏸️";
|
||||||
|
recordPlayer.classList.add("spinner");
|
||||||
|
recordPlayer.classList.remove("stop");
|
||||||
|
} else {
|
||||||
|
audio.pause();
|
||||||
|
btn.innerHTML = "▶️";
|
||||||
|
recordPlayer.classList.add("stop");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue