Merge pull request 'Ajout de la radio de l'Interhack' (#62) from feat/radio into main
Some checks failed
/ build (push) Failing after 1m17s

Reviewed-on: #62
This commit is contained in:
Nono 2026-07-02 10:55:21 +00:00
commit a5cf3640dd
5 changed files with 63 additions and 4 deletions

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d="M176 96C149.5 96 128 117.5 128 144L128 496C128 522.5 149.5 544 176 544L240 544C266.5 544 288 522.5 288 496L288 144C288 117.5 266.5 96 240 96L176 96zM400 96C373.5 96 352 117.5 352 144L352 496C352 522.5 373.5 544 400 544L464 544C490.5 544 512 522.5 512 496L512 144C512 117.5 490.5 96 464 96L400 96z"/></svg>

After

Width:  |  Height:  |  Size: 527 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free 7.3.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d="M187.2 100.9C174.8 94.1 159.8 94.4 147.6 101.6C135.4 108.8 128 121.9 128 136L128 504C128 518.1 135.5 531.2 147.6 538.4C159.7 545.6 174.8 545.9 187.2 539.1L523.2 355.1C536 348.1 544 334.6 544 320C544 305.4 536 291.9 523.2 284.9L187.2 100.9z"/></svg>

After

Width:  |  Height:  |  Size: 470 B

View file

@ -157,3 +157,26 @@ font-size : 1.5em;
50% { background-position: 100% 50%; } 50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; } 100% { background-position: 0% 50%; }
} }
/* Radio Interhack */
#radio-player {
float: left;
z-index: 100000;
background-color: aqua;
height: 1em;
width: 1em;
position: absolute;
bottom: 1em;
right: 1em;
position: fixed;
border-radius: 10%;
}
#radio-button {
background: none;
display: flex;
justify-content: center;
align-items: center;
border: none;
}

View file

@ -10,6 +10,7 @@
<script src="js/drag.js" defer></script> <script src="js/drag.js" defer></script>
<script src="js/progress.js" defer></script> <script src="js/progress.js" defer></script>
<script src="js/pop.js" defer></script> <script src="js/pop.js" defer></script>
<script src="js/radio.js" defer></script>
<link rel="icon" type="image/x-icon" href="assets/stickers/ecran.png"> <link rel="icon" type="image/x-icon" href="assets/stickers/ecran.png">
<title>Camp Interhack</title> <title>Camp Interhack</title>
</head> </head>
@ -193,6 +194,16 @@
<p>et bien d'autres !<br> Rejoignez le canal Matrix sur <code>#interhack:matrix.interhacker.space</code></p> <p>et bien d'autres !<br> Rejoignez le canal Matrix sur <code>#interhack:matrix.interhacker.space</code></p>
</div> </div>
</section> </section>
<section id="radio-player">
<audio preload=”metadata”>
<source src="http://stream.p-node.org/interhack.mp3" type="audio/mp3">
😥
</audio>
<span id="radio-button">
<img src="assets/play-solid-full.svg" alt="play button">
</span>
</section>
</main> </main>
<footer> <footer>
<div> <div>

23
js/radio.js Normal file
View file

@ -0,0 +1,23 @@
// Code Javascript pour la radio du Camp Interhack
// Hébergé par P-Node
// Propulsé par le Radio Operation Center
// En live depuis l'Antenne
const radioPlayer = document.getElementById("radio-player");
const audio = document.querySelector('audio');
const radioButton = document.getElementById("radio-button");
let state = "paused" // Can be : "playing" or "paused"
radioPlayer.addEventListener('click', () => {
if(state == "paused"){
state = "playing";
audio.play();
radioButton.innerHTML = '<img src="assets/pause-solid-full.svg" alt="pause button">';
} else {
state = "paused"
audio.pause();
radioButton.innerHTML = '<img src="assets/play-solid-full.svg" alt="play button">';
}
});