Update src/app/page.tsx
This commit is contained in:
@@ -9,9 +9,32 @@ import ProductCardFour from '@/components/sections/product/ProductCardFour';
|
||||
import TextSplitAbout from '@/components/sections/about/TextSplitAbout';
|
||||
import TestimonialCardSix from '@/components/sections/testimonial/TestimonialCardSix';
|
||||
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
|
||||
import { Camera, Heart, Sparkles, Zap } from 'lucide-react';
|
||||
import ContactForm from '@/components/form/ContactForm';
|
||||
import { Camera, Heart, Sparkles, Zap, Mail, Share2 } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
|
||||
export default function LandingPage() {
|
||||
const [isNewsletterSubmitted, setIsNewsletterSubmitted] = useState(false);
|
||||
|
||||
const handleNewsletterSubmit = (email: string) => {
|
||||
setIsNewsletterSubmitted(true);
|
||||
setTimeout(() => setIsNewsletterSubmitted(false), 3000);
|
||||
};
|
||||
|
||||
const shareOnSocial = (platform: string) => {
|
||||
const pageUrl = typeof window !== 'undefined' ? window.location.href : 'https://odishaanimeclub.dev';
|
||||
const title = 'Spirit Bomb Initiative - Odisha Anime Club';
|
||||
const links: { [key: string]: string } = {
|
||||
twitter: `https://twitter.com/intent/tweet?url=${encodeURIComponent(pageUrl)}&text=${encodeURIComponent(title)}`,
|
||||
facebook: `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(pageUrl)}`,
|
||||
linkedin: `https://www.linkedin.com/sharing/share-offsite/?url=${encodeURIComponent(pageUrl)}`,
|
||||
whatsapp: `https://wa.me/?text=${encodeURIComponent(title + ' ' + pageUrl)}`
|
||||
};
|
||||
if (links[platform]) {
|
||||
window.open(links[platform], '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="elastic-effect"
|
||||
@@ -189,6 +212,67 @@ export default function LandingPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="newsletter" data-section="newsletter" className="transition-all duration-500 ease-out">
|
||||
<ContactForm
|
||||
title="Join the Elite Circle"
|
||||
description="Subscribe to receive exclusive tournament announcements, power-level updates, and community insider content delivered to your arena."
|
||||
tag="Newsletter"
|
||||
tagIcon={Mail}
|
||||
inputPlaceholder="Enter your power signature"
|
||||
buttonText="Ascend Now"
|
||||
termsText="By subscribing you're confirming that you agree to receive our power-boosting announcements and community updates. You can unsubscribe anytime."
|
||||
onSubmit={handleNewsletterSubmit}
|
||||
centered={true}
|
||||
className={`transform transition-all duration-700 ${isNewsletterSubmitted ? 'scale-105 opacity-100' : 'scale-100'}`}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div id="social-sharing" data-section="social-sharing" className="w-full py-16 flex items-center justify-center">
|
||||
<div className="max-w-6xl mx-auto px-4 w-full">
|
||||
<div className="flex flex-col md:flex-row items-center justify-center gap-4 md:gap-8 flex-wrap">
|
||||
<p className="text-center text-sm md:text-base font-medium opacity-70 w-full md:w-auto">Share the Spirit Bomb Initiative:</p>
|
||||
<div className="flex items-center gap-3 md:gap-4 flex-wrap justify-center">
|
||||
<button
|
||||
onClick={() => shareOnSocial('twitter')}
|
||||
className="p-2.5 md:p-3 rounded-lg hover:opacity-80 transition-opacity duration-300 flex items-center gap-2 text-sm md:text-base"
|
||||
aria-label="Share on Twitter"
|
||||
title="Share on Twitter"
|
||||
>
|
||||
<Share2 size={18} />
|
||||
<span className="hidden sm:inline">Twitter</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => shareOnSocial('facebook')}
|
||||
className="p-2.5 md:p-3 rounded-lg hover:opacity-80 transition-opacity duration-300 flex items-center gap-2 text-sm md:text-base"
|
||||
aria-label="Share on Facebook"
|
||||
title="Share on Facebook"
|
||||
>
|
||||
<Share2 size={18} />
|
||||
<span className="hidden sm:inline">Facebook</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => shareOnSocial('linkedin')}
|
||||
className="p-2.5 md:p-3 rounded-lg hover:opacity-80 transition-opacity duration-300 flex items-center gap-2 text-sm md:text-base"
|
||||
aria-label="Share on LinkedIn"
|
||||
title="Share on LinkedIn"
|
||||
>
|
||||
<Share2 size={18} />
|
||||
<span className="hidden sm:inline">LinkedIn</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => shareOnSocial('whatsapp')}
|
||||
className="p-2.5 md:p-3 rounded-lg hover:opacity-80 transition-opacity duration-300 flex items-center gap-2 text-sm md:text-base"
|
||||
aria-label="Share on WhatsApp"
|
||||
title="Share on WhatsApp"
|
||||
>
|
||||
<Share2 size={18} />
|
||||
<span className="hidden sm:inline">WhatsApp</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer" data-section="footer">
|
||||
<FooterLogoReveal
|
||||
logoText="OAC Command Center"
|
||||
|
||||
Reference in New Issue
Block a user