aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-13 01:09:07 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-13 01:10:30 +0100
commit04c19d46f76d7359d14622b8d44fbfef6bc07732 (patch)
tree624a6fe96b4d514d41ad1f757e7e6d6ae0a67327 /src
parent827e77fe3794719b9bb95d70a7e192fc5b21705c (diff)
chore: add Branding component
Diffstat (limited to 'src')
-rw-r--r--src/assets/images/armand-philippot.jpgbin0 -> 28584 bytes
-rw-r--r--src/components/Branding/Branding.module.scss52
-rw-r--r--src/components/Branding/Branding.tsx35
-rw-r--r--src/config/website.ts6
4 files changed, 93 insertions, 0 deletions
diff --git a/src/assets/images/armand-philippot.jpg b/src/assets/images/armand-philippot.jpg
new file mode 100644
index 0000000..2c8ef50
--- /dev/null
+++ b/src/assets/images/armand-philippot.jpg
Binary files differ
diff --git a/src/components/Branding/Branding.module.scss b/src/components/Branding/Branding.module.scss
new file mode 100644
index 0000000..ca1ba17
--- /dev/null
+++ b/src/components/Branding/Branding.module.scss
@@ -0,0 +1,52 @@
+@use "@styles/abstracts/functions" as fun;
+@use "@styles/abstracts/mixins" as mix;
+
+.wrapper {
+ display: grid;
+ grid-template-columns:
+ clamp(#{fun.convert-px(55)}, 15vw, #{fun.convert-px(90)})
+ minmax(0, 1fr);
+ grid-template-rows: repeat(2, max-content);
+ align-items: center;
+ column-gap: var(--spacing-md);
+ padding: var(--spacing-sm) 0;
+ text-shadow: fun.convert-px(2) fun.convert-px(2) 0 var(--color-fg-inverted);
+}
+
+.logo {
+ grid-column: 1;
+ grid-row: 1 / -1;
+ display: flex;
+ place-content: center;
+ border: fun.convert-px(1) solid var(--color-border);
+ border-radius: 50%;
+ box-shadow: 0 0 0 fun.convert-px(4) var(--color-bg),
+ 0 0 fun.convert-px(3) fun.convert-px(5) var(--color-shadow);
+
+ img {
+ border-radius: 50%;
+ }
+}
+
+.name {
+ grid-column: 2;
+ grid-row: 1;
+ margin: 0;
+ font-family: var(--font-family-secondary);
+ font-size: var(--font-size-xl);
+ font-weight: 500;
+
+ @include mix.media("screen") {
+ @include mix.dimensions("xs") {
+ font-size: var(--font-size-2xl);
+ }
+ }
+}
+
+.job {
+ grid-column: 2;
+ grid-row: 2;
+ margin: 0;
+ font-family: var(--font-family-secondary);
+ font-size: var(--font-size-lg);
+}
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;
diff --git a/src/config/website.ts b/src/config/website.ts
new file mode 100644
index 0000000..6122635
--- /dev/null
+++ b/src/config/website.ts
@@ -0,0 +1,6 @@
+import { t } from '@lingui/macro';
+
+export const config = {
+ name: 'Armand Philippot',
+ baseline: t`Front-end developer`,
+};