Skip to content

Commit

Permalink
fix starting position for spotlight
Browse files Browse the repository at this point in the history
  • Loading branch information
thejackshelton committed Jan 13, 2025
1 parent 2fa167c commit b8f8891
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions apps/website/src/components/home/spotlight/spotlight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ export const Spotlight = component$(() => {

overlayRef.value.classList.add("leaving");
overlayRef.value.classList.remove("moving");
xPos.value = 10;
yPos.value = 50;
overlayRef.value.style.setProperty("--x-pos", `${xPos.value}%`);
overlayRef.value.style.setProperty("--y-pos", `${yPos.value}%`);
if (window.innerWidth <= 1024) {
overlayRef.value.style.setProperty("--x-pos", "92px");
overlayRef.value.style.setProperty("--y-pos", "50%");
} else {
overlayRef.value.style.setProperty("--x-pos", "10%");
overlayRef.value.style.setProperty("--y-pos", "50%");
}
});

return (
Expand Down

0 comments on commit b8f8891

Please sign in to comment.