Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e1992622ec | |||
| 1abcb26300 | |||
| e62382bb72 | |||
| 8ad2bd58d5 | |||
| faa91a12a2 | |||
| 8da9abff70 | |||
| b8d184da66 | |||
| 642e31e050 | |||
| 1397e96999 | |||
| afbc9d82c1 | |||
| 4d2744012d |
178
src/app/page.tsx
178
src/app/page.tsx
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
||||||
import ReactLenis from "lenis/react";
|
import ReactLenis from "lenis/react";
|
||||||
|
import { useState, useCallback } from "react";
|
||||||
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
|
import ContactSplitForm from '@/components/sections/contact/ContactSplitForm';
|
||||||
import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia';
|
import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia';
|
||||||
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
|
import FooterLogoReveal from '@/components/sections/footer/FooterLogoReveal';
|
||||||
@@ -9,8 +10,29 @@ import HeroSplitDoubleCarousel from '@/components/sections/hero/HeroSplitDoubleC
|
|||||||
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
||||||
import ProductCardTwo from '@/components/sections/product/ProductCardTwo';
|
import ProductCardTwo from '@/components/sections/product/ProductCardTwo';
|
||||||
import TextSplitAbout from '@/components/sections/about/TextSplitAbout';
|
import TextSplitAbout from '@/components/sections/about/TextSplitAbout';
|
||||||
|
import ProductCart from '@/components/ecommerce/cart/ProductCart';
|
||||||
|
|
||||||
export default function LandingPage() {
|
export default function LandingPage() {
|
||||||
|
const [cartOpen, setCartOpen] = useState(false);
|
||||||
|
const [cartItems, setCartItems] = useState<any[]>([]);
|
||||||
|
|
||||||
|
const handleAddToCart = useCallback((product: any) => {
|
||||||
|
setCartItems(prev => {
|
||||||
|
const existing = prev.find(i => i.id === product.id);
|
||||||
|
if (existing) return prev.map(i => i.id === product.id ? { ...i, quantity: i.quantity + 1 } : i);
|
||||||
|
return [...prev, { ...product, quantity: 1 }];
|
||||||
|
});
|
||||||
|
setCartOpen(true);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleRemove = useCallback((id: string) => {
|
||||||
|
setCartItems(prev => prev.filter(i => i.id !== id));
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
const handleQuantity = useCallback((id: string, qty: number) => {
|
||||||
|
setCartItems(prev => prev.map(i => i.id === id ? { ...i, quantity: qty } : i).filter(i => i.quantity > 0));
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ThemeProvider
|
<ThemeProvider
|
||||||
defaultButtonVariant="text-stagger"
|
defaultButtonVariant="text-stagger"
|
||||||
@@ -25,19 +47,24 @@ export default function LandingPage() {
|
|||||||
headingFontWeight="semibold"
|
headingFontWeight="semibold"
|
||||||
>
|
>
|
||||||
<ReactLenis root>
|
<ReactLenis root>
|
||||||
|
<ProductCart
|
||||||
|
isOpen={cartOpen}
|
||||||
|
onClose={() => setCartOpen(false)}
|
||||||
|
items={cartItems}
|
||||||
|
onRemove={handleRemove}
|
||||||
|
onQuantityChange={handleQuantity}
|
||||||
|
total={cartItems.reduce((acc, item) => acc + (parseFloat(item.price) * item.quantity), 0).toFixed(2) + '€'}
|
||||||
|
buttons={[{ text: 'Pagar', href: '/checkout' }]}
|
||||||
|
/>
|
||||||
|
|
||||||
<div id="nav" data-section="nav">
|
<div id="nav" data-section="nav">
|
||||||
<NavbarStyleFullscreen
|
<NavbarStyleFullscreen
|
||||||
navItems={[
|
navItems={[
|
||||||
{
|
{ name: "Inicio", id: "hero" },
|
||||||
name: "Inicio", id: "hero"},
|
{ name: "Sobre nosotros", id: "about" },
|
||||||
{
|
{ name: "Carta", id: "menu" },
|
||||||
name: "Sobre nosotros", id: "about"},
|
{ name: "Ayuda", id: "faq" },
|
||||||
{
|
{ name: "Contacto", id: "contact" },
|
||||||
name: "Carta", id: "menu"},
|
|
||||||
{
|
|
||||||
name: "Ayuda", id: "faq"},
|
|
||||||
{
|
|
||||||
name: "Contacto", id: "contact"},
|
|
||||||
]}
|
]}
|
||||||
brandName="Burger Centre"
|
brandName="Burger Centre"
|
||||||
/>
|
/>
|
||||||
@@ -45,66 +72,19 @@ export default function LandingPage() {
|
|||||||
|
|
||||||
<div id="hero" data-section="hero">
|
<div id="hero" data-section="hero">
|
||||||
<HeroSplitDoubleCarousel
|
<HeroSplitDoubleCarousel
|
||||||
background={{
|
background={{ variant: "radial-gradient" }}
|
||||||
variant: "radial-gradient"}}
|
|
||||||
title="Las mejores hamburguesas de Mataró"
|
title="Las mejores hamburguesas de Mataró"
|
||||||
description="Sabor auténtico, opciones para todos. Calidad premium en cada bocado."
|
description="Sabor auténtico, opciones para todos. Calidad premium en cada bocado."
|
||||||
leftCarouselItems={[
|
leftCarouselItems={[
|
||||||
{
|
{ imageSrc: "http://img.b2bpic.net/free-photo/front-view-person-near-burger-plate-holding-jar-with-butter_23-2148784521.jpg", imageAlt: "Hamburguesa gourmet 1" },
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/front-view-person-near-burger-plate-holding-jar-with-butter_23-2148784521.jpg", imageAlt: "Hamburguesa gourmet 1"},
|
{ imageSrc: "http://img.b2bpic.net/free-photo/burgers-per-two-pax-with-full-melted-cheese-black-board_114579-1934.jpg", imageAlt: "Hamburguesa gourmet 2" },
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/burgers-per-two-pax-with-full-melted-cheese-black-board_114579-1934.jpg", imageAlt: "Hamburguesa gourmet 2"},
|
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/front-view-hamburger-inside-round-plate-dark-floor_140725-11629.jpg", imageAlt: "Hamburguesa en plato"},
|
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/front-view-burger-tasty-with-vegetables-meat-inside-round-plate_140725-11602.jpg", imageAlt: "Hamburguesa con vegetales"},
|
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/front-view-burger-with-egg-table_23-2148678850.jpg", imageAlt: "Hamburguesa con huevo"},
|
|
||||||
]}
|
]}
|
||||||
rightCarouselItems={[
|
rightCarouselItems={[
|
||||||
{
|
{ imageSrc: "http://img.b2bpic.net/free-photo/front-view-burger-tasty-with-vegetables-meat-inside-round-plate_140725-11602.jpg", imageAlt: "Hamburguesa con vegetales" },
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/lamb-doner-bread-with-cucumber-pickles-fries-tomato-served-with-ketchup-mayonnaise_141793-1915.jpg", imageAlt: "Hamburguesa gourmet 3"},
|
{ imageSrc: "http://img.b2bpic.net/free-photo/front-view-burger-with-egg-table_23-2148678850.jpg", imageAlt: "Hamburguesa con huevo" },
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/vertical-shot-delicious-burger-with-chicken-onions-rocket-served-with-fried-potatoes_181624-56472.jpg", imageAlt: "Hamburguesa gourmet 4"},
|
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/front-view-beef-burger-with-salad-bacon_23-2148784490.jpg", imageAlt: "Hamburguesa con bacon"},
|
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/high-angle-close-up-black-burger-fries-wooden-board_23-2148238519.jpg", imageAlt: "Hamburguesa negra"},
|
|
||||||
{
|
|
||||||
imageSrc: "http://img.b2bpic.net/free-photo/black-cheeseburger-with-side-fries_140725-3314.jpg", imageAlt: "Hamburguesa con patatas"},
|
|
||||||
]}
|
|
||||||
buttons={[
|
|
||||||
{
|
|
||||||
text: "Ver carta", href: "#menu"},
|
|
||||||
{
|
|
||||||
text: "Pedir online", href: "#contact"},
|
|
||||||
]}
|
]}
|
||||||
|
buttons={[{ text: "Ver carta", href: "#menu" }, { text: "Pedir online", onClick: () => setCartOpen(true) }]}
|
||||||
buttonAnimation="slide-up"
|
buttonAnimation="slide-up"
|
||||||
avatars={[
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/happy-young-woman-welcoming-female-customer-restaurant_23-2147936253.jpg", alt: "Cliente satisfecho 1"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/beautiful-smiling-young-woman-raising-her-hand-while-calling-waiter_23-2147936258.jpg", alt: "Cliente satisfecho 2"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/side-view-friends-enjoying-dinner-party_52683-132612.jpg", alt: "Cliente satisfecho 3"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/guy-whirling-cheerful-lady-restaurant_23-2148016861.jpg", alt: "Cliente satisfecho 4"},
|
|
||||||
{
|
|
||||||
src: "http://img.b2bpic.net/free-photo/portrait-diverse-women-together_23-2151682134.jpg", alt: "Cliente satisfecho 5"},
|
|
||||||
]}
|
|
||||||
avatarText="Más de 500+ clientes felices"
|
|
||||||
marqueeItems={[
|
|
||||||
{
|
|
||||||
type: "text", text: "Artesanal"},
|
|
||||||
{
|
|
||||||
type: "text", text: "Vegano"},
|
|
||||||
{
|
|
||||||
type: "text", text: "Local"},
|
|
||||||
{
|
|
||||||
type: "text", text: "Premium"},
|
|
||||||
{
|
|
||||||
type: "text", text: "Mataró"},
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -113,7 +93,8 @@ export default function LandingPage() {
|
|||||||
useInvertedBackground={true}
|
useInvertedBackground={true}
|
||||||
title="Sobre Burger Centre"
|
title="Sobre Burger Centre"
|
||||||
description={[
|
description={[
|
||||||
"Burger Centre es un restaurante moderno y acogedor, ideal para desayunos, comidas y cenas, con opciones para todos los gustos incluyendo hamburguesas veganas muy populares.", "Destacamos por nuestro ambiente, con una valoración de 4,4 estrellas en reseñas."]}
|
"Burger Centre es un restaurante moderno y acogedor, ideal para desayunos, comidas y cenas, con opciones para todos los gustos incluyendo hamburguesas veganas muy populares.", "Destacamos por nuestro ambiente, con una valoración de 4,4 estrellas en reseñas."
|
||||||
|
]}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -122,29 +103,13 @@ export default function LandingPage() {
|
|||||||
animationType="slide-up"
|
animationType="slide-up"
|
||||||
textboxLayout="split"
|
textboxLayout="split"
|
||||||
gridVariant="bento-grid"
|
gridVariant="bento-grid"
|
||||||
useInvertedBackground={false}
|
|
||||||
products={[
|
products={[
|
||||||
{
|
{ id: "p1", brand: "Smash", name: "Smash Classic", price: "12€", rating: 5, reviewCount: "120", imageSrc: "http://img.b2bpic.net/free-photo/pink-hamburger-woman-holding-burger-with-tomato-lettuce-leaf-beef-patty-sauce-burger-buns_140725-10986.jpg?_wi=1", onProductClick: () => handleAddToCart({ id: "p1", name: "Smash Classic", price: "12", imageSrc: "http://img.b2bpic.net/free-photo/pink-hamburger-woman-holding-burger-with-tomato-lettuce-leaf-beef-patty-sauce-burger-buns_140725-10986.jpg?_wi=2" }) },
|
||||||
id: "p1", brand: "Smash", name: "Smash Classic", price: "12€", rating: 5,
|
{ id: "p2", brand: "Vegana", name: "Vegan Deluxe", price: "14€", rating: 5, reviewCount: "90", imageSrc: "http://img.b2bpic.net/free-photo/front-view-male-holding-tray-with-burger-fries_23-2148678809.jpg?_wi=1", onProductClick: () => handleAddToCart({ id: "p2", name: "Vegan Deluxe", price: "14", imageSrc: "http://img.b2bpic.net/free-photo/front-view-male-holding-tray-with-burger-fries_23-2148678809.jpg?_wi=2" }) },
|
||||||
reviewCount: "120", imageSrc: "http://img.b2bpic.net/free-photo/pink-hamburger-woman-holding-burger-with-tomato-lettuce-leaf-beef-patty-sauce-burger-buns_140725-10986.jpg"},
|
|
||||||
{
|
|
||||||
id: "p2", brand: "Vegana", name: "Vegan Deluxe ⭐", price: "14€", rating: 5,
|
|
||||||
reviewCount: "90", imageSrc: "http://img.b2bpic.net/free-photo/front-view-male-holding-tray-with-burger-fries_23-2148678809.jpg"},
|
|
||||||
{
|
|
||||||
id: "p3", brand: "Pollo", name: "Crispy Chicken", price: "11€", rating: 4,
|
|
||||||
reviewCount: "75", imageSrc: "http://img.b2bpic.net/free-photo/closeup-shot-sandwich-french-fries-table_181624-61641.jpg"},
|
|
||||||
{
|
|
||||||
id: "p4", brand: "Picante", name: "Spicy Inferno", price: "13€", rating: 4,
|
|
||||||
reviewCount: "50", imageSrc: "http://img.b2bpic.net/free-photo/close-up-burger-with-egg_23-2148678846.jpg"},
|
|
||||||
{
|
|
||||||
id: "p5", brand: "Clásico", name: "Cheese Burger", price: "10€", rating: 4,
|
|
||||||
reviewCount: "200", imageSrc: "http://img.b2bpic.net/free-photo/hamburger-with-egg-benedict-energy-drinks-can_114579-2137.jpg"},
|
|
||||||
{
|
|
||||||
id: "p6", brand: "Postre", name: "Brownie Chocolate", price: "6€", rating: 5,
|
|
||||||
reviewCount: "80", imageSrc: "http://img.b2bpic.net/free-photo/front-view-cheeseburger-fries-with-copy-space_23-2148678815.jpg"},
|
|
||||||
]}
|
]}
|
||||||
title="Nuestra Carta"
|
title="Nuestra Carta"
|
||||||
description="Descubre nuestra selección de hamburguesas, clásicos y opciones veganas."
|
description="Descubre nuestra selección de hamburguesas. Si experimentas interrupciones, refresca la página para cargar el contenido completo."
|
||||||
|
useInvertedBackground={false}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -153,59 +118,32 @@ export default function LandingPage() {
|
|||||||
textboxLayout="split"
|
textboxLayout="split"
|
||||||
useInvertedBackground={true}
|
useInvertedBackground={true}
|
||||||
faqs={[
|
faqs={[
|
||||||
{
|
{ id: "f1", title: "¿Cómo pedir online?", content: "Usa el botón de pedir online en la parte superior." },
|
||||||
id: "f1", title: "¿Cómo pedir online?", content: "Para pedir online, por favor contacta directamente a través de nuestro formulario o llámanos al teléfono que aparece al final de la página."},
|
|
||||||
{
|
|
||||||
id: "f2", title: "¿Se puede reservar?", content: "Sí, recomendamos reservar para cenar, especialmente fines de semana."},
|
|
||||||
{
|
|
||||||
id: "f3", title: "¿Tienen opciones veganas?", content: "Sí, contamos con hamburguesas veganas muy populares."},
|
|
||||||
{
|
|
||||||
id: "f4", title: "¿Tiempo de entrega?", content: "El tiempo estimado es de 35 a 55 minutos."},
|
|
||||||
]}
|
]}
|
||||||
imageSrc="http://img.b2bpic.net/free-photo/chef-cooking-kitchen-while-wearing-professional-attire_23-2151208271.jpg"
|
|
||||||
mediaAnimation="slide-up"
|
mediaAnimation="slide-up"
|
||||||
title="Preguntas frecuentes"
|
title="Preguntas frecuentes"
|
||||||
description="Resolvemos tus dudas sobre nuestro servicio y local."
|
description="Resolvemos tus dudas."
|
||||||
faqsAnimation="blur-reveal"
|
faqsAnimation="blur-reveal"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="contact" data-section="contact">
|
<div id="contact" data-section="contact">
|
||||||
<ContactSplitForm
|
<ContactSplitForm
|
||||||
useInvertedBackground={false}
|
title="Haz tu reserva"
|
||||||
title="Haz tu reserva o pedido"
|
description="Plaça de Cuba, 7, Mataró."
|
||||||
description="Plaça de Cuba, 7, Mataró. Tel: 930 27 58 89. O bien rellena este formulario para gestionar tu pedido."
|
inputs={[{ name: "name", type: "text", placeholder: "Tu nombre" }, { name: "phone", type: "tel", placeholder: "Tu teléfono" }]}
|
||||||
inputs={[
|
useInvertedBackground={true}
|
||||||
{
|
|
||||||
name: "name", type: "text", placeholder: "Tu nombre", required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "phone", type: "tel", placeholder: "Tu teléfono", required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "guests", type: "number", placeholder: "Nº de personas (o pedidos)", required: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "date", type: "datetime-local", placeholder: "Fecha y hora", required: true,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
textarea={{
|
|
||||||
name: "message", placeholder: "Detalles del pedido o petición especial...", rows: 3,
|
|
||||||
}}
|
|
||||||
imageSrc="http://img.b2bpic.net/free-photo/low-angle-bistro-exterior-architecture_23-2149356830.jpg"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer" data-section="footer">
|
<div id="footer" data-section="footer">
|
||||||
<FooterLogoReveal
|
<FooterLogoReveal
|
||||||
logoText="Burger Centre"
|
logoText="Burger Centre"
|
||||||
leftLink={{
|
leftLink={{ text: "Aviso legal", href: "#" }}
|
||||||
text: "Aviso legal", href: "#"}}
|
rightLink={{ text: "Pedir ahora", onClick: () => setCartOpen(true) }}
|
||||||
rightLink={{
|
|
||||||
text: "Pedir ahora", href: "#contact"}}
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</ReactLenis>
|
</ReactLenis>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user