Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/tune footer #3

Merged
merged 5 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="description" content="Adam Plesník, design engineer, Bratislava, Slovakia" />
<title>Adam Plesník, design engineer</title>
</head>
<body
Expand Down
5 changes: 5 additions & 0 deletions public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
user-agent: *
allow: *

user-agent: *
disallow: /blog
17 changes: 17 additions & 0 deletions src/components/Icon.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { toJson } from '@/utils/toJson'
import { Cog } from 'lucide-react'
import renderer from 'react-test-renderer'
import { expect, test } from 'vitest'
import Icon from './Icon'

test('Icon', () => {
const component = renderer.create(<Icon Icon={Cog} />)
const tree = toJson(component)
expect(tree).toMatchSnapshot()
})

test('Icon with class name', () => {
const component = renderer.create(<Icon Icon={Cog} className="test" />)
const tree = toJson(component)
expect(tree).toMatchSnapshot()
})
8 changes: 8 additions & 0 deletions src/components/Icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import clsx from 'clsx'
import { LucideIcon } from 'lucide-react'

const Icon = ({ Icon, className }: { Icon: LucideIcon; className?: string }) => {
return <Icon className={clsx('size-5 translate-y-1', className)} strokeWidth={1.5} />
}

export default Icon
3 changes: 2 additions & 1 deletion src/components/Tile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { clsx } from 'clsx'
import { MousePointerClick } from 'lucide-react'
import { HTMLAttributes, PropsWithChildren, ReactNode } from 'react'
import Heading from './Heading'
import Icon from './Icon'

const Tile = ({
sub,
Expand All @@ -20,7 +21,7 @@ const Tile = ({
{children}
{links && (
<div className="flex items-baseline gap-2">
<MousePointerClick className="size-4" />
<Icon Icon={MousePointerClick} />
<div className="flex flex-col gap-1">{links}</div>
</div>
)}
Expand Down
117 changes: 117 additions & 0 deletions src/components/__snapshots__/Icon.test.tsx.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Icon 1`] = `
<svg
className="lucide lucide-cog size-5 translate-y-1"
fill="none"
height={24}
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"
/>
<path
d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
/>
<path
d="M12 2v2"
/>
<path
d="M12 22v-2"
/>
<path
d="m17 20.66-1-1.73"
/>
<path
d="M11 10.27 7 3.34"
/>
<path
d="m20.66 17-1.73-1"
/>
<path
d="m3.34 7 1.73 1"
/>
<path
d="M14 12h8"
/>
<path
d="M2 12h2"
/>
<path
d="m20.66 7-1.73 1"
/>
<path
d="m3.34 17 1.73-1"
/>
<path
d="m17 3.34-1 1.73"
/>
<path
d="m11 13.73-4 6.93"
/>
</svg>
`;

exports[`Icon with class name 1`] = `
<svg
className="lucide lucide-cog size-5 translate-y-1 test"
fill="none"
height={24}
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
viewBox="0 0 24 24"
width={24}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"
/>
<path
d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"
/>
<path
d="M12 2v2"
/>
<path
d="M12 22v-2"
/>
<path
d="m17 20.66-1-1.73"
/>
<path
d="M11 10.27 7 3.34"
/>
<path
d="m20.66 17-1.73-1"
/>
<path
d="m3.34 7 1.73 1"
/>
<path
d="M14 12h8"
/>
<path
d="M2 12h2"
/>
<path
d="m20.66 7-1.73 1"
/>
<path
d="m3.34 17 1.73-1"
/>
<path
d="m17 3.34-1 1.73"
/>
<path
d="m11 13.73-4 6.93"
/>
</svg>
`;
15 changes: 8 additions & 7 deletions src/content/Tech.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import Em from '@/components/Em'
import Icon from '@/components/Icon'
import Tile from '@/components/Tile'
import { Sparkles } from 'lucide-react'

const skills: { tech: string; description: string }[] = [
{
tech: 'React',
description: 'TSX, state as minimal as it gets, queries, micro components, API.',
description: 'TSX, state, queries, micro components, API.',
},
{ tech: 'Tailwind CSS', description: 'Atomic CSS everywhere.' },
{ tech: 'CSS + Sass', description: 'Where the Tailwind CSS is not enough.' },
{ tech: 'Tailwind CSS', description: 'Utility first.' },
{ tech: 'HTML, CSS, Sass', description: 'SEO, a11y, animations, transitions.' },
{
tech: 'Theme refactoring',
description: 'Reorganization and tuning of front-end parts of large app',
description: 'Reorganization and tuning of front-end.',
},
{ tech: 'Figma', description: 'Mockups and prototypes.' },
{ tech: 'Figma', description: 'Mockups and prototypes, design systems, modes.' },
{ tech: '...and more', description: 'Payload CMS, Angular, Vue.js, Vaadin + Java' },
]

Expand All @@ -23,10 +24,10 @@ const Tech = () => {
<ul className="grid gap-4 md:grid-flow-col-dense md:grid-rows-3">
{skills.map((skill, i) => (
<li key={i} className="group flex items-baseline gap-2">
<Sparkles className="size-4 opacity-0 group-first:opacity-100" />
<Icon Icon={Sparkles} className="opacity-0 group-first:opacity-100" />
<span className="flex flex-col gap-1">
<Em>{skill.tech}</Em>
<span className="block text-sm">{skill.description}</span>
<span className="block text-sm text-zinc-500">{skill.description}</span>
</span>
</li>
))}
Expand Down
5 changes: 4 additions & 1 deletion src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ const Home = () => {
<div className="sticky top-0 z-10 mx-auto w-full max-w-screen-md bg-gradient-to-b from-slate-50 p-8 pt-12 dark:from-gray-900 print:max-w-screen-sm print:bg-none">
<Header />
</div>
<div className="mx-auto mb-12 flex w-full max-w-screen-md flex-col overflow-hidden p-8 print:max-w-screen-sm">
<div
className="mx-auto mb-12 flex w-full max-w-screen-md flex-col overflow-hidden p-8 print:max-w-screen-sm"
role="main"
>
<Intro />
<AboutMe />
<Tech />
Expand Down
17 changes: 11 additions & 6 deletions src/partials/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
import Em from '@/components/Em'
import Icon from '@/components/Icon'
import Link from '@/components/Link'
import { Trees } from 'lucide-react'

const Footer = () => {
return (
<div className="mt-4 flex w-full flex-col gap-4 border-t border-t-zinc-300 pt-8 text-sm sm:justify-between">
<Em>Adam Plesník, Bratislava, Slovakia</Em>
<div className="flex flex-col gap-2 sm:items-end">
<Link href="https://github.com/adamplesnik">github.com/adamplesnik</Link>
<Link href="https://www.linkedin.com/in/adamplesnik/">linkedin.com/in/adamplesnik</Link>
<Link href="mailto:adam@adamplesnik.com">adam@adamplesnik.com</Link>
<div className="mt-4 flex w-full items-baseline gap-3 border-t border-t-zinc-300 pt-8 text-sm">
<Icon Icon={Trees} className="text-zinc-800" />
<div>
<Em className="block pb-6">Adam Plesník, Bratislava, Slovakia</Em>
<div className="flex flex-col gap-2">
<Link href="mailto:adam@adamplesnik.com">adam@adamplesnik.com</Link>
<Link href="https://github.com/adamplesnik">github.com/adamplesnik</Link>
<Link href="https://www.linkedin.com/in/adamplesnik/">linkedin.com/in/adamplesnik</Link>
</div>
</div>
</div>
)
Expand Down
6 changes: 5 additions & 1 deletion src/partials/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ const Header = () => {
return (
<div className="flex items-center justify-between">
<Heading size={1}>Adam Plesník</Heading>
<Link href="https://github.com/adamplesnik" className="print:hidden">
<Link
href="https://github.com/adamplesnik"
className="print:hidden"
aria-label="Open my Github page"
>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 98 96"
Expand Down
Loading