Skip to content

Commit 5e973fb

Browse files
Refactor: Reduce Hero component spacing
Adjust the Hero component to utilize the star wars effect without excessive spacing.
1 parent a5fa65d commit 5e973fb

2 files changed

Lines changed: 35 additions & 31 deletions

File tree

src/components/Hero.tsx

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const Hero = () => {
1515
transition={{ duration: 0.8 }}
1616
className="mb-8"
1717
>
18-
<div className="flex flex-col justify-center items-center mb-8 relative">
18+
<div className="flex flex-col justify-center items-center mb-6 relative">
1919
<motion.img
2020
src="/lovable-uploads/ALogo.png"
2121
alt="AlienFlowSpaceDAO Logo"
@@ -34,31 +34,35 @@ const Hero = () => {
3434
/>
3535
</div>
3636

37-
<div className="mb-6">
38-
<h1
39-
className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl mb-4 text-glow text-center font-nasalization leading-tight"
40-
style={{
41-
fontFamily: "'Nasalization', sans-serif !important",
42-
letterSpacing: '0.02em'
43-
}}
44-
>
45-
<span className="text-alien-green">Δlieπ</span>
46-
<span className="text-alien-gold">FlΦw</span>
47-
<span className="text-alien-green"> $pac€</span>
48-
<span className="text-alien-gold"> DAO</span>
49-
</h1>
37+
<div className="star-wars-crawl mb-4">
38+
<div className="star-wars-content py-4">
39+
<h1
40+
className="text-3xl sm:text-4xl md:text-5xl lg:text-6xl mb-3 text-glow text-center font-nasalization leading-tight"
41+
style={{
42+
fontFamily: "'Nasalization', sans-serif !important",
43+
letterSpacing: '0.02em'
44+
}}
45+
>
46+
<span className="text-alien-green">Δlieπ</span>
47+
<span className="text-alien-gold">FlΦw</span>
48+
<span className="text-alien-green"> $pac€</span>
49+
<span className="text-alien-gold"> DAO</span>
50+
</h1>
51+
</div>
5052
</div>
5153

52-
<div className="mb-6">
53-
<motion.p
54-
className="text-base sm:text-lg md:text-xl text-gray-300 max-w-4xl mx-auto font-[Exo] text-center leading-relaxed"
55-
style={{ letterSpacing: '0.01em' }}
56-
initial={{ opacity: 0 }}
57-
animate={{ opacity: 1 }}
58-
transition={{ delay: 0.3, duration: 0.8 }}
59-
>
60-
Access & Explore the DAO with Innovative Solutions, Unlock Energy Efficiency & Environmental Sustainability, Uniting: BioFi, DeFi, DePin, DeSci, IPFS, QFS, ReFi, RWA, SocialFi, and TradFi under one cosmic ecosystem.
61-
</motion.p>
54+
<div className="star-wars-crawl mb-4">
55+
<div className="star-wars-content py-2">
56+
<motion.p
57+
className="text-base sm:text-lg md:text-xl text-gray-300 max-w-4xl mx-auto font-[Exo] text-center leading-relaxed"
58+
style={{ letterSpacing: '0.01em' }}
59+
initial={{ opacity: 0 }}
60+
animate={{ opacity: 1 }}
61+
transition={{ delay: 0.3, duration: 0.8 }}
62+
>
63+
Access & Explore the DAO with Innovative Solutions, Unlock Energy Efficiency & Environmental Sustainability, Uniting: BioFi, DeFi, DePin, DeSci, IPFS, QFS, ReFi, RWA, SocialFi, and TradFi under one cosmic ecosystem.
64+
</motion.p>
65+
</div>
6266
</div>
6367
</motion.div>
6468

src/index.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
@tailwind base;
23
@tailwind components;
34
@tailwind utilities;
@@ -127,7 +128,7 @@
127128
pointer-events: none;
128129
}
129130

130-
/* Star Wars scrolling text effect */
131+
/* Star Wars scrolling text effect - COMPACTO */
131132
.star-wars-crawl {
132133
perspective: 400px;
133134
overflow: hidden;
@@ -137,22 +138,21 @@
137138
max-width: 100%;
138139
}
139140
.star-wars-content {
140-
transform: rotateX(20deg);
141+
transform: rotateX(15deg);
141142
transform-origin: center top;
142-
animation: star-wars-float 4s ease-out forwards;
143+
animation: star-wars-float-compact 3s ease-out forwards;
143144
width: 100%;
144-
padding: 2rem;
145145
}
146-
@keyframes star-wars-float {
146+
@keyframes star-wars-float-compact {
147147
0% {
148-
transform: rotateX(20deg) translateY(100px);
148+
transform: rotateX(15deg) translateY(30px);
149149
opacity: 0;
150150
}
151151
20% {
152152
opacity: 1;
153153
}
154154
100% {
155-
transform: rotateX(20deg) translateY(0);
155+
transform: rotateX(15deg) translateY(0);
156156
opacity: 1;
157157
}
158158
}

0 commit comments

Comments
 (0)