Skip to content

Commit

Permalink
Add header, update titles
Browse files Browse the repository at this point in the history
  • Loading branch information
adamplesnik committed Oct 1, 2024
1 parent 96271a2 commit 4746afe
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion src/components/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import clsx from 'clsx'
import { PropsWithChildren } from 'react'

const Heading = ({ size = 1, className = '', children }: PropsWithChildren<TitleProps>) => {
const defaultClasses = clsx('relative text-zinc-950 font-semibold', className)
const defaultClasses = clsx('text-zinc-950 font-semibold', className)

if (size === 1) {
return <h1 className={clsx(defaultClasses, 'text-xl leading-normal')}>{children}</h1>
Expand Down
12 changes: 6 additions & 6 deletions src/components/__snapshots__/Tile.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ exports[`Tile 1`] = `
<div
className="flex gap-1"
>
<h4
className="relative text-zinc-950 font-semibold mb-4 text-lg"
<h3
className="text-zinc-950 font-semibold mb-6 text-xl opacity-90"
>
Test Title
</h4>
</h3>
</div>
Tile
</div>
Expand All @@ -24,11 +24,11 @@ exports[`Tile with badge 1`] = `
<div
className="flex gap-1"
>
<h4
className="relative text-zinc-950 font-semibold mb-4 text-lg"
<h3
className="text-zinc-950 font-semibold mb-6 text-xl opacity-90"
>
Test Title
</h4>
</h3>
<span />
</div>
Tile with badge
Expand Down
6 changes: 3 additions & 3 deletions src/content/Info.tsx → src/content/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Heading from '../components/Heading'

const Info = () => {
const Header = () => {
return (
<div className="mb-6 flex items-center justify-between">
<div className="flex items-center justify-between">
<Heading size={1}>Adam Plesník</Heading>
<a href="https://github.com/adamplesnik" className="text-zinc-700 hover:text-pink-500">
<svg
Expand All @@ -19,4 +19,4 @@ const Info = () => {
)
}

export default Info
export default Header
2 changes: 1 addition & 1 deletion src/layouts/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Footer from '../content/Footer'

const Page = ({ children }: PropsWithChildren<PageProps>) => {
return (
<div className="relative mx-auto mb-12 flex w-full max-w-screen-md flex-col overflow-hidden p-8 pt-12 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">
{children}
<Footer />
</div>
Expand Down
32 changes: 18 additions & 14 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Cv from '../content/Cv'
import Info from '../content/Info'
import Header from '../content/Header'
import KolbordTile from '../content/KolbordTile'
import LoveToDo from '../content/LoveToDo'
import PluginTile from '../content/PluginTile'
Expand All @@ -10,20 +10,24 @@ import Page from '../layouts/Page'

const Home = () => {
return (
<Page>
<Info />
<Skills />
<div className="flex flex-col md:flex-row md:gap-16">
<LoveToDo />
<div>
<Work />
<KolbordTile />
<PluginTile />
<WebUmeniaTile />
</div>
<>
<div className="to-white-0 sticky top-0 z-10 mx-auto w-full max-w-screen-md bg-gradient-to-b from-white to-80% p-8 pt-12">
<Header />
</div>
<Cv />
</Page>
<Page>
<Skills />
<div className="flex flex-col md:flex-row md:gap-16">
<LoveToDo />
<div>
<Work />
<KolbordTile />
<PluginTile />
<WebUmeniaTile />
</div>
</div>
<Cv />
</Page>
</>
)
}

Expand Down

0 comments on commit 4746afe

Please sign in to comment.