-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
1,708 additions
and
521 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,3 +33,6 @@ yarn-error.log* | |
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# IDE | ||
/.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"recommendations": ["esbenp.prettier-vscode"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
'use client'; | ||
|
||
import {Variants, m} from 'framer-motion'; | ||
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport'; | ||
import config from './config'; | ||
|
||
const variants: Variants = { | ||
visible: { | ||
x: 0, | ||
opacity: 1, | ||
transition: { | ||
y: {stiffness: 1000, velocity: -100}, | ||
}, | ||
}, | ||
hidden: { | ||
x: 50, | ||
opacity: 0, | ||
transition: { | ||
y: {stiffness: 1000}, | ||
}, | ||
}, | ||
}; | ||
|
||
/** | ||
* @returns React component. | ||
*/ | ||
export default function WhyJoinBlock() { | ||
const containerCn = | ||
'w-full flex flex-col items-center justify-center border-t-8 border-white border-dashed'; | ||
const titleCn = 'w-full text-8xl mt-24 text-accent2 text-right justify-end mr-32 mb-32'; | ||
const gridCn = 'grid grid-cols-3 w-full gap-4'; | ||
|
||
return ( | ||
<AppearInViewport | ||
className={containerCn} | ||
transition={{staggerChildren: 0.2, delayChildren: 0.75, delay: 0.5}} | ||
> | ||
<h2 className={titleCn}>Why join Salsaviva?</h2> | ||
<div className={gridCn}> | ||
{config.map((Item, index) => ( | ||
<m.div | ||
key={index} | ||
variants={variants} | ||
> | ||
<Item /> | ||
</m.div> | ||
))} | ||
</div> | ||
</AppearInViewport> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
const higlightedCn = 'text-accent3 font-bold'; | ||
|
||
const config = [ | ||
() => ( | ||
<div> | ||
<span className={higlightedCn}>Friendly </span>atmosphere | ||
</div> | ||
), | ||
() => ( | ||
<div> | ||
<span className={higlightedCn}>International </span>level teaching | ||
</div> | ||
), | ||
() => ( | ||
<div> | ||
<span className={higlightedCn}>Structured </span>and fun group lessons | ||
</div> | ||
), | ||
() => ( | ||
<div> | ||
<span className={higlightedCn}>Detailed </span>and personalized private lessons | ||
</div> | ||
), | ||
() => ( | ||
<div> | ||
<span className={higlightedCn}>Quality </span>Practice nights | ||
</div> | ||
), | ||
() => ( | ||
<div> | ||
Community <span className={higlightedCn}>Parties & Events</span> | ||
</div> | ||
), | ||
() => ( | ||
<div> | ||
Well <span className={higlightedCn}>established </span>school since 2016 | ||
</div> | ||
), | ||
] as const; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {useEffect, useRef} from 'react'; | ||
|
||
/** | ||
* This hook is used to preserve the active element when the menu is opened. | ||
* @param isOpen - Whether the menu is open or not. | ||
*/ | ||
export const usePreserveActiveElement = (isOpen: boolean) => { | ||
const activeElementRef = useRef<HTMLElement | null>(null); | ||
|
||
useEffect(() => { | ||
if (isOpen) { | ||
const activeElement = document.activeElement; | ||
|
||
if (activeElement instanceof HTMLElement) { | ||
activeElementRef.current = activeElement; | ||
} | ||
} else if (activeElementRef.current) { | ||
activeElementRef.current.focus(); | ||
activeElementRef.current = null; | ||
} | ||
}, [isOpen]); | ||
}; |
Oops, something went wrong.