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.

73 lines
2.6 KiB
JavaScript

5 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>
In the first, I asked participants to eat cake, sitting facing or away from each other and share stories about cake and the Internet.
In the second performance, hosted at the Art Meets Radical Openness Festival, I predicted participants' future lives on the Internet using felted archetypes and received stories from their Internet past in return.
5 months ago
<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>
5 months ago
ada
5 months ago
<br><br>
5 months ago
p.s.
<br>
5 months 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`)
5 months ago
$('.letterBox').toggle()
}
function closeLetter() {
$('.letterBox').hide()
}
document.addEventListener('DOMContentLoaded', (event) => {
const about = document.getElementById('about');
about.addEventListener('mouseover', (event) => {
5 months ago
event.target.src = '../photos/open-crow.png';
5 months ago
});
about.addEventListener('mouseout', (event) => {
5 months ago
event.target.src = '../photos/closed-crow.png';
5 months ago
});
const home = document.getElementById('home');
home.addEventListener('mouseover', (event) => {
5 months ago
event.target.src = '../photos/home-open.png';
5 months ago
});
home.addEventListener('mouseout', (event) => {
5 months ago
event.target.src = '../photos/home-closed.png';
5 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";
});
});