diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-01-10 16:15:59 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-01-10 16:21:20 +0100 |
| commit | cd1078e3a6ddb1b1598723beec4905c123ee85a6 (patch) | |
| tree | c8bf2a0ea7625880e7a6839b2ff579d1309de3e5 /src/components | |
| parent | 843d2ee67487c489095066dca1ad902deb8a4344 (diff) | |
chore: add PDF and image format to CV page
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Widget/CVPreview/CVPreview.module.scss | 6 | ||||
| -rw-r--r-- | src/components/Widget/CVPreview/CVPreview.tsx | 36 | ||||
| -rw-r--r-- | src/components/Widget/index.tsx | 10 |
3 files changed, 51 insertions, 1 deletions
diff --git a/src/components/Widget/CVPreview/CVPreview.module.scss b/src/components/Widget/CVPreview/CVPreview.module.scss new file mode 100644 index 0000000..6ddd696 --- /dev/null +++ b/src/components/Widget/CVPreview/CVPreview.module.scss @@ -0,0 +1,6 @@ +.preview { + position: relative; + width: 100%; + height: 20rem; + margin-bottom: var(--spacing-sm); +} diff --git a/src/components/Widget/CVPreview/CVPreview.tsx b/src/components/Widget/CVPreview/CVPreview.tsx new file mode 100644 index 0000000..f0bd0fe --- /dev/null +++ b/src/components/Widget/CVPreview/CVPreview.tsx @@ -0,0 +1,36 @@ +import { Trans } from '@lingui/macro'; +import Image from 'next/image'; +import Link from 'next/link'; +import styles from './CVPreview.module.scss'; + +const CVPreview = ({ + title, + imgSrc, + pdf, +}: { + title: string; + imgSrc: string; + pdf: string; +}) => { + return ( + <div> + <h2>{title}</h2> + <div className={styles.preview}> + <Image + src={imgSrc} + layout="fill" + objectFit="contain" + objectPosition="left" + alt="CV Armand Philippot" + /> + </div> + <p> + <Trans> + Download <Link href={pdf}>CV in PDF</Link> + </Trans> + </p> + </div> + ); +}; + +export default CVPreview; diff --git a/src/components/Widget/index.tsx b/src/components/Widget/index.tsx index 9df51e3..9a9aea8 100644 --- a/src/components/Widget/index.tsx +++ b/src/components/Widget/index.tsx @@ -1,7 +1,15 @@ +import CVPreview from './CVPreview/CVPreview'; import RecentPosts from './RecentPosts/RecentPosts'; import Sharing from './Sharing/Sharing'; import SocialMedia from './SocialMedia/SocialMedia'; import ThematicsList from './ThematicsList/ThematicsList'; import TopicsList from './TopicsList/TopicsList'; -export { RecentPosts, Sharing, SocialMedia, ThematicsList, TopicsList }; +export { + CVPreview, + RecentPosts, + Sharing, + SocialMedia, + ThematicsList, + TopicsList, +}; |
