feat: add round portrait to homepage
All checks were successful
Deploy Blog / deploy (push) Successful in 1m22s
All checks were successful
Deploy Blog / deploy (push) Successful in 1m22s
This commit is contained in:
parent
70a8cb8f9f
commit
f6bf938d0e
3 changed files with 41 additions and 43 deletions
BIN
src/images/round-portrait.png
Normal file
BIN
src/images/round-portrait.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 MiB |
|
@ -1,59 +1,52 @@
|
||||||
import MainTemplate from "@/templates/MainTemplate"
|
import MainTemplate from "@/templates/MainTemplate"
|
||||||
import PostListing from "@/containers/PostListing"
|
import PostListing from "@/containers/PostListing"
|
||||||
import { usePosts } from "@/hooks/usePosts"
|
import { usePosts } from "@/hooks/usePosts"
|
||||||
|
import roundedPortrait from "../images/round-portrait.png"
|
||||||
import { Card, CardHeader, CardContent, CardFooter } from "@/components/ui/card"
|
import { Card, CardHeader, CardContent, CardFooter } from "@/components/ui/card"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
import { Link } from "react-router"
|
import { Link } from "react-router"
|
||||||
|
|
||||||
const HomePage = () => {
|
const HomePage = () => {
|
||||||
const { posts } = usePosts()
|
const { posts } = usePosts()
|
||||||
return (
|
return (
|
||||||
<MainTemplate>
|
<MainTemplate>
|
||||||
<div className="mb-7 border border-foreground py-7 px-6 dark:bg-sidebar">
|
<div className="mb-7 border border-foreground py-8 px-8 dark:bg-sidebar">
|
||||||
<h1 className="scroll-m-20 text-left text-2xl font-semibold">
|
<div className="flex flex-col items-center md:flex-row md:items-start gap-4 md:gap-8 md:flex-row-reverse">
|
||||||
Another software engineer with a blog
|
{/* Image - centers on mobile, left-aligned on desktop */}
|
||||||
</h1>
|
<div className="flex-shrink-0">
|
||||||
<p className="leading-[1.7] [&:not(:first-child)]:mt-5">
|
<img
|
||||||
I'm a self-taught software engineer currently working at ITV,
|
src={roundedPortrait}
|
||||||
previously at the BBC. This blog is a technical scrapbook and digital
|
alt="Profile picture"
|
||||||
garden.
|
className="rounded-image w-36 h-36 md:w-38 md:h-38 object-contain"
|
||||||
</p>
|
/>
|
||||||
</div>
|
</div>
|
||||||
{/*
|
|
||||||
<Card className="mb-8 rounded-none">
|
|
||||||
<CardHeader>
|
|
||||||
<h1 className="scroll-m-20 text-left text-2xl font-semibold">
|
|
||||||
Another software engineer with a blog!
|
|
||||||
</h1>
|
|
||||||
</CardHeader>
|
|
||||||
<CardContent>
|
|
||||||
<p className="leading-[1.7] [&:not(:first-child)]:mt-7">
|
|
||||||
I'm a self-taught software engineer currently working at ITV,
|
|
||||||
previously at the BBC. This blog is a technical scrapbook and
|
|
||||||
digital garden.
|
|
||||||
</p>
|
|
||||||
</CardContent>
|
|
||||||
<CardFooter>
|
|
||||||
<Button asChild>
|
|
||||||
<Link to="/about">About</Link>
|
|
||||||
</Button>
|
|
||||||
</CardFooter>
|
|
||||||
</Card>
|
|
||||||
<Button asChild>
|
|
||||||
<Link to="/about">About</Link>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
|
{/* Text content */}
|
||||||
|
<div className="text-center md:text-left flex-1">
|
||||||
|
<h1 className="scroll-m-20 text-2xl font-semibold">
|
||||||
|
Another software engineer with a blog
|
||||||
|
</h1>
|
||||||
|
<p className="leading-[1.7] mt-5">
|
||||||
|
I'm a self-taught software engineer currently working at ITV,
|
||||||
|
previously at the BBC. This blog is a technical scrapbook and
|
||||||
|
digital garden.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{/*
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
*/}
|
*/}
|
||||||
|
|
||||||
<PostListing
|
<PostListing
|
||||||
title="Recent posts"
|
title="Recent posts"
|
||||||
posts={posts.slice(0, 5)}
|
posts={posts.slice(0, 5)}
|
||||||
showAllButton
|
showAllButton
|
||||||
/>
|
/>
|
||||||
</MainTemplate>
|
</MainTemplate>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export { HomePage }
|
export { HomePage }
|
||||||
|
|
|
@ -43,3 +43,8 @@ img {
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.rounded-image {
|
||||||
|
max-width: auto;
|
||||||
|
min-width: auto;
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue