martino's review

master
ada 2 months ago
parent a0fb4bd001
commit e908684d80

@ -177,7 +177,7 @@ body {
.letterBox { .letterBox {
line-height: 130%; line-height: 130%;
font-size: 11px; font-size: 12px;
padding: 30px; padding: 30px;
margin: 30px; margin: 30px;
max-width: 99%; max-width: 99%;

@ -84,12 +84,18 @@ document.addEventListener('DOMContentLoaded', (event) => {
event.target.src = '../photos/home-closed.png'; event.target.src = '../photos/home-closed.png';
}); });
}); });
//audio //audio
document.addEventListener("DOMContentLoaded", function() { document.addEventListener("DOMContentLoaded", function() {
const audioElement = document.getElementById('background-audio'); const audioElement = document.getElementById('background-audio');
const muteButton = document.getElementById('mute-btn'); const muteButton = document.getElementById('mute-btn');
// Function to set the volume
const setVolume = () => {
audioElement.volume = 0.1; // Set volume to 10%
};
setVolume(); // Set initial volume
// Set initial mute state from localStorage // Set initial mute state from localStorage
let isMuted = localStorage.getItem('mute') === 'true'; let isMuted = localStorage.getItem('mute') === 'true';
audioElement.muted = isMuted; audioElement.muted = isMuted;
@ -98,6 +104,7 @@ document.addEventListener("DOMContentLoaded", function() {
// Start audio playback on user interaction // Start audio playback on user interaction
const startAudio = () => { const startAudio = () => {
audioElement.play(); audioElement.play();
setVolume(); // Ensure volume is set after play
document.removeEventListener('click', startAudio); document.removeEventListener('click', startAudio);
}; };
@ -110,3 +117,4 @@ document.addEventListener("DOMContentLoaded", function() {
muteButton.textContent = isMuted ? "SOUND ON" : "MUTE"; muteButton.textContent = isMuted ? "SOUND ON" : "MUTE";
}); });
}); });

@ -1 +1 @@
[{"name":"test","post":"test"},{"name":"ddwdede","post":"ada"},{"name":"test","post":"test"},{"name":"work?","post":"this"},{"name":"hello ada! thanks for this amazing website. welove you too","post":"fofi"},{"name":"hello ada! thanks for this amazing website. welove you too","post":"fofi"},{"name":"my brother is autistic","post":"mati"},{"name":"","post":""},{"name":"vv","post":"vv"},{"name":"vv","post":"vv"},{"name":"","post":""},{"name":"vv","post":"vv"},{"name":"","post":""},{"name":"","post":""},{"name":"c","post":"c"},{"name":"f","post":"f"},{"name":"f","post":"f"},{"name":"f","post":"f"},{"name":"","post":""},{"name":"","post":""},{"name":"siblings are real","post":"f"},{"name":"","post":""},{"name":"","post":""}] [{"name":"test","post":"test"}]

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Loading…
Cancel
Save