diff --git a/public/images/gallery/mix-platters.jpg b/public/images/gallery/mix-platters.jpg new file mode 100644 index 0000000..d9daca4 Binary files /dev/null and b/public/images/gallery/mix-platters.jpg differ diff --git a/src/components/CallButton/CallButton.module.css b/src/components/CallButton/CallButton.module.css index 552cf39..0e8069a 100644 --- a/src/components/CallButton/CallButton.module.css +++ b/src/components/CallButton/CallButton.module.css @@ -1,12 +1,27 @@ -.callBtn { +/* Wrapper controls positioning on screen */ +.fixedWrapper { position: fixed; - bottom: 3.5rem; /* 2rem (bottom) + 3.5rem (height) + 1rem (gap) */ + bottom: 2rem; right: 2rem; + z-index: 999; + display: flex; + flex-direction: column-reverse; + align-items: flex-end; + gap: 1rem; + pointer-events: none; + /* Allows clicking through the empty space around the buttons */ +} + +/* Ensure children are clickable */ +.fixedWrapper>* { + pointer-events: auto; +} + +.callBtn { width: 3.5rem; height: 3.5rem; border-radius: 50%; background-color: #c49c5c; - /* Gold color matching the theme */ color: #fff; border: none; cursor: pointer; @@ -14,9 +29,10 @@ align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); - z-index: 50; transition: all 0.3s ease-in-out; - text-decoration: none; /* For the anchor tag */ + text-decoration: none; + position: relative; + /* relative to wrapper */ } .callBtn:hover { @@ -28,17 +44,69 @@ width: 24px; height: 24px; stroke-width: 2.5; - fill: none; - stroke: currentColor; + fill: #fff !important; + stroke: #fff !important; stroke-linecap: round; stroke-linejoin: round; } +/* Popup Menu Styles */ +.menu { + display: flex; + flex-direction: column; + gap: 0.8rem; + align-items: flex-end; + margin-bottom: 0.5rem; +} + +.menuItem { + background-color: #fff; + color: #2d2d2d; + padding: 0.8rem 1.2rem; + border-radius: 12px; + text-decoration: none; + box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); + display: flex; + flex-direction: column; + align-items: flex-end; + min-width: 180px; + transition: transform 0.2s, background-color 0.2s; + border-right: 5px solid #c49c5c; +} + +.menuItem:hover { + background-color: #f8f8f8; + transform: translateX(-5px); +} + +.locationName { + font-size: 0.9rem; + font-weight: 700; + text-transform: uppercase; + color: #c49c5c; + letter-spacing: 0.5px; +} + +.phoneNumber { + font-size: 0.85rem; + font-weight: 500; + color: #555; + margin-top: 2px; +} + @media (max-width: 768px) { - .callBtn { - bottom: 3rem; + .fixedWrapper { + bottom: 1.5rem; right: 1.5rem; + } + + .callBtn { width: 3rem; height: 3rem; } -} + + .menuItem { + min-width: 160px; + padding: 0.6rem 1rem; + } +} \ No newline at end of file diff --git a/src/components/CallButton/CallButton.tsx b/src/components/CallButton/CallButton.tsx index 76ddfcc..b4762ae 100644 --- a/src/components/CallButton/CallButton.tsx +++ b/src/components/CallButton/CallButton.tsx @@ -1,19 +1,77 @@ +'use client' + +import { useState } from 'react' +import { usePathname } from 'next/navigation' +import { motion, AnimatePresence } from 'framer-motion' +import { FaEnvelope, FaTimes } from 'react-icons/fa' import styles from './CallButton.module.css' export default function CallButton() { + const pathname = usePathname() + const [isOpen, setIsOpen] = useState(false) + + // Check if catering page + const isCateringPage = pathname === '/catering-services-ontario' || pathname?.startsWith('/catering-services-ontario/') + + // Logic for catering page (Email Button) + if (isCateringPage) { + return ( +
+ + + +
+ ) + } + + // Logic for other pages (Dual Location Popup) + const toggleOpen = () => setIsOpen(!isOpen) + return ( - - + + {isOpen && ( + + + Kitchener + 519-581-6363 + + + Burlington + 289-313-9838 + + + )} + + + + ) } diff --git a/src/utils/constant.ts b/src/utils/constant.ts index 6cd5629..567638c 100644 --- a/src/utils/constant.ts +++ b/src/utils/constant.ts @@ -475,6 +475,7 @@ export const galleryData = [ { id: 4, src: '/images/gallery/gallery-4.webp', category: 'Interior', alt: 'Dining Area' }, { id: 5, src: '/images/gallery/gallery-5.webp', category: 'Food', alt: 'Grilled Meat' }, { id: 6, src: '/images/gallery/gallery-6.webp', category: 'Interior', alt: 'Cozy Seating' }, + { id: 7, src: '/images/gallery/mix-platters.jpg', category: 'Food', alt: 'Special Mix Platters' }, ]; export const menuData = [