//cards document.addEventListener('DOMContentLoaded', () => { const topCard = document.getElementById('topCard'); const messageDiv = document.getElementById('message-div'); const texts = [ document.getElementById('text1'), document.getElementById('text2'), document.getElementById('text3'), document.getElementById('text4'), document.getElementById('text5') ]; let currentTextIndex = 0; // Initialize by showing the first text in the top card topCard.innerHTML = texts[currentTextIndex].innerHTML; // Show the next text behind the top card function updateBehindCard() { texts.forEach((text, index) => { text.style.display = (index === currentTextIndex + 1) ? 'block' : 'none'; }); } updateBehindCard(); topCard.addEventListener('click', () => { // Hide the current text texts[currentTextIndex].style.display = 'none'; // Update the index currentTextIndex++; if (currentTextIndex >= texts.length) { // Hide the top card after the last text topCard.style.display = 'none'; // Show the message div messageDiv.style.display = 'block'; } else { // Show the new text in the top card topCard.innerHTML = texts[currentTextIndex].innerHTML; // Update the card behind the top card updateBehindCard(); } }); }); function openLetter() { $('#letterContents').html(`
Hi. I made you this website.
Hermit Fantasy is a short story about a bot and a hermit. It started when I conducted a survey about receiving emotional support on the internet. This is an imagined response to an email I received. The story explores the loneliness of both being online and offline. As an act, it's a series of letters, click by click.
ada
p.s.
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