-
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
6 changed files
with
153 additions
and
1 deletion.
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,56 @@ | ||
import clsx from 'clsx'; | ||
import {ReactNode} from 'react'; | ||
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport'; | ||
import ImageWrapper from '@/components/shared/ImageWrapper/ImageWrapper'; | ||
|
||
/** | ||
* BlockWithImage props. | ||
*/ | ||
type BlockWithImageProps = { | ||
text: ReactNode; | ||
imageFilename: string; | ||
imageAlt?: string; | ||
reverse?: boolean; | ||
}; | ||
|
||
const containerCn = clsx( | ||
'flex', | ||
'items-center', | ||
'justify-center', | ||
'w-full', | ||
'p-32', | ||
'text-center', | ||
'text-4xl', | ||
'leading-normal', | ||
); | ||
// eslint-disable-next-line jsdoc/require-jsdoc | ||
const imgContainerCn = (reversed?: boolean) => | ||
clsx('relative', 'h-72', 'w-72', 'basis-1/2', reversed && 'order-last'); | ||
// eslint-disable-next-line jsdoc/require-jsdoc | ||
const imgCn = clsx('object-cover'); | ||
|
||
/** | ||
* @param {BlockWithImageProps} props Props. | ||
* @returns React component. | ||
*/ | ||
export default function BlockWithImage({ | ||
imageFilename, | ||
imageAlt = '', | ||
reverse, | ||
text, | ||
}: BlockWithImageProps) { | ||
return ( | ||
<AppearInViewport className={containerCn}> | ||
<div className={imgContainerCn(reverse)}> | ||
<ImageWrapper | ||
className={imgCn} | ||
src={`/images/${imageFilename}`} | ||
blurDataURL={`images/blured/${imageFilename}`} | ||
alt={imageAlt} | ||
fill | ||
/> | ||
</div> | ||
<div>{text}</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,39 @@ | ||
import clsx from 'clsx'; | ||
import AppearInViewport from '@/components/shared/AppearInViewport/AppearInViewport'; | ||
import ImageWrapper from '@/components/shared/ImageWrapper/ImageWrapper'; | ||
|
||
const textCn = clsx('text-5xl', 'z-10', 'leading-normal'); | ||
const containerCn = clsx( | ||
'px-32', | ||
'py-48', | ||
'text-center', | ||
'relative', | ||
'w-full', | ||
'flex', | ||
'items-center', | ||
'mt-24', | ||
); | ||
const imgCn = clsx('object-cover', 'z-0'); | ||
|
||
/** | ||
* @returns React component. | ||
*/ | ||
export default function Philosophy() { | ||
return ( | ||
<AppearInViewport | ||
className={containerCn} | ||
transition={{delay: 2}} | ||
> | ||
<ImageWrapper | ||
className={imgCn} | ||
src="/images/about.0.jpg" | ||
blurDataURL="images/blured/about.0.jpg" | ||
fill | ||
/> | ||
<div className={textCn}> | ||
Our philosophy is to create a POSITIVE COMMUNITY where you develop joy, self-expression, | ||
personal growth, friendships and dance skills. | ||
</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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.