Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8fbbe5d9e7 | |||
| 75692bcf84 | |||
| e362810408 | |||
| 7506adb63b | |||
| 13fbcdc779 |
112
src/app/page.tsx
112
src/app/page.tsx
@@ -10,9 +10,35 @@ import TestimonialCardFifteen from '@/components/sections/testimonial/Testimonia
|
||||
import FaqBase from '@/components/sections/faq/FaqBase';
|
||||
import ContactCenter from '@/components/sections/contact/ContactCenter';
|
||||
import FooterBase from '@/components/sections/footer/FooterBase';
|
||||
import { Calendar, Zap, Lightbulb, Home, Sun, TrendingUp, HelpCircle, Mail } from 'lucide-react';
|
||||
import { Calendar, Zap, Lightbulb, Home, Sun, TrendingUp, HelpCircle, Mail, MessageCircle } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
import Input from '@/components/form/Input';
|
||||
|
||||
export default function LandingPage() {
|
||||
const [billValue, setBillValue] = useState('');
|
||||
const [showCalculator, setShowCalculator] = useState(false);
|
||||
|
||||
const calculateSavings = () => {
|
||||
const monthlyBill = parseFloat(billValue);
|
||||
if (isNaN(monthlyBill) || monthlyBill <= 0) {
|
||||
return null;
|
||||
}
|
||||
// Estimate 70% savings with Eletrotech solar panels
|
||||
const monthlySavings = monthlyBill * 0.70;
|
||||
const yearlySavings = monthlySavings * 12;
|
||||
return {
|
||||
monthly: monthlySavings.toFixed(2),
|
||||
yearly: yearlySavings.toFixed(2)
|
||||
};
|
||||
};
|
||||
|
||||
const savings = calculateSavings();
|
||||
|
||||
const handleWhatsAppClick = () => {
|
||||
const message = encodeURIComponent('Olá! Gostaria de saber mais sobre energia solar fotovoltaica.');
|
||||
window.open(`https://wa.me/5515988033907?text=${message}`, '_blank');
|
||||
};
|
||||
|
||||
return (
|
||||
<ThemeProvider
|
||||
defaultButtonVariant="icon-arrow"
|
||||
@@ -53,7 +79,7 @@ export default function LandingPage() {
|
||||
{ src: "https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AleAYJVuZaVjviN7tEK4F5SJ6k/professional-headshot-of-another-satisfi-1773171517163-b04595bc.png", alt: "Cliente Eletrosolartec" }
|
||||
]}
|
||||
buttons={[
|
||||
{ text: "Gerar Orçamento Grátis", href: "contact" },
|
||||
{ text: "Simule A sua Economia Grátis", onClick: () => setShowCalculator(true) },
|
||||
{ text: "Saiba Mais", href: "about" }
|
||||
]}
|
||||
imageSrc="https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3AleAYJVuZaVjviN7tEK4F5SJ6k/modern-solar-photovoltaic-panels-install-1773171517232-83f497e5.png"
|
||||
@@ -67,6 +93,84 @@ export default function LandingPage() {
|
||||
/>
|
||||
</div>
|
||||
|
||||
{showCalculator && (
|
||||
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4">
|
||||
<div id="calculator" data-section="calculator" className="bg-card rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto shadow-lg">
|
||||
<div className="p-8">
|
||||
<div className="text-center mb-8">
|
||||
<h2 className="text-3xl font-bold mb-4">Calculadora de Economia Solar</h2>
|
||||
<p className="text-foreground opacity-75">Digite sua conta de energia atual e veja quanto você pode economizar com painéis solares Eletrotech</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<label className="block text-sm font-medium mb-2">Sua Conta de Energia Mensal (R$)</label>
|
||||
<Input
|
||||
value={billValue}
|
||||
onChange={setBillValue}
|
||||
type="number"
|
||||
placeholder="Ex: 250.00"
|
||||
required
|
||||
/>
|
||||
</div>
|
||||
|
||||
{savings && (
|
||||
<div className="bg-background rounded-lg p-6 border border-accent">
|
||||
<h3 className="text-xl font-semibold mb-4">Sua Economia Estimada com Eletrotech</h3>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="text-center p-4 bg-card rounded-lg">
|
||||
<p className="text-sm text-foreground opacity-75 mb-2">Economia Mensal</p>
|
||||
<p className="text-2xl font-bold text-primary-cta">R$ {savings.monthly}</p>
|
||||
</div>
|
||||
<div className="text-center p-4 bg-card rounded-lg">
|
||||
<p className="text-sm text-foreground opacity-75 mb-2">Economia Anual</p>
|
||||
<p className="text-2xl font-bold text-primary-cta">R$ {savings.yearly}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="text-xs text-foreground opacity-60 mt-4 text-center">
|
||||
*Estimativa baseada em 70% de redução com sistemas solares Eletrotech. Consulte nossos especialistas para análise personalizada.
|
||||
</p>
|
||||
<div className="mt-6 flex gap-3">
|
||||
<button
|
||||
onClick={handleWhatsAppClick}
|
||||
className="flex-1 py-3 px-4 bg-primary-cta text-primary-cta-text rounded-lg font-medium hover:opacity-90 transition-opacity flex items-center justify-center gap-2"
|
||||
>
|
||||
<MessageCircle size={18} />
|
||||
Contato WhatsApp
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setShowCalculator(false)}
|
||||
className="flex-1 py-3 px-4 bg-secondary-cta text-secondary-cta-text rounded-lg font-medium hover:opacity-90 transition-opacity border border-accent"
|
||||
>
|
||||
Fechar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{!savings && billValue && (
|
||||
<button
|
||||
onClick={() => setShowCalculator(false)}
|
||||
className="w-full py-3 px-4 bg-secondary-cta text-secondary-cta-text rounded-lg font-medium hover:opacity-90 transition-opacity border border-accent"
|
||||
>
|
||||
Fechar Calculadora
|
||||
</button>
|
||||
)}
|
||||
|
||||
{!savings && !billValue && (
|
||||
<button
|
||||
onClick={() => setShowCalculator(false)}
|
||||
className="w-full py-3 px-4 bg-secondary-cta text-secondary-cta-text rounded-lg font-medium hover:opacity-90 transition-opacity border border-accent"
|
||||
>
|
||||
Fechar Calculadora
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div id="about" data-section="about">
|
||||
<TextSplitAbout
|
||||
title="Sobre EletroTech"
|
||||
@@ -191,7 +295,7 @@ export default function LandingPage() {
|
||||
<ContactCenter
|
||||
tag="Vamos Conversar"
|
||||
title="Solicite seu Orçamento"
|
||||
description="Entre em contato conosco para avaliar sua propriedade e receber uma proposta personalizada de energia solar. Nossa equipe está pronta para responder suas dúvidas."
|
||||
description="Entre em contato conosco para avaliar sua propriedade e receber uma proposta personalizada de energia solar. Nossa equipe está pronta para responder suas dúvidas. WhatsApp: (15) 98803-3907"
|
||||
tagIcon={Mail}
|
||||
background={{ variant: "rotated-rays-animated" }}
|
||||
useInvertedBackground={false}
|
||||
@@ -226,7 +330,7 @@ export default function LandingPage() {
|
||||
title: "Legal", items: [
|
||||
{ label: "Política de Privacidade", href: "#" },
|
||||
{ label: "Termos de Serviço", href: "#" },
|
||||
{ label: "Telefone", href: "#" },
|
||||
{ label: "(15) 98803-3907", href: "https://wa.me/5515988033907" },
|
||||
{ label: "Sorocaba, SP", href: "#" }
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user