-
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
44 changed files
with
492 additions
and
118 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 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,8 @@ | ||
.pswp__img { | ||
cursor: none !important; | ||
} | ||
|
||
.pswp { | ||
z-index: 1000 !important; | ||
--pswp-bg: theme("colors.alternate"); | ||
} |
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
File renamed without changes.
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 |
---|---|---|
@@ -1,22 +1,52 @@ | ||
import {Metadata} from 'next'; | ||
import clsx from 'clsx'; | ||
import TextReveal from '@/components/TextReveal/TextReveal'; | ||
import {default as TeachersComponent} from '@/components/Teachers/Teachers'; | ||
import CATLink from '@/components/CATLink/CATLink'; | ||
|
||
const pageDescription = 'Meet your inspirational guides in the world of social dance'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Teachers', | ||
openGraph: { | ||
title: 'Salsaviva - Teachers', | ||
description: 'Your inspirational guides in the world of social dance', | ||
description: pageDescription, | ||
}, | ||
}; | ||
|
||
const containerCn = clsx( | ||
'flex', | ||
'flex-col', | ||
'items-start', | ||
'justify-start', | ||
'min-h-screen', | ||
'w-full', | ||
); | ||
const titleCn = clsx('text-8xl', 'mt-24', 'ml-4'); | ||
const subTitleCn = clsx('text-4xl', 'my-4', 'w-2/3', 'ml-4'); | ||
const CATLinkCn = clsx('mt-16'); | ||
|
||
/** | ||
* @returns React component. | ||
*/ | ||
export default function Teachers() { | ||
return ( | ||
<div className="gap-8 xs:columns-3"> | ||
<div>dcdcs</div> | ||
<div>sdcsdcd</div> | ||
<div>sdcsdcsdcsdcsdc</div> | ||
<div className={containerCn}> | ||
<TextReveal | ||
text="Our team" | ||
className={titleCn} | ||
/> | ||
<TextReveal | ||
text={pageDescription} | ||
className={subTitleCn} | ||
/> | ||
<TeachersComponent /> | ||
<CATLink | ||
text="BOOK A LESSON" | ||
className={CATLinkCn} | ||
path="/contact" | ||
customTransition={{delay: 0.5}} | ||
/> | ||
</div> | ||
); | ||
} |
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,56 @@ | ||
'use client'; | ||
|
||
import clsx from 'clsx'; | ||
import {HTMLMotionProps} from 'framer-motion'; | ||
import {twMerge} from 'tailwind-merge'; | ||
import {LinkProps} from 'next/link'; | ||
import AppearInViewport from '../AppearInViewport/AppearInViewport'; | ||
import UniversalLink from '../UniversalLink/UniversalLink'; | ||
|
||
/** | ||
* Props. | ||
*/ | ||
type CATLinkProps = { | ||
text: string; | ||
path: LinkProps['href']; | ||
className?: string; | ||
customVariants?: HTMLMotionProps<'div'>['variants']; | ||
customTransition?: HTMLMotionProps<'div'>['transition']; | ||
}; | ||
|
||
const defaultTransition = {delay: 1.2}; | ||
const defaultVariants = { | ||
visible: {opacity: 1, y: 0, scale: 1}, | ||
hidden: {opacity: 0, y: '2rem', scale: 0.9}, | ||
}; | ||
|
||
const containerCn = clsx('text-2xl', 'w-full', 'text-center'); | ||
const linkCn = clsx('tracking-wider', 'animated-link'); | ||
|
||
/** | ||
* Call to action link. | ||
* @param {CATLinkProps} props Props. | ||
* @returns React component. | ||
*/ | ||
export default function CATLink({ | ||
text, | ||
className, | ||
customVariants, | ||
path, | ||
customTransition, | ||
}: CATLinkProps) { | ||
return ( | ||
<AppearInViewport | ||
transition={{...defaultTransition, ...customTransition}} | ||
className={twMerge(containerCn, className)} | ||
variants={{...defaultVariants, ...customVariants}} | ||
> | ||
<UniversalLink | ||
href={path} | ||
className={linkCn} | ||
> | ||
{text} | ||
</UniversalLink> | ||
</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
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,37 @@ | ||
import Image, {ImageProps} from 'next/image'; | ||
import {forwardRef} from 'react'; | ||
import useNetworkSpeed from '@/lib/shared/useNetworkSpeed'; | ||
|
||
/** | ||
* Props. | ||
*/ | ||
type ImageWrapperProps = Omit<ImageProps, 'alt'> & { | ||
alt?: string; | ||
}; | ||
|
||
/** | ||
* Image wrapper, that uses next/image. | ||
* Takes care of network speed and quality. Fills all avialiable space by default. | ||
* @param props Props. | ||
* @returns React component. | ||
*/ | ||
const ImageWrapper = forwardRef<HTMLImageElement, ImageWrapperProps>(function ImageWrapper( | ||
{alt = '', quality, fill = true, placeholder = 'blur', ...props}, | ||
ref, | ||
) { | ||
const [, isFast] = useNetworkSpeed(); | ||
const computedQuality = quality ?? (isFast ? 75 : 25); | ||
|
||
return ( | ||
<Image | ||
ref={ref} | ||
placeholder={placeholder} | ||
fill={fill} | ||
quality={computedQuality} | ||
alt={alt} | ||
{...props} | ||
/> | ||
); | ||
}); | ||
|
||
export default ImageWrapper; |
Oops, something went wrong.