-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
116 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,128 @@ | ||
<script lang="ts" setup></script> | ||
<script lang="ts" setup> | ||
import {getRandomEmojis} from '@/utils/helpers'; | ||
const emojis = getRandomEmojis(4); | ||
</script> | ||
<template> | ||
<div class="chart-background justify-center"> | ||
<div class="front-page-animation__container" aria-hidden="true"> | ||
<div class="front-page-animation"> | ||
<div class="front-page-animation__content"> | ||
<div class="flex"> | ||
<IconComponent class="front-page-animation__icon" icon="watermelon" size="9rem" /> | ||
<IconComponent | ||
class="front-page-animation__icon" | ||
style="animation-delay: -750ms" | ||
icon="carrot" | ||
size="9rem" | ||
/> | ||
<IconComponent | ||
class="front-page-animation__icon" | ||
style="animation-delay: -500ms" | ||
icon="pear" | ||
size="9rem" | ||
/> | ||
<IconComponent | ||
class="front-page-animation__icon" | ||
style="animation-delay: -250ms" | ||
icon="apple" | ||
size="9rem" | ||
/> | ||
</div> | ||
<div class="flex"> | ||
<IconComponent class="front-page-animation__icon" icon="watermelon" size="9rem" /> | ||
<IconComponent | ||
class="front-page-animation__icon" | ||
style="animation-delay: -750ms" | ||
icon="carrot" | ||
size="9rem" | ||
/> | ||
<IconComponent | ||
class="front-page-animation__icon" | ||
style="animation-delay: -500ms" | ||
icon="pear" | ||
size="9rem" | ||
/> | ||
<IconComponent | ||
class="front-page-animation__icon" | ||
style="animation-delay: -250ms" | ||
icon="apple" | ||
size="9rem" | ||
/> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[0] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[1] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[2] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[3] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[0] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[1] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[2] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
<div class="front-page-animation__icon-container"> | ||
<span class="front-page-animation__icon">{{ emojis[3] }}</span> | ||
<span class="front-page-animation__shadow"></span> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<style scoped lang="scss"> | ||
.front-page-animation { | ||
@apply w-full overflow-hidden; | ||
.front-page-animation__container { | ||
@apply h-full; | ||
mask-image: linear-gradient(to right, transparent 5%, black 30%, black 70%, transparent 95%); | ||
} | ||
.front-page-animation__content { | ||
@apply flex; | ||
width: calc(8 * 9rem); | ||
animation: marquee 10s linear infinite; | ||
.front-page-animation { | ||
@apply flex w-fit mt-28; | ||
animation: | ||
enter 3.5s linear, | ||
marquee 4s linear 3.5s infinite; | ||
} | ||
.front-page-animation__icon-container { | ||
@apply relative; | ||
@apply flex flex-col items-center; | ||
} | ||
@for $i from 1 through 8 { | ||
.front-page-animation__icon-container:nth-child(#{$i}) span { | ||
animation-delay: $i * (1s / 4); | ||
} | ||
} | ||
.front-page-animation__icon { | ||
animation: jitter 1000ms ease-out infinite; | ||
@apply text-9xl w-[175px] static z-10; | ||
@apply flex items-center justify-center; | ||
animation: bounce 0.5s cubic-bezier(0.5, 0.05, 1, 0.5) infinite alternate; | ||
} | ||
@keyframes marquee { | ||
from { | ||
transform: translateX(0); | ||
.front-page-animation__shadow { | ||
@apply absolute h-5 w-28 opacity-0 -bottom-24; | ||
border-radius: 50%; | ||
background: rgba(0, 0, 0, 1); | ||
animation: shadow 0.5s cubic-bezier(0.5, 0.05, 1, 0.5) infinite alternate; | ||
} | ||
@keyframes shadow { | ||
0% { | ||
opacity: 0; | ||
transform: scale(0); | ||
filter: blur(6px); | ||
} | ||
to { | ||
transform: translateX(-50%); | ||
80% { | ||
opacity: 0.2; | ||
transform: scale(100%); | ||
filter: blur(2px); | ||
} | ||
100% { | ||
opacity: 0.2; | ||
transform: scale(110%); | ||
filter: blur(1px); | ||
} | ||
} | ||
@keyframes jitter { | ||
@keyframes bounce { | ||
0% { | ||
transform: translateY(0); | ||
transform: translate3d(0, 0px, 0) scaleX(1) scaleY(1); | ||
} | ||
40% { | ||
transform: translateY(0.75rem); | ||
90% { | ||
transform: translate3d(0, 100px, 0) scaleX(1) scaleY(1); | ||
} | ||
100% { | ||
transform: translateY(0); | ||
transform: translate3d(0, 100px, 0) scaleX(1.2) scaleY(0.7); | ||
} | ||
} | ||
@keyframes enter { | ||
from { | ||
margin-left: 100%; | ||
} | ||
to { | ||
margin-left: 0; | ||
} | ||
} | ||
@keyframes marquee { | ||
from { | ||
transform: translate3d(0, 0, 0); | ||
} | ||
to { | ||
transform: translate3d(-50%, 0, 0); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters