Spaces:
Running

test2 / index.html
oktavianto's picture
Add 2 files
7a2d9f3 verified
Raw History Blame Contribute Delete
30.7 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Sarah & Michael's Wedding</title>
<script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
<script src="https://cdn.jsdelivr.net/npm/animejs@4.0.0/lib/anime.iife.min.js"></script>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-15px); }
}
.floating {
animation: float 6s ease-in-out infinite;
}
.gradient-bg {
background: linear-gradient(135deg, #f5d9ff 0%, #ffd6e7 50%, #c1f3ff 100%);
background-size: 200% 200%;
animation: gradient 15s ease infinite;
}
@keyframes gradient {
0% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
100% { background-position: 0% 50%; }
}
.blob {
position: absolute;
filter: blur(40px);
border-radius: 50%;
opacity: 0.7;
z-index: -1;
}
/* Updated slide transitions */
.slide-next-enter-active,
.slide-next-leave-active,
.slide-prev-enter-active,
.slide-prev-leave-active {
transition: all 0.5s ease;
}
/* Entering next slide (swipe left) */
.slide-next-enter-from {
transform: translateX(100%);
opacity: 0;
}
.slide-next-enter-to {
transform: translateX(0);
opacity: 1;
}
/* Leaving current slide (swipe left) */
.slide-next-leave-from {
transform: translateX(0);
opacity: 1;
}
.slide-next-leave-to {
transform: translateX(-100%);
opacity: 0;
}
/* Entering previous slide (swipe right) */
.slide-prev-enter-from {
transform: translateX(-100%);
opacity: 0;
}
.slide-prev-enter-to {
transform: translateX(0);
opacity: 1;
}
/* Leaving current slide (swipe right) */
.slide-prev-leave-from {
transform: translateX(0);
opacity: 1;
}
.slide-prev-leave-to {
transform: translateX(100%);
opacity: 0;
}
.heart-beat {
animation: heartbeat 1.5s ease-in-out infinite both;
}
@keyframes heartbeat {
0% { transform: scale(1); }
14% { transform: scale(1.1); }
28% { transform: scale(1); }
42% { transform: scale(1.1); }
70% { transform: scale(1); }
}
.swipe-indicator {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { opacity: 0.5; transform: translateX(0); }
50% { opacity: 1; transform: translateX(10px); }
100% { opacity: 0.5; transform: translateX(0); }
}
.music-control {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 100;
width: 50px;
height: 50px;
border-radius: 50%;
background: rgba(255,255,255,0.8);
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.hidden-video {
position: absolute;
width: 0;
height: 0;
opacity: 0;
}
</style>
</head>
<body class="font-sans bg-white overflow-hidden touch-none">
<div id="app">
<!-- Background blobs -->
<div class="blob w-64 h-64 bg-pink-300 top-10 left-10"></div>
<div class="blob w-80 h-80 bg-purple-200 bottom-20 right-10"></div>
<div class="blob w-72 h-72 bg-blue-200 top-1/2 left-1/4"></div>
<!-- Hidden YouTube player for background music -->
<iframe id="music-player" class="hidden-video"
src="https://www.youtube.com/embed/5qap5aO4i9A?autoplay=1&loop=1&enablejsapi=1"
frameborder="0" allow="autoplay"></iframe>
<!-- Music control button -->
<div class="music-control" @click="toggleMusic">
<i class="fas" :class="{'fa-volume-up': musicPlaying, 'fa-volume-mute': !musicPlaying}"></i>
</div>
<!-- Slides container -->
<div class="relative w-full h-screen overflow-hidden"
@touchstart="handleTouchStart"
@touchmove="handleTouchMove"
@touchend="handleTouchEnd">
<!-- Slide 1: Cover -->
<transition :name="transitionName">
<div v-if="currentSlide === 1" class="absolute inset-0 p-6 flex flex-col justify-center items-center text-center">
<div class="gradient-bg absolute inset-0 rounded-3xl overflow-hidden">
<div class="absolute inset-0 bg-white opacity-10"></div>
</div>
<div class="relative z-10">
<h1 class="text-4xl font-bold text-gray-800 mb-4">Sarah & Michael</h1>
<p class="text-xl text-gray-600 mb-6">Are getting married</p>
<div class="heart-beat text-red-500 text-6xl mb-6">
<i class="fas fa-heart"></i>
</div>
<p class="text-2xl text-gray-700 font-medium">June 15, 2024</p>
<div class="mt-10 text-gray-500 flex items-center justify-center">
<span>Swipe to continue</span>
<i class="fas fa-arrow-right ml-2 swipe-indicator"></i>
</div>
</div>
</div>
</transition>
<!-- Slide 2: Our Story -->
<transition :name="transitionName">
<div v-if="currentSlide === 2" class="absolute inset-0 p-6 flex flex-col justify-center">
<div class="bg-white bg-opacity-90 rounded-3xl p-6 shadow-xl h-full overflow-y-auto">
<h2 class="text-2xl font-bold text-gray-800 mb-6 text-center">Our Love Story</h2>
<div class="relative h-48 rounded-xl overflow-hidden mb-6">
<img src="https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
alt="Our story"
class="w-full h-full object-cover">
</div>
<p class="text-gray-600 mb-4">We met in college during a photography class and bonded over our love for travel and bad puns. After 5 wonderful years together, we're excited to start this new chapter!</p>
<p class="text-gray-600 mb-4">Michael proposed during our trip to Bali at sunrise on the beach. It was completely unexpected and absolutely perfect.</p>
<div class="flex justify-between mt-8">
<button @click="prevSlide" class="text-pink-500">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button @click="nextSlide" class="text-pink-500">
Next <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
</transition>
<!-- Slide 3: Wedding Details -->
<transition :name="transitionName">
<div v-if="currentSlide === 3" class="absolute inset-0 p-6 flex flex-col justify-center">
<div class="bg-white bg-opacity-90 rounded-3xl p-6 shadow-xl h-full overflow-y-auto">
<h2 class="text-2xl font-bold text-gray-800 mb-6 text-center">Wedding Details</h2>
<div class="space-y-6">
<div class="flex items-start">
<div class="bg-pink-100 p-3 rounded-full mr-4">
<i class="fas fa-calendar-day text-pink-500"></i>
</div>
<div>
<h3 class="font-medium text-gray-800 text-lg">Date & Time</h3>
<p class="text-gray-600">June 15, 2024 at 4:0 PM</p>
</div>
</div>
<div class="flex items-start">
<div class="bg-blue-100 p-3 rounded-full mr-4">
<i class="fas fa-map-marker-alt text-blue-500"></i>
</div>
<div>
<h3 class="font-medium text-gray-800 text-lg">Location</h3>
<p class="text-gray-600">The Grand Willow</p>
<p class="text-gray-600">123 Garden Lane, Portland</p>
</div>
</div>
<div class="relative h-48 rounded-xl overflow-hidden mt-6">
<img src="https://images.unsplash.com/photo-1519225421980-715cb0215aed?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"
alt="Venue"
class="w-full h-full object-cover">
</div>
<div class="flex justify-between mt-8">
<button @click="prevSlide" class="text-pink-500">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button @click="nextSlide" class="text-pink-500">
Next <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</transition>
<!-- Slide 4: Schedule -->
<transition :name="transitionName">
<div v-if="currentSlide === 4" class="absolute inset-0 p-6 flex flex-col justify-center">
<div class="bg-white bg-opacity-90 rounded-3xl p-6 shadow-xl h-full overflow-y-auto">
<h2 class="text-2xl font-bold text-gray-800 mb-6 text-center">Wedding Day Schedule</h2>
<div class="relative">
<div class="absolute left-5 h-full w-0.5 bg-gradient-to-b from-pink-300 to-blue-300"></div>
<div class="mb-8 ml-10 relative">
<div class="absolute -left-10 top-0 w-8 h-8 rounded-full bg-gradient-to-r from-pink-400 to-purple-400 flex items-center justify-center text-white">
<i class="fas fa-ring"></i>
</div>
<div class="bg-white p-4 rounded-xl shadow-md">
<h3 class="font-semibold text-gray-800">Ceremony</h3>
<p class="text-gray-600">4:00 PM - 4:30 PM</p>
<p class="text-gray-500 mt-1">Garden Pavilion</p>
</div>
</div>
<div class="mb-8 ml-10 relative">
<div class="absolute -left-10 top-0 w-8 h-8 rounded-full bg-gradient-to-r from-yellow-400 to-orange-400 flex items-center justify-center text-white">
<i class="fas fa-camera"></i>
</div>
<div class="bg-white p-4 rounded-xl shadow-md">
<h3 class="font-semibold text-gray-800">Photos</h3>
<p class="text-gray-600">4:30 PM - 5:30 PM</p>
<p class="text-gray-500 mt-1">Rose Garden</p>
</div>
</div>
<div class="mb-8 ml-10 relative">
<div class="absolute -left-10 top-0 w-8 h-8 rounded-full bg-gradient-to-r from-blue-400 to-teal-400 flex items-center justify-center text-white">
<i class="fas fa-glass-cheers"></i>
</div>
<div class="bg-white p-4 rounded-xl shadow-md">
<h3 class="font-semibold text-gray-800">Cocktail Hour</h3>
<p class="text-gray-600">5:30 PM - 6:30 PM</p>
<p class="text-gray-500 mt-1">Terrace Lounge</p>
</div>
</div>
<div class="mb-8 ml-10 relative">
<div class="absolute -left-10 top-0 w-8 h-8 rounded-full bg-gradient-to-r from-purple-400 to-pink-400 flex items-center justify-center text-white">
<i class="fas fa-utensils"></i>
</div>
<div class="bg-white p-4 rounded-xl shadow-md">
<h3 class="font-semibold text-gray-800">Reception</h3>
<p class="text-gray-600">6:30 PM - 11:00 PM</p>
<p class="text-gray-500 mt-1">Grand Ballroom</p>
</div>
</div>
<div class="flex justify-between mt-8">
<button @click="prevSlide" class="text-pink-500">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button @click="nextSlide" class="text-pink-500">
Next <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
</div>
</transition>
<!-- Slide 5: RSVP -->
<transition :name="transitionName">
<div v-if="currentSlide === 5" class="absolute inset-0 p-6 flex flex-col justify-center">
<div class="bg-white bg-opacity-90 rounded-3xl p-6 shadow-xl h-full overflow-y-auto">
<h2 class="text-2xl font-bold text-gray-800 mb-6 text-center">RSVP</h2>
<p class="text-gray-600 mb-6 text-center">Kindly respond by May 1, 2024</p>
<form @submit.prevent="submitRSVP" class="space-y-4">
<div>
<label class="block text-gray-700 mb-1">Full Name</label>
<input type="text" v-model="rsvpForm.name" required
class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-pink-300 focus:border-transparent">
</div>
<div>
<label class="block text-gray-700 mb-1">Email</label>
<input type="email" v-model="rsvpForm.email" required
class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-pink-300 focus:border-transparent">
</div>
<div>
<label class="block text-gray-700 mb-1">Number of Guests</label>
<select v-model="rsvpForm.guests"
class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-pink-300 focus:border-transparent">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</div>
<div>
<label class="block text-gray-700 mb-1">Will you be attending?</label>
<div class="flex space-x-4 mt-2">
<label class="inline-flex items-center">
<input type="radio" v-model="rsvpForm.attending" value="yes"
class="text-pink-500 focus:ring-pink-300">
<span class="ml-2">Yes</span>
</label>
<label class="inline-flex items-center">
<input type="radio" v-model="rsvpForm.attending" value="no"
class="text-pink-500 focus:ring-pink-300">
<span class="ml-2">No</span>
</label>
</div>
</div>
<div>
<label class="block text-gray-700 mb-1">Dietary Restrictions</label>
<textarea v-model="rsvpForm.dietary"
class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-pink-300 focus:border-transparent"
placeholder="Vegetarian, allergies, etc."></textarea>
</div>
<button type="submit"
class="w-full py-3 px-6 bg-gradient-to-r from-pink-400 to-purple-500 text-white font-medium rounded-lg shadow-md hover:shadow-lg transition-all mt-6">
Submit RSVP
</button>
<div class="flex justify-between mt-8">
<button @click="prevSlide" class="text-pink-500">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button @click="nextSlide" class="text-pink-500">
Next <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</form>
</div>
</div>
</transition>
<!-- Slide 6: Registry -->
<transition :name="transitionName">
<div v-if="currentSlide === 6" class="absolute inset-0 p-6 flex flex-col justify-center">
<div class="bg-white bg-opacity-90 rounded-3xl p-6 shadow-xl h-full overflow-y-auto">
<h2 class="text-2xl font-bold text-gray-800 mb-6 text-center">Gift Registry</h2>
<p class="text-gray-600 mb-6 text-center">Your presence at our wedding is the greatest gift of all. However, if you wish to help us celebrate with a gift, we've registered at the following stores:</p>
<div class="space-y-4">
<a href="#" class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
<div class="w-12 h-12 bg-blue-100 rounded-lg flex items-center justify-center mr-4">
<i class="fas fa-home text-blue-500 text-xl"></i>
</div>
<div>
<h3 class="font-medium text-gray-800">Crate & Barrel</h3>
<p class="text-gray-500 text-sm">Registry #4859201</p>
</div>
</a>
<a href="#" class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
<div class="w-12 h-12 bg-green-100 rounded-lg flex items-center justify-center mr-4">
<i class="fas fa-utensils text-green-500 text-xl"></i>
</div>
<div>
<h3 class="font-medium text-gray-800">Williams Sonoma</h3>
<p class="text-gray-500 text-sm">Registry #739201</p>
</div>
</a>
<a href="#" class="flex items-center p-3 border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors">
<div class="w-12 h-12 bg-yellow-100 rounded-lg flex items-center justify-center mr-4">
<i class="fas fa-globe-americas text-yellow-500 text-xl"></i>
</div>
<div>
<h3 class="font-medium text-gray-800">Honeymoon Fund</h3>
<p class="text-gray-500 text-sm">Contribute to our dream trip</p>
</div>
</a>
</div>
<div class="flex justify-between mt-8">
<button @click="prevSlide" class="text-pink-500">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
<button @click="nextSlide" class="text-pink-500">
Next <i class="fas fa-arrow-right ml-2"></i>
</button>
</div>
</div>
</div>
</transition>
<!-- Slide 7: Thank You -->
<transition :name="transitionName">
<div v-if="currentSlide === 7" class="absolute inset-0 p-6 flex flex-col justify-center items-center text-center">
<div class="gradient-bg absolute inset-0 rounded-3xl overflow-hidden">
<div class="absolute inset-0 bg-white opacity-10"></div>
</div>
<div class="relative z-10">
<h1 class="text-3xl font-bold text-gray-800 mb-6">Thank You!</h1>
<p class="text-xl text-gray-600 mb-8">We can't wait to celebrate with you on our special day</p>
<div class="heart-beat text-red-500 text-6xl mb-8">
<i class="fas fa-heart"></i>
</div>
<p class="text-gray-700">June 15, 2024</p>
<button @click="prevSlide" class="mt-10 text-pink-500">
<i class="fas fa-arrow-left mr-2"></i> Back
</button>
</div>
</div>
</transition>
</div>
<!-- Slide indicators -->
<div class="fixed bottom-4 left-0 right-0 flex justify-center space-x-2 z-50">
<div v-for="n in 7" :key="n"
class="w-2 h-2 rounded-full transition-all"
:class="{'bg-pink-500 w-4': currentSlide === n, 'bg-gray-300': currentSlide !== n}"></div>
</div>
</div>
<script>
const { createApp, ref } = Vue;
createApp({
setup() {
const currentSlide = ref(1);
const touchStartX = ref(0);
const touchEndX = ref(0);
const musicPlaying = ref(true);
const transitionName = ref('slide-next');
const rsvpForm = ref({
name: '',
email: '',
guests: '1',
attending: 'yes',
dietary: ''
});
function nextSlide() {
if (currentSlide.value < 7) {
transitionName.value = 'slide-next';
currentSlide.value++;
}
}
function prevSlide() {
if (currentSlide.value > 1) {
transitionName.value = 'slide-prev';
currentSlide.value--;
}
}
function handleTouchStart(e) {
touchStartX.value = e.touches[0].clientX;
}
function handleTouchMove(e) {
touchEndX.value = e.touches[0].clientX;
}
function handleTouchEnd() {
if (touchStartX.value - touchEndX.value > 50) {
// Swipe left
nextSlide();
} else if (touchEndX.value - touchStartX.value > 50) {
// Swipe right
prevSlide();
}
}
function submitRSVP() {
alert('Thank you for your RSVP! We look forward to celebrating with you.');
rsvpForm.value = {
name: '',
email: '',
guests: '1',
attending: 'yes',
dietary: ''
};
nextSlide();
}
function toggleMusic() {
const player = document.getElementById('music-player');
if (musicPlaying.value) {
player.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}', '*');
} else {
player.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}', '*');
}
musicPlaying.value = !musicPlaying.value;
}
return {
currentSlide,
nextSlide,
prevSlide,
handleTouchStart,
handleTouchMove,
handleTouchEnd,
rsvpForm,
submitRSVP,
musicPlaying,
toggleMusic,
transitionName
};
},
mounted() {
// Animate blobs on load
anime({
targets: '.blob',
translateX: function() {
return anime.random(-30, 30);
},
translateY: function() {
return anime.random(-30, 30);
},
scale: function() {
return anime.random(0.8, 1.2);
},
duration: 3000,
direction: 'alternate',
loop: true,
easing: 'easeInOutQuad'
});
// Auto-advance slides after 10 seconds of inactivity
let timeout;
const resetTimeout = () => {
clearTimeout(timeout);
timeout = setTimeout(() => {
if (this.currentSlide < 7) {
this.transitionName = 'slide-next';
this.currentSlide++;
}
}, 10000);
};
resetTimeout();
// Reset timeout on any interaction
document.addEventListener('touchstart', resetTimeout);
document.addEventListener('click', resetTimeout);
}
}).mount('#app');
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=oktavianto/test2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>