wedding-invite / index.html
hlsitech's picture
enhance all functions - Follow Up Deployment
64745de verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Elegant Wedding Invitations | AI-Powered Card Creator</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<script>
tailwind.config = {
theme: {
extend: {
colors: {
champagne: '#F7E7CE',
blush: '#DEB6AB',
sage: '#C8C6A7',
mauve: '#A2678A',
navy: '#4D4C7D',
},
fontFamily: {
'playfair': ['"Playfair Display"', 'serif'],
'montserrat': ['Montserrat', 'sans-serif'],
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');
.card-preview {
background-image: url('https://images.unsplash.com/photo-1515934751635-c81c6bc9a2d8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');
background-size: cover;
background-position: center;
box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}
.floating {
animation: floating 3s ease-in-out infinite;
}
@keyframes floating {
0% { transform: translateY(0px); }
50% { transform: translateY(-15px); }
100% { transform: translateY(0px); }
}
.ai-thinking {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.ai-thinking div {
position: absolute;
width: 6px;
height: 6px;
background: #A2678A;
border-radius: 50%;
animation: ai-thinking 1.2s linear infinite;
}
.ai-thinking div:nth-child(1) {
animation-delay: 0s;
top: 37px;
left: 66px;
}
.ai-thinking div:nth-child(2) {
animation-delay: -0.1s;
top: 22px;
left: 62px;
}
.ai-thinking div:nth-child(3) {
animation-delay: -0.2s;
top: 11px;
left: 52px;
}
.ai-thinking div:nth-child(4) {
animation-delay: -0.3s;
top: 7px;
left: 37px;
}
.ai-thinking div:nth-child(5) {
animation-delay: -0.4s;
top: 11px;
left: 22px;
}
.ai-thinking div:nth-child(6) {
animation-delay: -0.5s;
top: 22px;
left: 11px;
}
.ai-thinking div:nth-child(7) {
animation-delay: -0.6s;
top: 37px;
left: 7px;
}
.ai-thinking div:nth-child(8) {
animation-delay: -0.7s;
top: 52px;
left: 11px;
}
.ai-thinking div:nth-child(9) {
animation-delay: -0.8s;
top: 62px;
left: 22px;
}
.ai-thinking div:nth-child(10) {
animation-delay: -0.9s;
top: 66px;
left: 37px;
}
.ai-thinking div:nth-child(11) {
animation-delay: -1s;
top: 62px;
left: 52px;
}
.ai-thinking div:nth-child(12) {
animation-delay: -1.1s;
top: 52px;
left: 62px;
}
@keyframes ai-thinking {
0%, 20%, 80%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.5);
}
}
</style>
</head>
<body class="bg-champagne font-montserrat text-navy">
<!-- Header -->
<header class="bg-white shadow-sm">
<div class="container mx-auto px-4 py-6 flex justify-between items-center">
<div class="flex items-center">
<i class="fas fa-ring text-3xl text-mauve mr-2"></i>
<h1 class="text-2xl font-playfair font-semibold">Elegant Invites</h1>
</div>
<nav class="hidden md:block">
<ul class="flex space-x-8">
<li><a href="#create" class="hover:text-mauve transition">Create</a></li>
<li><a href="#gallery" class="hover:text-mauve transition">Gallery</a></li>
<li><a href="#about" class="hover:text-mauve transition">About</a></li>
<li><a href="#contact" class="hover:text-mauve transition">Contact</a></li>
</ul>
</nav>
<button class="md:hidden text-2xl">
<i class="fas fa-bars"></i>
</button>
</div>
</header>
<!-- Hero Section -->
<section class="py-16 md:py-24 bg-gradient-to-b from-white to-champagne">
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0">
<h2 class="text-4xl md:text-5xl font-playfair font-bold mb-6">Your Perfect Wedding Invitation <span class="text-mauve">Made Easy</span></h2>
<p class="text-lg mb-8">Our AI designer creates stunning, personalized wedding invitations in minutes. Just fill in your details and watch the magic happen!</p>
<a href="#create" class="bg-mauve hover:bg-navy text-white px-8 py-3 rounded-full font-medium transition duration-300 inline-block">Create Yours Now</a>
</div>
<div class="md:w-1/2 flex justify-center">
<div class="card-preview w-80 h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden floating">
<div class="absolute inset-0 bg-black bg-opacity-40"></div>
<div class="relative z-10">
<h3 class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Invite you to celebrate their wedding</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
</div>
</div>
</section>
<!-- Create Form Section -->
<section id="create" class="py-16 bg-white">
<!-- Hidden Templates Carousel -->
<div id="templatesCarousel" class="hidden mt-12">
<div class="container mx-auto px-4">
<h3 class="text-2xl font-playfair font-bold text-center mb-8">Select Your Favorite Design</h3>
<div class="relative">
<div class="carousel-inner flex overflow-x-auto snap-x snap-mandatory scroll-smooth gap-6 pb-8">
<!-- Template 1 -->
<div class="carousel-item flex-shrink-0 w-full sm:w-1/2 lg:w-1/3 snap-start">
<div class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-mauve bg-opacity-70"></div>
<div class="relative z-10">
<h3 id="template1Names" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Invite you to celebrate their wedding</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p id="template1Date" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="template1Venue" class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
<button class="w-full mt-4 bg-mauve hover:bg-navy text-white py-2 px-4 rounded-lg font-medium transition duration-300 select-template" data-template="1">Select This Design</button>
</div>
<!-- Template 2 -->
<div class="carousel-item flex-shrink-0 w-full sm:w-1/2 lg:w-1/3 snap-start">
<div class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-navy bg-opacity-80"></div>
<div class="relative z-10">
<h3 id="template2Names" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Invite you to celebrate their wedding</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p id="template2Date" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="template2Venue" class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
<button class="w-full mt-4 bg-navy hover:bg-mauve text-white py-2 px-4 rounded-lg font-medium transition duration-300 select-template" data-template="2">Select This Design</button>
</div>
<!-- Template 3 -->
<div class="carousel-item flex-shrink-0 w-full sm:w-1/2 lg:w-1/3 snap-start">
<div class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-sage bg-opacity-60"></div>
<div class="relative z-10">
<h3 id="template3Names" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Invite you to celebrate their wedding</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p id="template3Date" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="template3Venue" class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
<button class="w-full mt-4 bg-sage hover:bg-navy text-white py-2 px-4 rounded-lg font-medium transition duration-300 select-template" data-template="3">Select This Design</button>
</div>
<!-- Template 4 -->
<div class="carousel-item flex-shrink-0 w-full sm:w-1/2 lg:w-1/3 snap-start">
<div class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-navy bg-opacity-70"></div>
<div class="relative z-10">
<h3 id="template4Names" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Request the honour of your presence</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p id="template4Date" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="template4Venue" class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
<button class="w-full mt-4 bg-navy hover:bg-mauve text-white py-2 px-4 rounded-lg font-medium transition duration-300 select-template" data-template="4">Select This Design</button>
</div>
<!-- Template 5 -->
<div class="carousel-item flex-shrink-0 w-full sm:w-1/2 lg:w-1/3 snap-start">
<div class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-champagne bg-opacity-80"></div>
<div class="relative z-10 text-navy">
<h3 id="template5Names" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Would love you to join their celebration</p>
<div class="w-16 h-px bg-navy mx-auto my-4"></div>
<p id="template5Date" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="template5Venue" class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
<button class="w-full mt-4 bg-champagne hover:bg-blush text-navy py-2 px-4 rounded-lg font-medium transition duration-300 select-template" data-template="5">Select This Design</button>
</div>
<!-- Template 6 -->
<div class="carousel-item flex-shrink-0 w-full sm:w-1/2 lg:w-1/3 snap-start">
<div class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-blush bg-opacity-50"></div>
<div class="relative z-10">
<h3 id="template6Names" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p class="text-sm mb-4">Joyfully invite you to their wedding</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p id="template6Date" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="template6Venue" class="text-sm">The Grand Ballroom, New York</p>
</div>
</div>
<button class="w-full mt-4 bg-blush hover:bg-navy text-white py-2 px-4 rounded-lg font-medium transition duration-300 select-template" data-template="6">Select This Design</button>
</div>
</div>
<button class="carousel-prev absolute left-0 top-1/2 -translate-y-1/2 -ml-4 bg-white rounded-full w-10 h-10 flex items-center justify-center shadow-md hover:bg-gray-100 transition"><i class="fas fa-chevron-left text-mauve"></i></button>
<button class="carousel-next absolute right-0 top-1/2 -translate-y-1/2 -mr-4 bg-white rounded-full w-10 h-10 flex items-center justify-center shadow-md hover:bg-gray-100 transition"><i class="fas fa-chevron-right text-mauve"></i></button>
</div>
</div>
</div>
<div class="container mx-auto px-4">
<h2 class="text-3xl font-playfair font-bold text-center mb-12">Create Your Invitation</h2>
<div class="flex flex-col lg:flex-row gap-12">
<!-- Form -->
<div class="lg:w-1/2">
<form id="invitationForm" class="space-y-6">
<div>
<label for="coupleNames" class="block text-sm font-medium mb-1">Couple's Names</label>
<input type="text" id="coupleNames" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-mauve focus:border-mauve" placeholder="Sarah & Michael" required>
</div>
<div>
<label for="weddingDate" class="block text-sm font-medium mb-1">Wedding Date</label>
<input type="date" id="weddingDate" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-mauve focus:border-mauve" required>
</div>
<div>
<label for="venue" class="block text-sm font-medium mb-1">Venue</label>
<input type="text" id="venue" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-mauve focus:border-mauve" placeholder="The Grand Ballroom, New York" required>
</div>
<div>
<label for="time" class="block text-sm font-medium mb-1">Time</label>
<input type="time" id="time" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-mauve focus:border-mauve" required>
</div>
<div>
<label for="theme" class="block text-sm font-medium mb-1">Design Theme</label>
<select id="theme" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-mauve focus:border-mauve">
<option value="classic">Classic Elegance</option>
<option value="modern">Modern Minimalist</option>
<option value="rustic">Rustic Charm</option>
<option value="vintage">Vintage Romance</option>
<option value="beach">Beachy Bliss</option>
</select>
</div>
<div>
<label for="colors" class="block text-sm font-medium mb-1">Color Scheme</label>
<div class="flex space-x-2">
<button type="button" data-color="blush" class="w-8 h-8 rounded-full bg-blush border-2 border-white shadow-sm color-btn active"></button>
<button type="button" data-color="sage" class="w-8 h-8 rounded-full bg-sage border-2 border-white shadow-sm color-btn"></button>
<button type="button" data-color="mauve" class="w-8 h-8 rounded-full bg-mauve border-2 border-white shadow-sm color-btn"></button>
<button type="button" data-color="navy" class="w-8 h-8 rounded-full bg-navy border-2 border-white shadow-sm color-btn"></button>
<button type="button" data-color="champagne" class="w-8 h-8 rounded-full bg-champagne border-2 border-white shadow-sm color-btn"></button>
</div>
<input type="hidden" id="colors" value="blush">
</div>
<div>
<label for="message" class="block text-sm font-medium mb-1">Special Message (Optional)</label>
<textarea id="message" rows="3" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-mauve focus:border-mauve" placeholder="We can't wait to celebrate with you..."></textarea>
</div>
<button type="submit" class="w-full bg-mauve hover:bg-navy text-white py-3 px-6 rounded-lg font-medium transition duration-300 flex items-center justify-center">
<span id="submitText">Generate Invitation</span>
<div id="loadingSpinner" class="ai-thinking ml-2 hidden">
<div></div><div></div><div></div><div></div><div></div><div></div>
<div></div><div></div><div></div><div></div><div></div><div></div>
</div>
</button>
</form>
</div>
<!-- Preview -->
<div class="lg:w-1/2">
<div class="sticky top-24">
<h3 class="text-xl font-playfair font-semibold mb-4">AI Preview</h3>
<div id="cardPreview" class="card-preview w-full h-96 rounded-lg p-8 flex flex-col justify-center items-center text-center text-white relative overflow-hidden">
<div class="absolute inset-0 bg-blush bg-opacity-70"></div>
<div class="relative z-10">
<h3 id="previewNames" class="font-playfair text-2xl mb-2">Sarah & Michael</h3>
<p id="previewInviteText" class="text-sm mb-4">Invite you to celebrate their wedding</p>
<div class="w-16 h-px bg-white mx-auto my-4"></div>
<p id="previewDate" class="text-sm mb-1">Saturday, June 10th, 2023</p>
<p id="previewVenue" class="text-sm">The Grand Ballroom, New York</p>
<p id="previewTime" class="text-sm mt-2">4:30 PM</p>
<p id="previewMessage" class="text-xs mt-4 italic hidden">We can't wait to celebrate with you</p>
</div>
</div>
<div id="aiAgent" class="mt-6 bg-white p-4 rounded-lg shadow-sm border border-gray-100">
<div class="flex items-start">
<div class="flex-shrink-0 bg-mauve text-white rounded-full w-10 h-10 flex items-center justify-center">
<i class="fas fa-robot"></i>
</div>
<div class="ml-3">
<h4 class="font-medium">AI Design Assistant</h4>
<p id="aiMessage" class="text-sm text-gray-600 mt-1">Ready to create your perfect invitation! Fill out the form and I'll design it for you.</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Gallery Section -->
<section id="gallery" class="py-16 bg-champagne">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-playfair font-bold text-center mb-12">Design Inspiration</h2>
<div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6">
<!-- Card 1 -->
<div class="bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition duration-300">
<div class="h-48 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1530103862676-de8c9debad1d?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');"></div>
<div class="p-4">
<h3 class="font-playfair font-semibold text-lg mb-2">Classic Elegance</h3>
<p class="text-sm text-gray-600">Timeless design with delicate details</p>
</div>
</div>
<!-- Card 2 -->
<div class="bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition duration-300">
<div class="h-48 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1519225421980-715cb0215aed?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');"></div>
<div class="p-4">
<h3 class="font-playfair font-semibold text-lg mb-2">Modern Minimalist</h3>
<p class="text-sm text-gray-600">Clean lines and contemporary style</p>
</div>
</div>
<!-- Card 3 -->
<div class="bg-white rounded-lg overflow-hidden shadow-md hover:shadow-lg transition duration-300">
<div class="h-48 bg-cover bg-center" style="background-image: url('https://images.unsplash.com/photo-1515934751635-c81c6bc9a2d8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1470&q=80');"></div>
<div class="p-4">
<h3 class="font-playfair font-semibold text-lg mb-2">Rustic Charm</h3>
<p class="text-sm text-gray-600">Natural textures and warm tones</p>
</div>
</div>
</div>
</div>
</section>
<!-- About Section -->
<section id="about" class="py-16 bg-white">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0 md:pr-10">
<h2 class="text-3xl font-playfair font-bold mb-6">About Elegant Invites</h2>
<p class="mb-4">We believe your wedding invitation should be as unique and special as your love story. That's why we've combined beautiful design with artificial intelligence to create personalized invitations that perfectly capture your style.</p>
<p>Our AI designer learns your preferences and creates multiple options for you to choose from. No design skills needed - just answer a few simple questions and we'll handle the rest!</p>
</div>
<div class="md:w-1/2">
<div class="bg-blush bg-opacity-20 p-8 rounded-lg">
<div class="flex items-center mb-4">
<div class="bg-mauve text-white rounded-full w-12 h-12 flex items-center justify-center mr-4">
<i class="fas fa-bolt text-xl"></i>
</div>
<h3 class="font-playfair font-semibold text-xl">Fast & Easy</h3>
</div>
<p class="mb-6">Create your perfect invitation in minutes, not days. Our AI does the heavy lifting so you can focus on your wedding.</p>
<div class="flex items-center mb-4">
<div class="bg-mauve text-white rounded-full w-12 h-12 flex items-center justify-center mr-4">
<i class="fas fa-palette text-xl"></i>
</div>
<h3 class="font-playfair font-semibold text-xl">Endless Options</h3>
</div>
<p class="mb-6">With thousands of possible combinations, you're guaranteed to find a design that feels uniquely yours.</p>
<div class="flex items-center">
<div class="bg-mauve text-white rounded-full w-12 h-12 flex items-center justify-center mr-4">
<i class="fas fa-print text-xl"></i>
</div>
<h3 class="font-playfair font-semibold text-xl">Premium Quality</h3>
</div>
<p>We use only the finest materials and printing techniques to ensure your invitations look as beautiful in person as they do on screen.</p>
</div>
</div>
</div>
</div>
</section>
<!-- Contact Section -->
<section id="contact" class="py-16 bg-navy text-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-playfair font-bold text-center mb-12">Have Questions?</h2>
<div class="max-w-2xl mx-auto">
<form class="space-y-6">
<div>
<label for="name" class="block text-sm font-medium mb-1">Name</label>
<input type="text" id="name" class="w-full px-4 py-2 rounded-lg bg-navy border border-white border-opacity-30 focus:border-opacity-100 focus:ring-0 text-white placeholder-white placeholder-opacity-50">
</div>
<div>
<label for="email" class="block text-sm font-medium mb-1">Email</label>
<input type="email" id="email" class="w-full px-4 py-2 rounded-lg bg-navy border border-white border-opacity-30 focus:border-opacity-100 focus:ring-0 text-white placeholder-white placeholder-opacity-50">
</div>
<div>
<label for="message" class="block text-sm font-medium mb-1">Message</label>
<textarea id="message" rows="4" class="w-full px-4 py-2 rounded-lg bg-navy border border-white border-opacity-30 focus:border-opacity-100 focus:ring-0 text-white placeholder-white placeholder-opacity-50"></textarea>
</div>
<button type="submit" class="w-full bg-mauve hover:bg-blush text-white py-3 px-6 rounded-lg font-medium transition duration-300">Send Message</button>
</form>
<div class="mt-12 text-center">
<p class="mb-4">Or reach us directly:</p>
<div class="flex justify-center space-x-6">
<a href="#" class="hover:text-mauve transition"><i class="fab fa-instagram text-2xl"></i></a>
<a href="#" class="hover:text-mauve transition"><i class="fab fa-pinterest text-2xl"></i></a>
<a href="#" class="hover:text-mauve transition"><i class="fas fa-envelope text-2xl"></i></a>
<a href="#" class="hover:text-mauve transition"><i class="fas fa-phone text-2xl"></i></a>
</div>
</div>
</div>
</div>
</section>
<!-- Footer -->
<footer class="bg-white py-8 border-t border-gray-100">
<div class="container mx-auto px-4">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="flex items-center mb-4 md:mb-0">
<i class="fas fa-ring text-2xl text-mauve mr-2"></i>
<h2 class="text-xl font-playfair font-semibold">Elegant Invites</h2>
</div>
<div class="text-sm text-gray-600 mb-4 md:mb-0">
© 2023 Elegant Invites. All rights reserved.
</div>
<div class="flex space-x-4">
<a href="#" class="text-gray-600 hover:text-mauve transition">Privacy Policy</a>
<a href="#" class="text-gray-600 hover:text-mauve transition">Terms of Service</a>
</div>
</div>
</div>
</footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Color selection
const colorButtons = document.querySelectorAll('.color-btn');
const colorInput = document.getElementById('colors');
const cardPreview = document.getElementById('cardPreview');
colorButtons.forEach(button => {
button.addEventListener('click', function() {
// Remove active class from all buttons
colorButtons.forEach(btn => btn.classList.remove('active'));
// Add active class to clicked button
this.classList.add('active');
// Update hidden input value
const color = this.getAttribute('data-color');
colorInput.value = color;
// Update preview background
const bgColorClass = `bg-${color}`;
const bgElements = cardPreview.querySelectorAll('div:first-child');
bgElements.forEach(el => {
// Remove all possible color classes
el.classList.remove('bg-blush', 'bg-sage', 'bg-mauve', 'bg-navy', 'bg-champagne');
// Add the selected color class
el.classList.add(bgColorClass);
});
});
});
// Form submission and AI simulation
const form = document.getElementById('invitationForm');
const submitText = document.getElementById('submitText');
const loadingSpinner = document.getElementById('loadingSpinner');
const aiMessage = document.getElementById('aiMessage');
form.addEventListener('submit', function(e) {
e.preventDefault();
// Validate form first
if (!updatePreview()) return;
// Show loading state
submitText.textContent = 'Designing your invitation...';
loadingSpinner.classList.remove('hidden');
form.querySelectorAll('input, select, textarea').forEach(el => {
el.disabled = true;
});
// Simulate AI working with more realistic delay
setTimeout(() => {
// Generate 3 random template suggestions (1-6)
const suggestedTemplates = [];
while(suggestedTemplates.length < 3) {
const randomTemplate = Math.floor(Math.random() * 6) + 1;
if (!suggestedTemplates.includes(randomTemplate)) {
suggestedTemplates.push(randomTemplate);
}
}
// Show only suggested templates
document.querySelectorAll('.carousel-item').forEach(item => {
const templateNum = item.querySelector('.select-template').getAttribute('data-template');
item.style.display = suggestedTemplates.includes(parseInt(templateNum)) ? 'block' : 'none';
});
aiMessage.textContent = "I've created these beautiful designs based on your preferences. Which one speaks to you?";
// Show success state
submitText.textContent = 'View Designs';
loadingSpinner.classList.add('hidden');
form.querySelectorAll('input, select, textarea').forEach(el => {
el.disabled = false;
});
// Show templates carousel with smooth scroll
document.getElementById('templatesCarousel').classList.remove('hidden');
document.getElementById('templatesCarousel').scrollIntoView({ behavior: 'smooth' });
// Update template previews with form data
updateTemplatePreviews();
}, 2000 + Math.random() * 2000); // Random delay between 2-4 seconds
});
// Update preview as user types
const formInputs = form.querySelectorAll('input, textarea, select');
formInputs.forEach(input => {
input.addEventListener('input', updatePreview);
});
function updatePreview() {
// Get form values with validation
const names = document.getElementById('coupleNames').value.trim() || 'Sarah & Michael';
const dateInput = document.getElementById('weddingDate').value;
const venue = document.getElementById('venue').value.trim() || 'The Grand Ballroom, New York';
const time = document.getElementById('time').value || '16:30';
const message = document.getElementById('message').value.trim();
const theme = document.getElementById('theme').value;
const color = document.getElementById('colors').value;
// Validate date is in future
if (dateInput) {
const today = new Date();
const selectedDate = new Date(dateInput);
if (selectedDate < today) {
document.getElementById('weddingDate').classList.add('border-red-500');
aiMessage.textContent = "Please select a future date for your wedding.";
return false;
} else {
document.getElementById('weddingDate').classList.remove('border-red-500');
}
}
// Format date
let formattedDate = 'Saturday, June 10th, 2023';
if (dateInput) {
const date = new Date(dateInput);
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
formattedDate = date.toLocaleDateString('en-US', options);
}
// Format time
let formattedTime = '4:30 PM';
if (time) {
const [hours, minutes] = time.split(':');
const hourNum = parseInt(hours);
const ampm = hourNum >= 12 ? 'PM' : 'AM';
const displayHour = hourNum % 12 || 12;
formattedTime = `${displayHour}:${minutes} ${ampm}`;
}
// Update preview elements
document.getElementById('previewNames').textContent = names;
document.getElementById('previewDate').textContent = formattedDate;
document.getElementById('previewVenue').textContent = venue;
document.getElementById('previewTime').textContent = formattedTime;
// Update optional message
const previewMessage = document.getElementById('previewMessage');
if (message) {
previewMessage.textContent = message;
previewMessage.classList.remove('hidden');
} else {
previewMessage.classList.add('hidden');
}
// Update theme (simplified for demo)
const theme = document.getElementById('theme').value;
const previewDiv = cardPreview.querySelector('div:first-child');
// Reset all theme classes
previewDiv.classList.remove(
'bg-opacity-70', 'bg-opacity-80', 'bg-opacity-60', 'bg-opacity-50', 'bg-opacity-90'
);
// Apply theme-specific styles
switch(theme) {
case 'classic':
previewDiv.classList.add('bg-opacity-70');
break;
case 'modern':
previewDiv.classList.add('bg-opacity-80');
break;
case 'rustic':
previewDiv.classList.add('bg-opacity-60');
break;
case 'vintage':
previewDiv.classList.add('bg-opacity-50');
break;
case 'beach':
previewDiv.classList.add('bg-opacity-90');
break;
}
}
// Smooth scrolling for navigation
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
const targetId = this.getAttribute('href');
if (targetId === '#') return;
const targetElement = document.querySelector(targetId);
if (targetElement) {
targetElement.scrollIntoView({
behavior: 'smooth'
});
}
});
});
// Download functionality
function downloadInvitation() {
const cardPreview = document.getElementById('cardPreview');
html2canvas(cardPreview).then(canvas => {
const link = document.createElement('a');
link.download = 'wedding-invitation.png';
link.href = canvas.toDataURL('image/png');
link.click();
});
}
// Initialize with default values
updatePreview();
// Check for previously selected template
const savedTemplate = localStorage.getItem('selectedTemplate');
if (savedTemplate) {
document.getElementById('cardPreview').classList.add(`template-${savedTemplate}`);
}
// Carousel navigation
document.querySelector('.carousel-prev').addEventListener('click', () => {
document.querySelector('.carousel-inner').scrollBy({ left: -300, behavior: 'smooth' });
});
document.querySelector('.carousel-next').addEventListener('click', () => {
document.querySelector('.carousel-inner').scrollBy({ left: 300, behavior: 'smooth' });
});
// Template selection with preview update
document.querySelectorAll('.select-template').forEach(button => {
button.addEventListener('click', function() {
const templateNum = this.getAttribute('data-template');
const cardPreview = document.getElementById('cardPreview');
// Remove all template classes
cardPreview.classList.remove(
'template-1', 'template-2', 'template-3',
'template-4', 'template-5', 'template-6'
);
// Add selected template class
cardPreview.classList.add(`template-${templateNum}`);
// Update AI message
aiMessage.textContent = `Great choice! You've selected Design ${templateNum}. Ready to download or customize further?`;
// Show download button
submitText.textContent = 'Download Invitation';
document.getElementById('templatesCarousel').classList.add('hidden');
// Store selected template
localStorage.setItem('selectedTemplate', templateNum);
});
});
function updateTemplatePreviews() {
// Get form values
const names = document.getElementById('coupleNames').value || 'Sarah & Michael';
const dateInput = document.getElementById('weddingDate').value;
const venue = document.getElementById('venue').value || 'The Grand Ballroom, New York';
// Format date
let formattedDate = 'Saturday, June 10th, 2023';
if (dateInput) {
const date = new Date(dateInput);
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
formattedDate = date.toLocaleDateString('en-US', options);
}
// Update all template previews
for (let i = 1; i <= 6; i++) {
document.getElementById(`template${i}Names`).textContent = names;
document.getElementById(`template${i}Date`).textContent = formattedDate;
document.getElementById(`template${i}Venue`).textContent = venue;
}
}
});
</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=hlsitech/wedding-invite" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>