Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
chore: run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
taciturnaxolotl committed Apr 8, 2024
1 parent f98385b commit 4c6eb53
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/layouts/Layout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const year = new Date().getFullYear();

<script>
const cursorGradient = document.querySelector(
".cursor-gradient"
".cursor-gradient",
) as HTMLElement;

let autoGradientPositions: {
Expand Down Expand Up @@ -199,7 +199,7 @@ const year = new Date().getFullYear();
: Date.now() -
(1 - Number(cursorGradient.style.opacity) * 2) * fadeInDuration; // Start fade-in timer
console.log(
(1 - Number(cursorGradient.style.opacity) * 2) * fadeInDuration
(1 - Number(cursorGradient.style.opacity) * 2) * fadeInDuration,
);
fadeInFlag = true; // Set fade-in flag
}
Expand Down Expand Up @@ -261,8 +261,8 @@ const year = new Date().getFullYear();
Math.min(
autoGradientPositions[gradient.id.replace("cursor-gradient-", "")]
.velocity.x,
window.innerWidth
)
window.innerWidth,
),
);
autoGradientPositions[
gradient.id.replace("cursor-gradient-", "")
Expand All @@ -271,19 +271,19 @@ const year = new Date().getFullYear();
Math.min(
autoGradientPositions[gradient.id.replace("cursor-gradient-", "")]
.velocity.y,
window.innerHeight
)
window.innerHeight,
),
);

gradient.style.setProperty(
"--x",
autoGradientPositions[gradient.id.replace("cursor-gradient-", "")]
.velocity.x + "px"
.velocity.x + "px",
);
gradient.style.setProperty(
"--y",
autoGradientPositions[gradient.id.replace("cursor-gradient-", "")]
.velocity.y + "px"
.velocity.y + "px",
);

requestAnimationFrame(() => animateAuto(gradient));
Expand Down

0 comments on commit 4c6eb53

Please sign in to comment.