Open github commits after unlocking animation (#41)

* Open github commits after unlocking animation

* Wait for the animation to end before opening Hyprland commits
This commit is contained in:
Hadi 2024-01-31 12:33:04 +01:00 committed by GitHub
parent 0ed35374d3
commit dd6c31ab8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -87,6 +87,7 @@
/** @type {HTMLDivElement} */
let containerElement
let isAnimationComplete = false
const vaxrySize = 220
const contextId = Symbol('hypractive context')
@ -98,12 +99,16 @@
function onClick() {
click$.next(1)
}
function onClickUnlocked() {
window.open('https://github.com/hyprwm/Hyprland/commits/main/', '_blank')
}
</script>
<div class="relative overflow-visible">
<button
class="flex items-center gap-3 font-bold text-slate-400 shadow-black drop-shadow-lg transition-colors hover:underline active:scale-95"
on:click={onClick}
on:click={isAnimationComplete ? onClickUnlocked : onClick}
style:color={$relativeLevel$ > 0 ? `hsl(${hue} 64% 53%)` : undefined}
style:scale={$relativeLevel$ > 0 ? scale : undefined}
style:translate={$relativeLevel$ > 0 ? `0px -${translateY}px` : undefined}
@ -127,6 +132,7 @@
<div
class="vaxx-wrapper absolute bottom-[240px] left-1/2 z-50 aspect-square -translate-x-[100px] rounded-full animate-in fade-in-0 zoom-in-95 slide-in-from-bottom-[500px] slide-in-from-left-20 [animation-duration:2.5s]"
style:width={vaxrySize + 'px'}
on:animationend={() => (isAnimationComplete = true)}
>
<DiscordProfilePicture
image={VaxryImage}