diff --git a/.env b/.env index c8fea9d..793fa7a 100644 --- a/.env +++ b/.env @@ -11,5 +11,5 @@ TELEGRAM_ADDRESS="https://t.me/SV_Yerevan" CONTACT_EMAIL="sv.yerevan@gmail.com" CONTACT_PHONE="+374 431 085 88" -LOCATION_GOOGLE_MAPS_LINK="https://www.google.com/maps/place/SalsaViva+Social+Dance+School/@40.189783,44.5222658,17z/data=!3m1!4b1!4m6!3m5!1s0x406abda9a2d5a441:0x6a2fd39de89a2d4f!8m2!3d40.1897789!4d44.5248407!16s%2Fg%2F11rkp1t8xs?entry=ttu" +LOCATION_GOOGLE_MAPS_LINK="https://shorturl.at/gsuK5" LOCATION_ADDRESS_TEXT=" 41, 4 Abovyan St, Yerevan 0009" diff --git a/app/globals.css b/app/globals.css index b5c61c9..72c3870 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,3 +1,31 @@ @tailwind base; @tailwind components; @tailwind utilities; + +@layer utilities { + .animated-link { + position: relative; + display: inline-block; + line-height: 1; + } + + .animated-link:after { + display: block; + content: ""; + background-color: theme(colors.white); + height: 1px; + width: 0; + left: 0; + position: absolute; + -webkit-transition: width 0.3s ease-in; + transition: width 0.3s ease-in; + } + + .animated-link:hover:after { + width: 100%; + } + + .animated-link:focus:after { + width: 100%; + } +} diff --git a/app/layout.tsx b/app/layout.tsx index 7504409..2de518f 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -13,13 +13,14 @@ const bodyCn = clsx( robotoMono.variable, kumbhSans.variable, 'antialiased', - 'min-h-screen', 'font-sans', 'text-white', - '', + 'bg-alternate', + 'flex', + 'flex-col', ); -const mainCn = clsx('flex', 'fkex-col', 'items-center', 'justify-center', 'p-24'); +const mainCn = clsx('flex', 'flex-col', 'items-center', 'justify-center', 'p-24', 'min-h-screen'); /** * @param {{children}} props Props. diff --git a/components/Footer/Footer.tsx b/components/Footer/Footer.tsx index 9506cc9..8b03b14 100644 --- a/components/Footer/Footer.tsx +++ b/components/Footer/Footer.tsx @@ -1,8 +1,10 @@ import clsx from 'clsx'; import Icons from './Icons'; import Location from './Location'; +import Mail from './Mail'; +import Phone from './Phone'; -const footerCn = clsx('container', 'columns-3', 'xs:columns-1'); +const footerCn = clsx('container', 'columns-4', 'xs:columns-1', 'mt-auto', 'pb-12'); /** * @returns React component. @@ -11,6 +13,8 @@ export default function Footer() { return ( ); diff --git a/components/Footer/Icons.tsx b/components/Footer/Icons.tsx index e926a99..b55d415 100644 --- a/components/Footer/Icons.tsx +++ b/components/Footer/Icons.tsx @@ -26,13 +26,13 @@ const iconsConfig: IconConfig[] = [ }, { icon: ['fab', 'instagram'], - href: WHATSAPP_ADDRESS, + href: INSTAGRAM_ADDRESS, size: '2x', target: '_blank', }, { icon: ['fab', 'whatsapp'], - href: INSTAGRAM_ADDRESS, + href: WHATSAPP_ADDRESS, size: '2x', target: '_blank', }, diff --git a/components/Footer/Location.tsx b/components/Footer/Location.tsx index e399196..b52005c 100644 --- a/components/Footer/Location.tsx +++ b/components/Footer/Location.tsx @@ -7,6 +7,7 @@ import envConfig from '@/lib/env/envConfig'; const {LOCATION_ADDRESS_TEXT, LOCATION_GOOGLE_MAPS_LINK} = envConfig; const containerCn = clsx('flex', 'justify-center', 'flex-nowrap', 'gap-4'); +const addressCn = clsx('animated-link'); /** * @returns React component. @@ -22,7 +23,7 @@ function Location() { size="2xl" icon={['fas', 'location-dot']} /> -
{LOCATION_ADDRESS_TEXT} + {LOCATION_ADDRESS_TEXT} ); diff --git a/components/Footer/Mail.tsx b/components/Footer/Mail.tsx new file mode 100644 index 0000000..f022bc0 --- /dev/null +++ b/components/Footer/Mail.tsx @@ -0,0 +1,23 @@ +import clsx from 'clsx'; +import {memo} from 'react'; +import envConfig from '@/lib/env/envConfig'; + +const {CONTACT_EMAIL} = envConfig; + +const anchorCn = clsx('animated-link'); + +/** + * @returns React component. + */ +function Mail() { + return ( + + {CONTACT_EMAIL} + + ); +} + +export default memo(Mail); diff --git a/components/Footer/Phone.tsx b/components/Footer/Phone.tsx new file mode 100644 index 0000000..6c88f67 --- /dev/null +++ b/components/Footer/Phone.tsx @@ -0,0 +1,23 @@ +import clsx from 'clsx'; +import {memo} from 'react'; +import envConfig from '@/lib/env/envConfig'; + +const {CONTACT_PHONE} = envConfig; + +const telCn = clsx('animated-link', 'tracking-wider'); + +/** + * @returns React component. + */ +function Phone() { + return ( + + {CONTACT_PHONE} + + ); +} + +export default memo(Phone); diff --git a/components/Menu/MenuToggle.tsx b/components/Menu/MenuToggle.tsx index ef9563d..cd12a17 100644 --- a/components/Menu/MenuToggle.tsx +++ b/components/Menu/MenuToggle.tsx @@ -1,7 +1,10 @@ 'use client'; import {Variants, motion} from 'framer-motion'; -import {forwardRef} from 'react'; +import {forwardRef, useContext} from 'react'; +import {MenuContext} from './MenuContext'; +import clsx from 'clsx'; +import {twMerge} from 'tailwind-merge'; /** * Props. @@ -12,6 +15,8 @@ type MenuToggleProps = { className?: string; }; +const btnCn = clsx('absolute', 'top-16', 'right-16'); + /** * @param {MenuToggleProps} props Props. * @returns React component. @@ -20,16 +25,20 @@ const MenuToggle = forwardRef