Skip to content

Commit b9115f3

Browse files
committed
Add animation
1 parent 701c721 commit b9115f3

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

src/components/sections/hero/hero.astro

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,27 +19,31 @@ const action2 = "/sponsorship/sponsor/";
1919
<!-- Left side icons -->
2020
<svg
2121
class="bg-icon top-[5%] left-[15%] rotate-[23deg] xl:block hidden"
22+
style="animation: 4s ease-in-out infinite float1;"
2223
viewBox="-40 -40 200 200"
23-
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
24+
><text x="10" y="50" font-size="100" font-weight="bold" fill="#A0B7E9"
2425
>{"{}"}</text
2526
></svg
2627
>
2728
<svg
2829
class="bg-icon top-[30%] left-[5%] rotate-[42deg] xl:block hidden"
30+
style="animation: 4s ease-in-out infinite float3;"
2931
viewBox="-40 -40 200 200"
3032
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
3133
>#</text
3234
></svg
3335
>
3436
<svg
3537
class="bg-icon bottom-[30%] left-[18%] rotate-[15deg] xl:block hidden"
38+
style="animation: 3s ease-in-out infinite float1;"
3639
viewBox="-40 -40 200 200"
3740
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
3841
>&lt;/&gt;</text
3942
></svg
4043
>
4144
<svg
4245
class="bg-icon bottom-[5%] left-[7%] rotate-[10deg] xl:block hidden"
46+
style="animation: 3s ease-in-out infinite float3;"
4347
viewBox="-40 -40 200 200"
4448
><text
4549
x="10"
@@ -54,27 +58,31 @@ const action2 = "/sponsorship/sponsor/";
5458
<!-- Right side icons -->
5559
<svg
5660
class="bg-icon top-[5%] right-[17%] rotate-[30deg] xl:block hidden"
61+
style="animation: 3s ease-in-out infinite float3;"
5762
viewBox="-40 -40 200 200"
58-
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
63+
><text x="10" y="50" font-size="100" font-weight="bold" fill="#A0B7E9"
5964
>&lt;/&gt;</text
6065
></svg
6166
>
6267
<svg
6368
class="bg-icon top-[30%] right-[6%] rotate-[15deg] xl:block hidden"
69+
style="animation: 3s ease-in-out infinite float1;"
6470
viewBox="-40 -40 200 200"
6571
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
6672
>:=</text
6773
></svg
6874
>
6975
<svg
7076
class="bg-icon bottom-[30%] right-[20%] rotate-[45deg] xl:block hidden"
77+
style="animation: 4s ease-in-out infinite float3;"
7178
viewBox="-40 -40 200 200"
7279
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
7380
>&gt;&gt;&gt;</text
7481
></svg
7582
>
7683
<svg
7784
class="bg-icon bottom-[5%] right-[8%] rotate-[33deg] xl:block hidden"
85+
style="animation: 4s ease-in-out infinite float1;"
7886
viewBox="-40 -40 200 200"
7987
><text x="10" y="50" font-size="80" font-weight="bold" fill="#A0B7E9"
8088
>ƒ(x)</text
@@ -208,5 +216,19 @@ const action2 = "/sponsorship/sponsor/";
208216
top: 10px;
209217
}
210218

219+
220+
221+
@keyframes float1 {
222+
0%, 100% { transform: translate(0, 0); }
223+
50% { transform: translate(20px, -20px); }
224+
}
225+
@keyframes float2 {
226+
0%, 100% { transform: translate(0, 0); }
227+
50% { transform: translate(-25px, 25px); }
228+
}
229+
@keyframes float3 {
230+
0%, 100% { transform: translate(0, 0); }
231+
50% { transform: translate(15px, 15px); }
232+
}
211233
</style>
212234
</section>

0 commit comments

Comments
 (0)