Skip to content

Commit

Permalink
Add separate CV for print
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Plesnik committed Nov 27, 2024
1 parent 4c8818b commit 2439c6a
Show file tree
Hide file tree
Showing 6 changed files with 163 additions and 119 deletions.
2 changes: 1 addition & 1 deletion src/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HTMLAttributes } from 'react'

const Heading = ({ size = 1, className, children }: TitleProps) => {
if (size === 1) {
return <h1 className={clsx(className, 'text-3xl font-semibold print:text-4xl')}>{children}</h1>
return <h1 className={clsx(className, 'text-3xl font-semibold')}>{children}</h1>
} else if (size === 2) {
return <h2 className={clsx(className, 'text-2xl font-semibold')}>{children}</h2>
} else if (size === 3) {
Expand Down
29 changes: 22 additions & 7 deletions src/components/TimelineItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,47 @@ const TimelineItem = ({
className,
em,
right,
print,
}: {
year: number | string
desc: string
className?: string
em?: boolean
right?: boolean
print?: boolean
}) => {
return (
<div
className={clsx(
'relative z-10 flex flex-col items-baseline gap-1 py-3 sm:flex-row sm:gap-4 print:py-1',
'relative z-10 flex flex-col items-baseline gap-1 sm:flex-row sm:gap-4',
className,
right && 'justify-between print:hidden'
right && 'justify-between',
right && print && 'hidden',
print ? 'py-1' : 'py-3'
)}
>
<div className="absolute top-[1.65rem] z-0 h-px w-full bg-current opacity-50 print:hidden"></div>
<div className="relative z-10 w-full shrink-0 font-semibold sm:w-40 md:w-52 print:w-28">
<span className="inline-block bg-cv-light pr-2 dark:bg-cv-dark print:bg-transparent">
<div
className={clsx(
'absolute top-[1.65rem] z-0 h-px w-full bg-current opacity-50',
print && 'hidden'
)}
></div>
<div
className={clsx(
'relative z-10 shrink-0 font-semibold',
print ? 'w-28' : 'w-full sm:w-40 md:w-52'
)}
>
<span className={clsx('inline-block pr-2', !print && 'bg-cv-light dark:bg-cv-dark')}>
{year}
</span>
</div>
<Paragraph
className={clsx(
'relative z-10 !w-fit bg-cv-light sm:px-2 dark:bg-cv-dark print:bg-transparent',
'relative z-10 !w-fit sm:px-2',
em && 'font-semibold',
right && 'text-right sm:pr-0'
right && 'text-right sm:pr-0',
!print && 'bg-cv-light dark:bg-cv-dark'
)}
>
{desc}
Expand Down
128 changes: 19 additions & 109 deletions src/content/AboutMe.tsx
Original file line number Diff line number Diff line change
@@ -1,117 +1,27 @@
import Heading from '@/components/Heading'
import Link from '@/components/Link'
import Paragraph from '@/components/Paragraph'
import TimelineItem from '@/components/TimelineItem'
import CvTimeline from './CvTimeline'

const AboutMe = ({ print }: { print?: boolean }) => {
const AboutMe = () => {
return (
<div className="flex min-h-svh flex-col lg:flex-row print:block print:p-16 print:pt-20 print:text-base">
<div className="bg-cv-light p-6 sm:p-8 md:flex-1 md:p-12 dark:bg-cv-dark print:bg-transparent print:p-0">
{print ? (
<div className="flex justify-between">
<Heading size={1}>Adam Plesník</Heading>
<Heading size={1}>UX&ndash;UI designer</Heading>
</div>
) : (
<Heading size={2}>CV</Heading>
)}
{print && (
<div className="mt-5 flex w-full gap-2">
<Link href="https://adamplesnik.com">adamplesnik.com</Link> /
<Link href="mailto:adam@adamplesnik.com">adam@adamplesnik.com</Link>
<div className="flex-1 justify-end text-right">Bratislava, Slovakia</div>
</div>
)}
<div className="flex items-baseline gap-8 print:mt-16">
{print && (
<Heading size={2} className="w-32 shrink-0">
About me
</Heading>
)}
<div>
<Paragraph className="mb-4 mt-8">
I spend quality time with my family&mdash;or alone when needed&mdash;preferably in
nature, mountain biking, traveling, or exploring around town.
</Paragraph>
<Paragraph className="mb-6 print:mb-0">
I speak English fluently. I also enjoy photography, playing piano as a hobby, and
reading.
</Paragraph>
</div>
</div>
{print ? (
<>
<div className="flex flex-1 items-baseline gap-8 print:mt-16">
<Heading size={2} className="w-32 shrink-0">
Skills
</Heading>
<div>
<Paragraph className="mb-4">
I create, polish, and improve user experiences and interfaces.
</Paragraph>
<Paragraph>
Paint the large picture first&mdash;mapping user journeys and prototyping
wireframes&mdash;before diving into the designs. Once the user experience and flow
are sorted, I do my best to create clean layouts with strong typography,
thoughtful colors, and visual clarity. And a touch of playfulness.
</Paragraph>
</div>
</div>

<div className="flex items-baseline gap-8 print:mt-16">
<Heading size={2} className="w-32 shrink-0">
Tech
</Heading>
<Paragraph>Figma, React+Typescript, TSX, Tailwind CSS</Paragraph>
</div>
</>
) : (
<Paragraph>
On the tech side, I'm proficient in Figma and I code in React, using Tailwind CSS,
TSX/HTML, or pure CSS.
</Paragraph>
)}
<div className="flex min-h-svh flex-col gap-1 lg:flex-row">
<div className="bg-cv-light p-6 sm:p-8 md:flex-1 md:p-12 dark:bg-cv-dark">
<Heading size={2}>CV</Heading>
<Paragraph className="mb-6 mt-8">
I spend quality time with my family—or alone when needed—preferably in nature, mountain
biking, traveling, or exploring around town.
</Paragraph>
<Paragraph className="mb-6">
I enjoy photography, playing piano as a hobby, and reading.
</Paragraph>
<Paragraph>
On the tech side, I'm proficient in Figma and I code in React, using Tailwind CSS,
TSX/HTML, or pure CSS.
</Paragraph>
</div>
<div className="flex items-baseline gap-8 md:flex-[2] print:mt-16">
{print && (
<Heading size={2} className="w-32 shrink-0">
CV
</Heading>
)}
<div className="w-full bg-cv-light p-6 sm:p-8 md:p-12 md:pt-10 dark:bg-cv-dark print:bg-transparent print:p-0">
<div className="flex flex-col gap-2 print:gap-1">
<TimelineItem year={'A long time ago'} desc="Han shot first!" className="mb-72" right />
<TimelineItem year={1985} desc="Born" className="mb-12 print:mb-0" />
<TimelineItem
year={1999}
desc="Star Wars is not a trilogy anymore"
className="mb-16"
right
/>
<TimelineItem year={'2008\u20132010'} desc="Freelance web designer" em />
<TimelineItem year={2010} desc="Master of Architecture" />
<TimelineItem year={'2011\u20132012'} desc="Web designer in Websupport" em />
<TimelineItem
year={'2013\u2013now'}
desc="Design engineer in Expersoft Technologies"
em
/>
<TimelineItem year={2014} desc="Married" />
<TimelineItem year={'2015 & 2021'} desc="Kids" />
<TimelineItem
year={'Occasionally'}
desc="Portrait photographer"
className="mb-80 print:mb-0"
em
/>
<TimelineItem
year={12067}
desc="Hari will develop psychohistory"
className="mb-80"
right
/>
<TimelineItem year={23354} desc="Paul will become overly sensitive" right />
</div>
<div className="bg-cv-light p-6 sm:p-8 md:flex-[2] md:p-12 md:pt-10 dark:bg-cv-dark">
<div className="flex flex-col gap-2">
<CvTimeline />
</div>
</div>
</div>
Expand Down
67 changes: 67 additions & 0 deletions src/content/CvPrint.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import Heading from '@/components/Heading'
import Link from '@/components/Link'
import Paragraph from '@/components/Paragraph'
import CvTimeline from './CvTimeline'

const CvPrint = () => {
return (
<div className="p-14 pt-20 text-base">
<div className="flex justify-between">
<Heading size={1}>Adam Plesník</Heading>
<Heading size={1}>UX&ndash;UI designer</Heading>
</div>
<div className="mt-4 flex w-full items-center gap-2">
<Link href="https://adamplesnik.com">adamplesnik.com</Link> /
<Link href="mailto:adam@adamplesnik.com">adam@adamplesnik.com</Link>
<div className="flex-1 justify-end text-right">Bratislava, Slovakia</div>
</div>
<div className="mt-16 flex items-baseline gap-8">
<Heading size={2} className="w-32 shrink-0">
About me
</Heading>
<div>
<Paragraph className="mb-4">
I spend quality time with my family&mdash;or alone when needed&mdash;preferably in
nature, mountain biking, traveling, or exploring around town.
</Paragraph>
<Paragraph>
I speak English fluently. I also enjoy photography, playing piano as a hobby, and
reading.
</Paragraph>
</div>
</div>
<div className="mt-16 flex flex-1 items-baseline gap-8">
<Heading size={2} className="w-32 shrink-0">
Skills
</Heading>
<div>
<Paragraph className="mb-4">
I create, polish, and improve user experiences and interfaces.
</Paragraph>
<Paragraph>
Paint the large picture first&mdash;mapping user journeys and prototyping
wireframes&mdash;before diving into the designs. Once the user experience and flow are
sorted, I do my best to create clean layouts with strong typography, thoughtful colors,
and visual clarity. And a touch of playfulness.
</Paragraph>
</div>
</div>
<div className="mt-16 flex items-baseline gap-8">
<Heading size={2} className="w-32 shrink-0">
Tech
</Heading>
<Paragraph>Figma, React+Typescript, TSX, Tailwind CSS</Paragraph>
</div>
<div className="mt-16 flex items-baseline gap-8">
<Heading size={2} className="w-32 shrink-0">
CV
</Heading>
<div className="flex flex-col gap-2 print:gap-1">
<CvTimeline print />
</div>
</div>
</div>
)
}

export default CvPrint
52 changes: 52 additions & 0 deletions src/content/CvTimeline.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import TimelineItem from '@/components/TimelineItem'
import clsx from 'clsx'

const CvTimeline = ({ print }: { print?: boolean }) => {
return (
<>
<TimelineItem
year={'A long time ago'}
desc="Han shot first!"
className="mb-72"
right
print={print}
/>
<TimelineItem year={1985} desc="Born" className={clsx(!print && 'mb-12')} print={print} />
<TimelineItem
year={1999}
desc="Star Wars is not a trilogy anymore"
className="mb-16"
right
print={print}
/>
<TimelineItem year={'2008\u20132010'} desc="Freelance web designer" em print={print} />
<TimelineItem year={2010} desc="Master of Architecture" print={print} />
<TimelineItem year={'2011\u20132012'} desc="Web designer in Websupport" em print={print} />
<TimelineItem
year={'2013\u2013now'}
desc="Design engineer in Expersoft Technologies"
em
print={print}
/>
<TimelineItem year={2014} desc="Married" print={print} />
<TimelineItem year={'2015 & 2021'} desc="Kids" print={print} />
<TimelineItem
year={'Occasionally'}
desc="Portrait photographer"
className="mb-80"
em
print={print}
/>
<TimelineItem
year={12067}
desc="Hari will develop psychohistory"
className="mb-80"
right
print={print}
/>
<TimelineItem year={23354} desc="Paul will become overly sensitive" right print={print} />
</>
)
}

export default CvTimeline
4 changes: 2 additions & 2 deletions src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Analytics } from '@vercel/analytics/react'
import React from 'react'
import ReactDOM from 'react-dom/client'
import { createBrowserRouter, RouterProvider } from 'react-router-dom'
import AboutMe from './content/AboutMe.tsx'
import CvPrint from './content/CvPrint.tsx'
import './index.css'
import Figma from './pages/Figma.tsx'
import Home from './pages/Home.tsx'
Expand All @@ -23,7 +23,7 @@ const router = createBrowserRouter([
},
],
},
{ element: <AboutMe print />, path: '/cv' },
{ element: <CvPrint />, path: '/cv' },
])

ReactDOM.createRoot(document.getElementById('root')!).render(
Expand Down

0 comments on commit 2439c6a

Please sign in to comment.