Skip to content

Commit 87a8f2a

Browse files
committed
Adds a cool animation
1 parent 052ed0e commit 87a8f2a

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

src/pages/index.astro

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import TwinklingStars from "@components/TwinklingStars.astro"
88
import MeteorShower from "@components/MeteorShower.astro"
99
// import About from "@components/About.tsx"
1010
11-
const homeTitle = "and I am a Software"
11+
const homeTitle = "and I am a"
1212
1313
const posts = (await getCollection("blog"))
1414
.filter(post => !post.data.draft)
@@ -69,6 +69,25 @@ const posts = (await getCollection("blog"))
6969
</div>
7070

7171
<script is:inline src="/js/bg.js"></script>
72+
73+
<style>
74+
@keyframes strike {
75+
from { width: 0; }
76+
to { width: 100%; }
77+
}
78+
79+
@keyframes fadeInUp {
80+
from {
81+
opacity: 0;
82+
transform: translateY(5px);
83+
}
84+
to {
85+
opacity: 0.75;
86+
transform: translateY(0);
87+
}
88+
}
89+
90+
</style>
7291

7392
<!-- HERO -->
7493
<section class="relative h-screen w-full">
@@ -82,15 +101,24 @@ const posts = (await getCollection("blog"))
82101
<div class="animate absolute h-full w-full flex items-center justify-center">
83102
<div class='relative w-full h-full flex items-center justify-center'>
84103
<div class='p-5 text-center'>
104+
105+
85106
<p class='animated text-lg md:text-xl lg:text-2xl font-semibold opacity-75'>
86107
Hello, my name is
87108
</p>
109+
88110
<p class='animated text-2xl md:text-3xl lg:text-4xl font-bold uppercase text-black dark:text-white'>
89111
Guilherme Teixeira
90112
</p>
91-
<p class='animated text-sm md:text-base lg:text-lg opacity-75'>
92-
{homeTitle} <span class="line-through">Developer</span>{' '}<span>Artisan</span>
93-
</p>
113+
114+
<span class='animated text-sm md:text-base lg:text-lg opacity-75'>{homeTitle}</span>
115+
<div class="animated inline-block relative h-full items-center justify-center text-sm md:text-base lg:text-lg opacity-75">
116+
Software Developer
117+
<span class="absolute left-0 top-1/2 h-[2px] bg-red-500 animate-[strike_0.6s_ease-out_1.5s_forwards]"></span>
118+
</div>
119+
120+
<span class="animate-[fadeInUp_0.6s_ease-out_3.0s_forwards] text-sm md:text-base lg:text-lg opacity-0">Software Artisan</span>
121+
94122
<div id="ctaButtons" class='animated flex flex-wrap gap-4 justify-center mt-5'>
95123
<a href='/blog' class='py-2 px-4 rounded truncate text-xs md:text-sm lg:text-base bg-black dark:bg-white text-white dark:text-black hover:opacity-75 blend'>
96124
Read my digital garden

0 commit comments

Comments
 (0)