diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index dc434c1..ecd46b3 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -28,7 +28,8 @@ export default function Layout({ children, location }) { const isHomepage = location.pathname === '/' || location.pathname === '/offline-plugin-app-shell-fallback/' - const isResume = location.pathname === '/resume' + const isResume = + location.pathname === '/resume' || location.pathname === '/resume/' return ( <> @@ -41,7 +42,7 @@ export default function Layout({ children, location }) { delay={timeout} delayChildren={timeout} > -
+
{children}
diff --git a/src/components/organisms/Header.jsx b/src/components/organisms/Header.jsx index 021ed69..f41bf77 100644 --- a/src/components/organisms/Header.jsx +++ b/src/components/organisms/Header.jsx @@ -9,18 +9,18 @@ import { useMeta } from '../../hooks/use-meta' Header.propTypes = { minimal: PropTypes.bool, - isResume: PropTypes.bool + hide: PropTypes.bool } -export default function Header({ minimal, isResume }) { +export default function Header({ minimal, hide }) { const { availability } = useMeta() return (
- {!isResume && ( + {!hide && ( <> - + diff --git a/src/pages/resume/Header.jsx b/src/pages/resume/Header.jsx new file mode 100644 index 0000000..6a4add2 --- /dev/null +++ b/src/pages/resume/Header.jsx @@ -0,0 +1,48 @@ +import React from 'react' +import shortid from 'shortid' +import { useResume } from '../../hooks/use-resume' +import Icon from '../../components/atoms/Icon' +import styles from './Header.module.scss' + +export default function Header() { + const { basics, languages } = useResume() + const { name, label, email, website, location } = basics + + return ( + <> +
+

Résumé

+

{name}

+

{label}

+
+ +
+
    +
  • + + + Portfolio + +
  • +
  • + + Email +
  • +
  • + + {location.city}, {location.countryCode} +
  • +
  • + + {languages.map(item => ( +

    + {item.language} + {item.fluency} +

    + ))} +
  • +
+
+ + ) +} diff --git a/src/pages/resume/Header.module.scss b/src/pages/resume/Header.module.scss new file mode 100644 index 0000000..6da5569 --- /dev/null +++ b/src/pages/resume/Header.module.scss @@ -0,0 +1,69 @@ +@import 'variables'; + +.title { + font-size: $font-size-h2; + margin-bottom: $spacer / 4; + + @media print { + margin-bottom: 0; + } +} + +.label { + font-size: $font-size-h3; + color: $brand-grey-light; + margin-bottom: 0; + + :global(.dark) & { + color: $brand-grey-dimmed; + } +} + +.contact { + list-style: none; + padding: 0; + + li, + p { + margin-bottom: $spacer / 4; + } + + svg { + stroke: $brand-grey-light; + margin-right: $spacer / 4; + margin-bottom: -0.1rem; + + :global(.dark) & { + stroke: $brand-grey; + } + } + + @media (min-width: $screen-md) { + margin-top: $spacer * 2.25; + } +} + +.languages { + svg { + display: inline-block; + } + + p { + margin-left: $spacer / 1.1; + + &:first-of-type { + margin-left: 0; + display: inline-block; + } + } + + span { + font-size: $font-size-small; + margin-left: $spacer / 4; + color: $brand-grey-light; + + :global(.dark) & { + color: $brand-grey; + } + } +} diff --git a/src/pages/resume/index.jsx b/src/pages/resume/index.jsx index 68b6234..86f1ec6 100644 --- a/src/pages/resume/index.jsx +++ b/src/pages/resume/index.jsx @@ -4,50 +4,18 @@ import SEO from '../../components/atoms/SEO' import Icon from '../../components/atoms/Icon' import { useResume } from '../../hooks/use-resume' import styles from './index.module.scss' +import Header from './Header' import ResumeItem from './ResumeItem' export default function Resume() { - const { basics, education, languages, work, awards } = useResume() - const { name, label, email, website, location } = basics + const { education, work, awards } = useResume() return ( <>
-
-

Résumé

-

{name}

-

{label}

-
- -
-
    -
  • - - - Portfolio - -
  • -
  • - - Email -
  • -
  • - - {location.city}, {location.countryCode} -
  • -
  • - - {languages.map(item => ( -

    - {item.language} - {item.fluency} -

    - ))} -
  • -
-
+

diff --git a/src/pages/resume/index.module.scss b/src/pages/resume/index.module.scss index ead0a29..e3f46d9 100644 --- a/src/pages/resume/index.module.scss +++ b/src/pages/resume/index.module.scss @@ -14,45 +14,6 @@ } } -.title { - font-size: $font-size-h2; - margin-bottom: $spacer / 4; -} - -.label { - font-size: $font-size-h3; - color: $brand-grey-light; - margin-bottom: 0; - - :global(.dark) & { - color: $brand-grey-dimmed; - } -} - -.contact { - list-style: none; - padding: 0; - - li, - p { - margin-bottom: $spacer / 4; - } - - svg { - stroke: $brand-grey-light; - margin-right: $spacer / 4; - margin-bottom: -0.1rem; - - :global(.dark) & { - stroke: $brand-grey; - } - } - - @media (min-width: $screen-md) { - margin-top: $spacer * 2.25; - } -} - .subTitle { font-size: $font-size-h3; margin-bottom: 0; @@ -66,31 +27,6 @@ } } -.languages { - svg { - display: inline-block; - } - - p { - margin-left: $spacer / 1.1; - - &:first-of-type { - margin-left: 0; - display: inline-block; - } - } - - span { - font-size: $font-size-small; - margin-left: $spacer / 4; - color: $brand-grey-light; - - :global(.dark) & { - color: $brand-grey; - } - } -} - @media print { :global(html) { font-size: 8pt; @@ -105,10 +41,6 @@ color: silver; } - .title { - margin-bottom: 0; - } - .resume { grid-template-columns: 1fr; }