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

Commit

Permalink
fix: Add missing commas in cursor-gradient script
Browse files Browse the repository at this point in the history
Insert commas at the end of lines that were missing them in the cursor-gradient
script for better readability and error prevention.
  • Loading branch information
taciturnaxolotl committed Apr 3, 2024
1 parent b7ee320 commit 5c7bc69
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 @@ -144,7 +144,7 @@ const year = new Date().getFullYear();

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

let autoGradientPositions: {
Expand Down Expand Up @@ -212,7 +212,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 @@ -274,8 +274,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 @@ -284,19 +284,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 5c7bc69

Please sign in to comment.