mail button added for catering page
This commit is contained in:
parent
6178791bb1
commit
75e3ec6764
BIN
public/images/gallery/mix-platters.jpg
Normal file
BIN
public/images/gallery/mix-platters.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
@ -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;
|
||||
}
|
||||
}
|
||||
@ -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 (
|
||||
<div className={styles.fixedWrapper}>
|
||||
<a
|
||||
href="mailto:hello@antalyarestaurant.ca"
|
||||
className={styles.callBtn}
|
||||
aria-label="Email Antalya Restaurant"
|
||||
>
|
||||
<FaEnvelope className={styles.icon} />
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
// Logic for other pages (Dual Location Popup)
|
||||
const toggleOpen = () => setIsOpen(!isOpen)
|
||||
|
||||
return (
|
||||
<a
|
||||
href="tel:+15195816363"
|
||||
className={styles.callBtn}
|
||||
aria-label="Call Antalya Restaurant"
|
||||
>
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
className={styles.icon}
|
||||
<div className={styles.fixedWrapper}>
|
||||
<AnimatePresence>
|
||||
{isOpen && (
|
||||
<motion.div
|
||||
className={styles.menu}
|
||||
initial={{ opacity: 0, scale: 0.8, y: 10 }}
|
||||
animate={{ opacity: 1, scale: 1, y: 0 }}
|
||||
exit={{ opacity: 0, scale: 0.8, y: 10 }}
|
||||
transition={{ duration: 0.2 }}
|
||||
>
|
||||
<a href="tel:+15195816363" className={styles.menuItem}>
|
||||
<span className={styles.locationName}>Kitchener</span>
|
||||
<span className={styles.phoneNumber}>519-581-6363</span>
|
||||
</a>
|
||||
<a href="tel:+12893139838" className={styles.menuItem}>
|
||||
<span className={styles.locationName}>Burlington</span>
|
||||
<span className={styles.phoneNumber}>289-313-9838</span>
|
||||
</a>
|
||||
</motion.div>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
|
||||
<button
|
||||
className={styles.callBtn}
|
||||
onClick={toggleOpen}
|
||||
aria-label={isOpen ? "Close location menu" : "Show location numbers"}
|
||||
aria-expanded={isOpen}
|
||||
>
|
||||
<path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.05 12.05 0 0 0 .57 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.03 12.03 0 0 0 2.81.57A2 2 0 0 1 22 16.92z" />
|
||||
</svg>
|
||||
</a>
|
||||
{isOpen ? (
|
||||
<FaTimes className={styles.icon} />
|
||||
) : (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
className={styles.icon}
|
||||
>
|
||||
<path fill="currentColor" d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.05 12.05 0 0 0 .57 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.03 12.03 0 0 0 2.81.57A2 2 0 0 1 22 16.92z" />
|
||||
</svg>
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@ -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 = [
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user