Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bb1fda42d | |||
| 1ad6b12f2c | |||
| 004872b32b | |||
| f659f4ca8d | |||
| 000e164313 | |||
| e7c9e30c90 | |||
| 5863aa6965 | |||
| 1238c9c4ce | |||
| 23c9592c89 |
@@ -1,11 +1,12 @@
|
||||
import type { Metadata } from "next";
|
||||
import { Inter } from "next/font/google";
|
||||
import "./globals.css";
|
||||
|
||||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" });
|
||||
const inter = Inter({
|
||||
variable: "--font-inter", subsets: ["latin"],
|
||||
});
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Cerramientos Walter - Ventanas de Aluminio y Cerramientos a Medida", description: "Especialistas en ventanas de aluminio, cerramientos, rejas, mosquiteros y soluciones a medida. Trabajos prolijos con materiales de calidad."};
|
||||
title: "Cerramientos Walter", description: "Especialistas en ventanas de aluminio, cerramientos, rejas y soluciones a medida"};
|
||||
|
||||
export default function RootLayout({
|
||||
children,
|
||||
@@ -14,7 +15,7 @@ export default function RootLayout({
|
||||
}) {
|
||||
return (
|
||||
<html lang="es">
|
||||
<body className={`${inter.variable} antialiased`}>
|
||||
<body className={inter.variable}>
|
||||
{children}
|
||||
|
||||
<script
|
||||
|
||||
@@ -11,7 +11,7 @@ import TestimonialCardTen from "@/components/sections/testimonial/TestimonialCar
|
||||
import ProductCardOne from "@/components/sections/product/ProductCardOne";
|
||||
import ContactSplit from "@/components/sections/contact/ContactSplit";
|
||||
import FooterBaseCard from "@/components/sections/footer/FooterBaseCard";
|
||||
import { Sparkles, CheckCircle, Shield, Wind, Wrench, Hammer } from "lucide-react";
|
||||
import { Sparkles, CheckCircle, Shield, Wind, Wrench, Hammer, MessageCircle } from "lucide-react";
|
||||
|
||||
export default function HomePage() {
|
||||
const navItems = [
|
||||
@@ -245,6 +245,17 @@ export default function HomePage() {
|
||||
copyrightText="© 2025 Cerramientos Walter. Todos los derechos reservados. Buenos Aires, Argentina."
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* WhatsApp Floating Button */}
|
||||
<a
|
||||
href="https://api.whatsapp.com/send?phone=5491139493469&text=Hola%20quiero%20consultar%20por%20un%20presupuesto"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="fixed bottom-6 right-6 z-50 flex items-center justify-center w-14 h-14 bg-green-500 hover:bg-green-600 text-white rounded-full shadow-lg transition-all duration-300 hover:scale-110"
|
||||
aria-label="Contactar por WhatsApp"
|
||||
>
|
||||
<MessageCircle size={24} />
|
||||
</a>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
39
src/components/whatsapp/WhatsAppButton.tsx
Normal file
39
src/components/whatsapp/WhatsAppButton.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
"use client";
|
||||
|
||||
import { MessageCircle } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
interface WhatsAppButtonProps {
|
||||
phoneNumber: string;
|
||||
message: string;
|
||||
}
|
||||
|
||||
export default function WhatsAppButton({
|
||||
phoneNumber,
|
||||
message,
|
||||
}: WhatsAppButtonProps) {
|
||||
const [isVisible, setIsVisible] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
setIsVisible(true);
|
||||
}, []);
|
||||
|
||||
const handleClick = () => {
|
||||
const encodedMessage = encodeURIComponent(message);
|
||||
const whatsappUrl = `https://wa.me/${phoneNumber}?text=${encodedMessage}`;
|
||||
window.open(whatsappUrl, "_blank");
|
||||
};
|
||||
|
||||
if (!isVisible) return null;
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={handleClick}
|
||||
aria-label="Contact us on WhatsApp"
|
||||
className="fixed bottom-8 right-8 z-50 flex items-center justify-center w-14 h-14 rounded-full bg-green-500 hover:bg-green-600 shadow-lg transition-all duration-300 hover:scale-110 active:scale-95"
|
||||
title="Chat on WhatsApp"
|
||||
>
|
||||
<MessageCircle className="w-6 h-6 text-white" strokeWidth={2} />
|
||||
</button>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user