mirror of
https://github.com/kristoferssolo/kristofersxyz.git
synced 2026-03-22 00:26:20 +00:00
Created Projects page
This commit is contained in:
9
static/main/js/projects.js
Normal file
9
static/main/js/projects.js
Normal file
@@ -0,0 +1,9 @@
|
||||
document.getElementById("cards").onmousemove = (e) => {
|
||||
for (const CARD of document.getElementsByClassName("card")) {
|
||||
const RECT = CARD.getBoundingClientRect(),
|
||||
x = e.clientX - RECT.left,
|
||||
y = e.clientY - RECT.top
|
||||
CARD.style.setProperty("--mouse-x", `${x}px`)
|
||||
CARD.style.setProperty("--mouse-y", `${y}px`)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user