From 80975f6c10d0b2b5d5aaa287572379274c533713 Mon Sep 17 00:00:00 2001 From: Mastan Sayyad Date: Sun, 7 Jul 2024 12:34:42 +0530 Subject: [PATCH 1/3] Update index.html --- index.html | 231 ++++++++++++++++++++++++++--------------------------- 1 file changed, 114 insertions(+), 117 deletions(-) diff --git a/index.html b/index.html index f16c3b5..15b4a1b 100644 --- a/index.html +++ b/index.html @@ -1,136 +1,133 @@ - - - - - Timewarp - - - + + + + + + Timewarp + + + - - - + + - - -
- -

+ -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ +
+ +

+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- + - - + } + + + - - + \ No newline at end of file From 8028b98775ba83ed4c1b910fd92fc31e000a5e39 Mon Sep 17 00:00:00 2001 From: Mastan Sayyad Date: Sun, 7 Jul 2024 12:34:55 +0530 Subject: [PATCH 2/3] Update trail.js --- trail.js | 54 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/trail.js b/trail.js index 12068ee..344107f 100644 --- a/trail.js +++ b/trail.js @@ -1,34 +1,36 @@ -const coords = { x: 0, y: 0 }; -const circles = document.querySelectorAll(".circle"); +document.addEventListener("DOMContentLoaded", function () { + const coords = { x: 0, y: 0 }; + const circles = document.querySelectorAll(".circle"); -circles.forEach(function (circle, index) { - circle.x = 0; - circle.y = 0; -}); + circles.forEach(function (circle) { + circle.x = 0; + circle.y = 0; + }); -window.addEventListener("mousemove", function (e) { - coords.x = e.pageX; - coords.y = e.pageY - window.scrollY; // Adjust for vertical scroll position -}); + window.addEventListener("mousemove", function (e) { + coords.x = e.pageX; + coords.y = e.pageY - window.scrollY; // Adjust for vertical scroll position + }); -function animateCircles() { - let x = coords.x; - let y = coords.y; + function animateCircles() { + let x = coords.x; + let y = coords.y; - circles.forEach(function (circle, index) { - circle.style.left = x - 12 + "px"; - circle.style.top = y - 12 + "px"; - circle.style.transform = `scale(${(circles.length - index) / circles.length})`; + circles.forEach(function (circle, index) { + circle.style.left = `${x - 12}px`; + circle.style.top = `${y - 12}px`; + circle.style.transform = `scale(${(circles.length - index) / circles.length})`; - circle.x = x; - circle.y = y; + const nextCircle = circles[index + 1] || circles[0]; + circle.x = x; + circle.y = y; - const nextCircle = circles[index + 1] || circles[0]; - x += (nextCircle.x - x) * 0.3; - y += (nextCircle.y - y) * 0.3; - }); + x += (nextCircle.x - x) * 0.3; + y += (nextCircle.y - y) * 0.3; + }); - requestAnimationFrame(animateCircles); -} + requestAnimationFrame(animateCircles); + } -animateCircles(); + animateCircles(); +}); From 556a665fa72e478dd20519424220d67c36aa0fdb Mon Sep 17 00:00:00 2001 From: Mastan Sayyad Date: Sun, 7 Jul 2024 13:01:50 +0530 Subject: [PATCH 3/3] Update --- index.html | 40 +++++++++++++++++++++++++++++++++++++++- src/main.css | 1 - trail.js | 36 ------------------------------------ 3 files changed, 39 insertions(+), 38 deletions(-) delete mode 100644 trail.js diff --git a/index.html b/index.html index 15b4a1b..7bcbf13 100644 --- a/index.html +++ b/index.html @@ -84,7 +84,45 @@
- + diff --git a/src/main.css b/src/main.css index 84def9d..b5623af 100644 --- a/src/main.css +++ b/src/main.css @@ -25,7 +25,6 @@ body { background-color: var(--bg-color); color: var(--text-color); - cursor: none; } .navbar { diff --git a/trail.js b/trail.js deleted file mode 100644 index 344107f..0000000 --- a/trail.js +++ /dev/null @@ -1,36 +0,0 @@ -document.addEventListener("DOMContentLoaded", function () { - const coords = { x: 0, y: 0 }; - const circles = document.querySelectorAll(".circle"); - - circles.forEach(function (circle) { - circle.x = 0; - circle.y = 0; - }); - - window.addEventListener("mousemove", function (e) { - coords.x = e.pageX; - coords.y = e.pageY - window.scrollY; // Adjust for vertical scroll position - }); - - function animateCircles() { - let x = coords.x; - let y = coords.y; - - circles.forEach(function (circle, index) { - circle.style.left = `${x - 12}px`; - circle.style.top = `${y - 12}px`; - circle.style.transform = `scale(${(circles.length - index) / circles.length})`; - - const nextCircle = circles[index + 1] || circles[0]; - circle.x = x; - circle.y = y; - - x += (nextCircle.x - x) * 0.3; - y += (nextCircle.y - y) * 0.3; - }); - - requestAnimationFrame(animateCircles); - } - - animateCircles(); -});