diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-13 01:09:07 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-13 01:10:30 +0100 |
| commit | 04c19d46f76d7359d14622b8d44fbfef6bc07732 (patch) | |
| tree | 624a6fe96b4d514d41ad1f757e7e6d6ae0a67327 /src/components/Branding/Branding.tsx | |
| parent | 827e77fe3794719b9bb95d70a7e192fc5b21705c (diff) | |
chore: add Branding component
Diffstat (limited to 'src/components/Branding/Branding.tsx')
| -rw-r--r-- | src/components/Branding/Branding.tsx | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/components/Branding/Branding.tsx b/src/components/Branding/Branding.tsx new file mode 100644 index 0000000..e5565a4 --- /dev/null +++ b/src/components/Branding/Branding.tsx @@ -0,0 +1,35 @@ +import Image from 'next/image'; +import Link from 'next/link'; +import { ReactElement } from 'react'; +import { t } from '@lingui/macro'; +import photo from '@assets/images/armand-philippot.jpg'; +import { config } from '@config/website'; +import styles from './Branding.module.scss'; + +type BrandingReturn = ({ isHome }: { isHome?: boolean }) => ReactElement; + +const Branding: BrandingReturn = ({ isHome = false }) => { + return ( + <div className={styles.wrapper}> + <div className={styles.logo}> + <Image src={photo} alt={t`${config.name} picture`} layout="intrinsic" /> + </div> + {isHome ? ( + <h1 className={styles.name}> + <Link href="/"> + <a>{config.name}</a> + </Link> + </h1> + ) : ( + <p className={styles.name}> + <Link href="/"> + <a>{config.name}</a> + </Link> + </p> + )} + <p className={styles.job}>{config.baseline}</p> + </div> + ); +}; + +export default Branding; |
