Skip to content

Commit 44f21dc

Browse files
author
tkokhing
committed
improved visual on blog
1 parent 7e6fee5 commit 44f21dc

5 files changed

Lines changed: 21 additions & 20 deletions

File tree

src/app/_components/post_gen/hero-post.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,22 @@ export function HeroPost(
3434
</div>
3535
<div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28">
3636
<div>
37-
<h3 className="mb-4 text-4xl lg:text-5xl leading-tight">
37+
<h3 className="mb-4 text-adaptive_fs_l leading-tight">
3838
<Link href={`/${subPath}/${slug}`} className="hover:underline">
3939
{title}
40-
<p className="mb-4 md:mb-0 text-lg italic">
40+
<p className="mb-4 md:mb-0 text-adaptive_fs_xs italic">
4141
{postStatus} < DateFormatter dateString={date} />
4242
</p>
4343
</Link>
4444
</h3>
4545
</div>
46-
<div className="shadow-sm w-full dark:shadow-sky-900/50 hover:shadow-2xl hover:dark:shadow-zinc-50/100 hover:dark:shadow-lg py-3 px-4">
46+
<div className="text-adaptive_fs_sm shadow-sm w-full dark:shadow-sky-900/50 hover:shadow-2xl hover:dark:shadow-zinc-50/100 hover:dark:shadow-lg py-3 px-4">
4747
<Link href={`/${subPath}/${slug}`}>
4848
<h4
49-
className="font-semibold italic text-lg hover:underline text-sky-950 dark:text-slate-100">
49+
className="font-semibold italic hover:underline text-sky-950 dark:text-slate-100">
5050
Excerpt:
5151
</h4>
52-
<p className="text-lg leading-relaxed mb-4">{excerpt}</p>
52+
<p className=" leading-relaxed mb-4">{excerpt}</p>
5353
</Link>
5454

5555
</div>

src/app/_components/post_gen/post-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function PostHeader({ title, coverImage, date, author, subPath, postStatu
2727
<div className="block md:hidden mb-6">
2828
<Avatar name={author.name} picture={author.picture} />
2929
</div>
30-
<div className="mb-6 text-lg italic">
30+
<div className="mb-6 text-adaptive_fs_sm italic">
3131
{postStatus} <DateFormatter dateString={date} />
3232
</div>
3333
</div>

src/app/_components/post_gen/post-preview.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,24 @@ export function PostPreview({
2828
{
2929
return (
3030
<div>
31-
<div className="mb-5">
31+
<div className="mb-3">
3232
<CoverImage subPath={subPath} slug={slug} title={title} src={coverImage} />
3333
</div>
34-
<h3 className="text-3xl mb-3 leading-snug">
34+
<h3 className="text-adaptive_fs_base mb-3 leading-snug">
3535
<Link href={`/${subPath}/${slug}`} className="hover:underline">
3636
{title}
37-
<p className="text-right text-sm mb-4 italic">
37+
<p className="text-right text-adaptive_fs_xs mb-4 italic">
3838
{postStatus} <DateFormatter dateString={date} />
3939
</p>
4040
</Link>
4141
</h3>
42-
<div className="shadow-sm w-full dark:shadow-sky-900/50 hover:shadow-2xl hover:dark:shadow-zinc-50/100 hover:dark:shadow-lg py-3 px-4">
42+
<div className="text-adaptive_fs_sm shadow-sm w-full dark:shadow-sky-900/50 hover:shadow-2xl hover:dark:shadow-zinc-50/100 hover:dark:shadow-lg py-3 px-4">
4343
<Link href={`/${subPath}/${slug}`}>
4444
<h4
45-
className="font-semibold italic text-lg hover:underline text-sky-950 dark:text-slate-100">
45+
className="font-semibold italic hover:underline text-sky-950 dark:text-slate-100">
4646
Excerpt:
4747
</h4>
48-
<p className="text-lg leading-relaxed mb-4">{excerpt}</p>
48+
<p className="leading-relaxed mb-4">{excerpt}</p>
4949
</Link>
5050

5151
</div>

src/app/_components/post_gen/title-preview.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ export function TitlePreview({
1919
postStatus,
2020
}: Props) {
2121
return (
22-
<div className="shadow-sm w-full dark:shadow-sky-900/50 hover:shadow-2xl hover:dark:shadow-zinc-50/100 hover:dark:shadow-lg py-3 px-4 text-xl mb-3 leading-snug">
22+
<div className="shadow-sm w-full dark:shadow-sky-900/50 hover:shadow-2xl hover:dark:shadow-zinc-50/100 hover:dark:shadow-lg py-3 px-4 mb-3 leading-snug">
2323
<Link href={`/${subPath}/${slug}`}>
24-
<h3 className="text-xl font-medium hover:underline">{title}</h3>
24+
<h3 className="text-adaptive_fs_base font-medium hover:underline">{title}</h3>
2525
</Link>
26-
<p className="text-pretty text-xs mb-1 italic">{excerpt}</p>
27-
<p className="text-right text-xs italic">
26+
<p className="text-pretty text-adaptive_fs_sm mb-1 italic">{excerpt}</p>
27+
<p className="text-right text-adaptive_fs_xs italic">
2828
{postStatus} <DateFormatter dateString={date} />
2929
</p>
3030
</div>

tailwind.config.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ const config: Config = {
4444
tighter: "-.04em",
4545
},
4646
fontSize: {
47-
"5xl": "2.5rem",
48-
"6xl": "2.75rem",
49-
"7xl": "4.5rem",
50-
"8xl": "6.25rem",
47+
'adaptive_fs_xl': 'clamp(2rem, calc(5.5vw), 4.5rem)',
48+
'adaptive_fs_l': 'clamp(1.7rem, calc(4.2vw), 3.5rem)',
49+
'adaptive_fs_base': 'clamp(1.2rem, calc(3vw), 3rem)',
50+
'adaptive_fs_sm': 'clamp(0.875rem, calc(2vw), 2rem)',
51+
'adaptive_fs_xs': 'clamp(0.625rem, calc(1vw), 2rem)',
5152
},
5253
boxShadow: {
5354
sm: "0 5px 10px rgba(0, 0, 0, 0.12)",

0 commit comments

Comments
 (0)