You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.5 KiB
JavaScript

2 months ago
//nav
function openLetter() {
$('#letterContents').html(` <p id = "letterContents">
Hi. I made you this website.
<br><br>
Cake Intimacies is a performance that took a year to bring together. It is a small selection of stories people told me that I held to memory and rewrote here. The stories come from two performances I hosted.
In the first, I asked participants to eat cake, sitting facing or away from each other, and share stories about cake and the internet. I hosted the second performance at the Art Meets Radical Openness Festival. There I predicted participants' future internet lives using felted archetypes. In return I received stories about feeling strong emotions on the internet.
2 months ago
<br><br>
1 month ago
ada
1 month ago
<br><br>
1 month ago
p.s.
<br>
1 month ago
If you see yourself, what you have told me or posted online reflected too closely for comfort do not hesitate to reach out to me at 0backplaces@gmail.com`)
2 months ago
$('.letterBox').toggle()
}
function closeLetter() {
$('.letterBox').hide()
}
document.addEventListener('DOMContentLoaded', (event) => {
const about = document.getElementById('about');
about.addEventListener('mouseover', (event) => {
2 months ago
event.target.src = '../photos/open-crow.png';
2 months ago
});
about.addEventListener('mouseout', (event) => {
2 months ago
event.target.src = '../photos/closed-crow.png';
2 months ago
});
const home = document.getElementById('home');
home.addEventListener('mouseover', (event) => {
2 months ago
event.target.src = '../photos/home-open.png';
2 months ago
});
home.addEventListener('mouseout', (event) => {
2 months ago
event.target.src = '../photos/home-closed.png';
2 months ago
});
});
//audio
document.addEventListener("DOMContentLoaded", function() {
const audioElement = document.getElementById('background-audio');
const muteButton = document.getElementById('mute-btn');
// Set initial mute state from localStorage
let isMuted = localStorage.getItem('mute') === 'true';
audioElement.muted = isMuted;
muteButton.textContent = isMuted ? "SOUND ON" : "MUTE";
// Start audio playback on user interaction
const startAudio = () => {
audioElement.play();
document.removeEventListener('click', startAudio);
};
document.addEventListener('click', startAudio);
muteButton.addEventListener('click', function() {
isMuted = !isMuted;
audioElement.muted = isMuted;
localStorage.setItem('mute', isMuted);
muteButton.textContent = isMuted ? "SOUND ON" : "MUTE";
});
});