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.

68 lines
2.5 KiB
JavaScript

7 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 and I held to memory and rewrote here. The stories come from two performances I hosted.
<br> <br>
First, I asked participants to eat cake, sitting facing or away from each other and sharing their stories about cake and the Internet. The second performance was hosted at the Art Meets Radical Openness Festival, as part of the Turning of the Internet workshop. For this performance, I predicted participants' future lives on the Internet using felted archetypes and received stories from their Internet past in return.
<br> <br>
Now the stories are here, each of them a cake with a filling that tells a story, merging the bodily with the digital and making a mess of it all
<br><br>
ada`)
$('.letterBox').toggle()
}
function closeLetter() {
$('.letterBox').hide()
}
document.addEventListener('DOMContentLoaded', (event) => {
const about = document.getElementById('about');
about.addEventListener('mouseover', (event) => {
7 months ago
event.target.src = '../photos/open-crow.png';
7 months ago
});
about.addEventListener('mouseout', (event) => {
7 months ago
event.target.src = '../photos/closed-crow.png';
7 months ago
});
const home = document.getElementById('home');
home.addEventListener('mouseover', (event) => {
7 months ago
event.target.src = '../photos/home-open.png';
7 months ago
});
home.addEventListener('mouseout', (event) => {
7 months ago
event.target.src = '../photos/home-closed.png';
7 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";
});
});