Skip to content

Commit 20ea923

Browse files
committed
Fade in animations hehe
1 parent 0f855e9 commit 20ea923

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

src/index.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,25 @@
1818
transform: rotate(10deg);
1919
}
2020
}
21+
22+
@keyframes fade-down {
23+
0% {
24+
opacity: 0;
25+
transform: translateY(-20px);
26+
}
27+
100% {
28+
opacity: 1;
29+
transform: translateY(0);
30+
}
31+
}
32+
}
33+
34+
@layer components {
35+
.fade-down {
36+
animation: fade-down 500ms ease-out forwards;
37+
animation-delay: var(--fade-in-delay, 0ms);
38+
opacity: 0;
39+
}
2140
}
2241

2342
@layer base {

src/sections/Main.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,24 @@ export default function Main(props: MainProps) {
88
class={`flex snap-start items-center px-[8%] text-white ${props.className}`}
99
>
1010
<main class="space-y-7">
11-
<h1 class="font-logo text-7xl md:text-8xl text-violet-50">
11+
<h1 class="font-logo fade-down text-7xl text-violet-50 md:text-8xl">
1212
Seg
1313
<span class="text-red-400 underline decoration-red-400 decoration-wavy decoration-2">
1414
fault
1515
</span>{" "}
1616
Club
1717
</h1>
1818
<div class="space-y-4 font-mono text-lg md:text-xl">
19-
<p>Linux, Debugging, Chaos and legendary segfaults</p>
19+
<p class="fade-down [--fade-in-delay:_50ms]">
20+
Linux, Debugging, Chaos and legendary segfaults
21+
</p>
2022
<a
21-
class="rounded bg-slate-700 p-2 transition hover:bg-slate-600"
23+
class="fade-down rounded bg-slate-700 p-2 transition [--fade-in-delay:_300ms] hover:bg-slate-600"
2224
href="https://discord.gg/gohar"
2325
target="_blank"
2426
>
2527
Join{" "}
26-
<span class="underline decoration-blue-400 decoration-2">
28+
<span class="fade-down underline decoration-blue-400 decoration-2 [--fade-in-delay:_400ms]">
2729
@discord.gg/gohar
2830
</span>
2931
</a>

0 commit comments

Comments
 (0)