Skip to content

Commit c8b5862

Browse files
committed
Fade in
1 parent 681dca4 commit c8b5862

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/components/blog-page/blog-card-picture.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ interface PreparedGradient {
3434
stops: GradientStop[]
3535
}
3636

37-
// TODO: Animate nicer on load
3837
export function BlogCardPicture({
3938
frontMatter,
4039
children,
@@ -125,7 +124,7 @@ export function BlogCardPicture({
125124
<canvas
126125
ref={canvasRef}
127126
aria-hidden="true"
128-
className="pointer-events-none absolute inset-0 !size-full"
127+
className="animate-fade-in pointer-events-none absolute inset-0 !size-full"
129128
/>
130129
{children ? <div className="relative z-10 p-4">{children}</div> : null}
131130
</div>

src/components/blog-page/featured-blog-posts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export function FeaturedBlogPosts({
5151
</footer>
5252
</div>
5353
</NextLink>
54-
<div className="mt-4 grid grid-cols-3 flex-col gap-2 max-lg:flex sm:mt-8 sm:gap-4 lg:mt-16 lg:gap-6">
54+
<div className="mt-4 grid grid-cols-3 flex-col gap-2 max-md:flex sm:mt-8 sm:gap-4 lg:mt-16 lg:gap-6">
5555
{nextThree.map(post => (
5656
<BlogCard key={post.route} {...post} />
5757
))}

src/components/blog-page/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,18 @@ export function BlogPage({ tags, blogs, currentTag }: BlogPageProps) {
3030
community. Stay connected with the ideas and innovations shaping the
3131
GraphQL ecosystem.
3232
</p>
33-
<FeaturedBlogPosts blogs={blogs} className="mt-24 max-md:hidden" />
33+
<FeaturedBlogPosts blogs={blogs} className="mt-4 lg:mt-24" />
3434
</header>
3535
</div>
3636
<div className="gql-container">
3737
<div className="gql-section">
38-
<section className="flex items-end justify-between gap-2">
38+
<section className="flex justify-between gap-2 max-sm:flex-col sm:items-end">
3939
<h2 className="typography-h2 capitalize">
4040
{currentTag || "All Posts"}
4141
</h2>
4242
<section>
4343
<h3 className="typography-menu">Categories</h3>
44-
<ul className="mt-4 flex flex-wrap gap-2">
44+
<ul className="mt-4 flex gap-2 max-sm:overflow-auto sm:flex-wrap">
4545
{Object.entries(tags)
4646
.sort((a, b) => b[1] - a[1])
4747
.map(([tag, count], i) => (

tailwind.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const config: Config = {
8080
"arrow-left var(--animation-duration, .75s) var(--animation-direction, forwards) ease infinite",
8181
"show-overflow":
8282
"show-overflow var(--animation-duration, 12s) var(--animation-delay, 1s) var(--animation-direction, forwards) ease infinite",
83+
"fade-in": "fade-in var(--animation-duration, 100ms) ease-out forwards",
8384
},
8485
keyframes: {
8586
scroll: {
@@ -103,6 +104,9 @@ const config: Config = {
103104
transform: "translateX(var(--delta-x))",
104105
},
105106
},
107+
"fade-in": {
108+
to: { opacity: "1" },
109+
},
106110
},
107111
},
108112
},

0 commit comments

Comments
 (0)