Skip to content

Commit 4293a17

Browse files
dtinthclaude[bot]
andcommitted
Add entrance animations to hero section elements
- Add custom CSS keyframe animations for fade effects - Logo fades down from above with 0.5s delay - Manorah fades up from bottom with 0.2s delay - Eyes fade in from left with 0.7s delay - Brain fades in from right with 0.7s delay - Add overflow-hidden to section to contain animations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <209825114+claude[bot]@users.noreply.github.com>
1 parent 3c20e68 commit 4293a17

1 file changed

Lines changed: 67 additions & 5 deletions

File tree

src/pages/index.astro

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,95 @@ import manorah from "../assets/manorah_cappuccina_blur.webp?url";
77
import Layout from "../layouts/Layout.astro";
88
---
99

10+
<style>
11+
@keyframes fadeDown {
12+
from {
13+
opacity: 0;
14+
transform: translateY(-30px);
15+
}
16+
to {
17+
opacity: 1;
18+
transform: translateY(0);
19+
}
20+
}
21+
22+
@keyframes fadeUp {
23+
from {
24+
opacity: 0;
25+
transform: translateY(30px);
26+
}
27+
to {
28+
opacity: 1;
29+
transform: translateY(0);
30+
}
31+
}
32+
33+
@keyframes fadeLeft {
34+
from {
35+
opacity: 0;
36+
transform: translateX(30px);
37+
}
38+
to {
39+
opacity: 1;
40+
transform: translateX(0);
41+
}
42+
}
43+
44+
@keyframes fadeRight {
45+
from {
46+
opacity: 0;
47+
transform: translateX(-30px);
48+
}
49+
to {
50+
opacity: 1;
51+
transform: translateX(0);
52+
}
53+
}
54+
55+
.animate-fade-down {
56+
animation: fadeDown 1s ease-out 0.5s both;
57+
}
58+
59+
.animate-fade-up {
60+
animation: fadeUp 1s ease-out 0.2s both;
61+
}
62+
63+
.animate-fade-left {
64+
animation: fadeLeft 1s ease-out 0.7s both;
65+
}
66+
67+
.animate-fade-right {
68+
animation: fadeRight 1s ease-out 0.7s both;
69+
}
70+
</style>
71+
1072
<Layout>
1173
<main class="bg-black">
1274
<section
13-
class="px-4 pt-16 relative bg-cover bg-center"
75+
class="px-4 pt-16 relative bg-cover bg-center overflow-hidden"
1476
style={`background-image: url(${heroBg})`}
1577
>
1678
<div class="flex flex-col justify-center items-center relative">
1779
<img
1880
src={logotype}
1981
alt="Stupido Hackettino"
20-
class="w-[420px] mb-0 z-10 relative"
82+
class="w-[420px] mb-0 z-10 relative animate-fade-down"
2183
/>
2284
<div class="relative">
2385
<img
2486
src={manorah}
2587
alt="Manorah Cappuccina Blur"
26-
class="w-[640px] rounded-lg shadow-lg -mt-20 z-20 relative"
88+
class="w-[640px] rounded-lg shadow-lg -mt-20 z-20 relative animate-fade-up"
2789
/>
2890
<img
2991
src={eyes}
3092
alt="Eyes"
31-
class="absolute -left-1 top-1/3 -translate-1/2 w-[30%] z-15"
93+
class="absolute -left-1 top-1/3 -translate-1/2 w-[30%] z-15 animate-fade-right"
3294
/>
3395
<img
3496
src={brain}
3597
alt="Brain"
36-
class="absolute -right-1 top-1/2 -translate-y-1/2 translate-x-1/2 w-[30%] z-15"
98+
class="absolute -right-1 top-1/2 -translate-y-1/2 translate-x-1/2 w-[30%] z-15 animate-fade-left"
3799
/>
38100
</div>
39101
</div>

0 commit comments

Comments
 (0)