diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-13 22:52:24 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-13 22:52:24 +0100 |
| commit | e8a61bd7e49bf2a24fa1905a45e83380056a7368 (patch) | |
| tree | 52f4552b5cb90717e8caf3e674f0cfaf245ec26f /src/components | |
| parent | aec575c3b5797069e4964cfafa26e3de3b92f99e (diff) | |
chore: add footer nav
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Footer/Footer.module.scss | 8 | ||||
| -rw-r--r-- | src/components/Footer/Footer.tsx | 5 | ||||
| -rw-r--r-- | src/components/FooterNav/FooterNav.module.scss | 17 | ||||
| -rw-r--r-- | src/components/FooterNav/FooterNav.tsx | 25 |
4 files changed, 54 insertions, 1 deletions
diff --git a/src/components/Footer/Footer.module.scss b/src/components/Footer/Footer.module.scss new file mode 100644 index 0000000..496044a --- /dev/null +++ b/src/components/Footer/Footer.module.scss @@ -0,0 +1,8 @@ +.wrapper { + display: flex; + flex-flow: row wrap; + place-items: center; + place-content: center; + gap: var(--spacing-xs); + padding: var(--spacing-md) 0; +} diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx index d92fb72..12d86ce 100644 --- a/src/components/Footer/Footer.tsx +++ b/src/components/Footer/Footer.tsx @@ -1,9 +1,12 @@ import Copyright from '@components/Copyright/Copyright'; +import FooterNav from '@components/FooterNav/FooterNav'; +import styles from './Footer.module.scss'; const Footer = () => { return ( - <footer> + <footer className={styles.wrapper}> <Copyright /> + <FooterNav /> </footer> ); }; diff --git a/src/components/FooterNav/FooterNav.module.scss b/src/components/FooterNav/FooterNav.module.scss new file mode 100644 index 0000000..af72df0 --- /dev/null +++ b/src/components/FooterNav/FooterNav.module.scss @@ -0,0 +1,17 @@ +@use "@styles/abstracts/placeholders"; + +.wrapper { + font-size: var(--font-size-sm); +} + +.list { + @extend %flex-list; + gap: var(--spacing-xs); +} + +.item { + &::before { + content: "\2022"; + margin-right: var(--spacing-xs); + } +} diff --git a/src/components/FooterNav/FooterNav.tsx b/src/components/FooterNav/FooterNav.tsx new file mode 100644 index 0000000..7266e7e --- /dev/null +++ b/src/components/FooterNav/FooterNav.tsx @@ -0,0 +1,25 @@ +import Link from 'next/link'; +import styles from './FooterNav.module.scss'; +import { footerNav } from '@config/nav'; + +const FooterNav = () => { + const navItems = footerNav.map((item) => { + return ( + <li key={item.id} className={styles.item}> + <Link href={item.slug}> + <a className={styles.link}>{item.name}</a> + </Link> + </li> + ); + }); + + return ( + <div className={styles.wrapper}> + <nav className={styles.nav}> + <ul className={styles.list}>{navItems}</ul> + </nav> + </div> + ); +}; + +export default FooterNav; |
