Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes make in footer #1511

Merged
merged 1 commit into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ResourceHub
Submodule ResourceHub added at 270ce7
43 changes: 27 additions & 16 deletions new-website/cursorAnimation.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
// cursorAnimation.js

const { JSDOM } = require("jsdom");

// Create a new JSDOM instance
const { window } = new JSDOM(`<!DOCTYPE html><html><body><div class="cursor" style="position: absolute;"></div></body></html>`);
const { document } = window;

// Select the cursor element
const cursor = document.querySelector(".cursor");

//follow cursor on mouse move
document.addEventListener("mousemove",(e)=>{
// Variable to store the timeout
let timeout;

// Follow cursor on mouse move
document.addEventListener("mousemove", (e) => {
let x = e.pageX;
let y = e.pageY;

cursor.style.top = y + "px";
cursor.style.left =x + "px";
cursor.style.display ="block";

//cursor effects on mouse stopped
function mouseStopped(){
cursor.style.display="none";
cursor.style.left = x + "px";
cursor.style.display = "block";

// Cursor effects on mouse stopped
function mouseStopped() {
cursor.style.display = "none";
}
clearTimeout(timeout);
timeout = setTimeout(mouseStopped,1000);


clearTimeout(timeout);
timeout = setTimeout(mouseStopped, 1000);
});

//cursor effect on mouseout

document.addEventListener("mouseout",()=>{
cursor.style.display="none";
// Cursor effect on mouseout
document.addEventListener("mouseout", () => {
cursor.style.display = "none";
});

});
// This is just to demonstrate that the script is running
console.log('Cursor animation script running');
10 changes: 9 additions & 1 deletion new-website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ <h2 class="footer-title">ResourceHub</h2>
</div>
<p class="footer-description">ResourceHub is an open-source project that serves as a one-stop repository of
valuable resources curated by the amazing contributors in the community</p>
<br>
<div class="footer-icons">
<a href="https://github.com/jfmartinz/ResourceHub" target="_blank" aria-label="Github">
<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
Expand All @@ -348,10 +349,17 @@ <h2 class="footer-title">ResourceHub</h2>
<li><a href="feedback.html" class="hov">Feedback</a></li>
</ul>
</div>
</div>
</div><br>
<div class="footer-horizontal-line"></div>
<div class="footer-bottom">
<p>Copyright &copy; 2024 <a href="#">ResourceHub</a>. All Rights Reserved.</p>
</div>
<div class="footer-links-below">
<ul>
<li><a href="terms.html" class="hov">Terms of Service</a></li>
<li><a href="privacy.html" class="hov">Privacy Policy</a></li>
</ul>
</div>
<div id="back-to-top-container">
<div class="circle1">
<svg id="back-to-top" xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="currentColor" class="bi bi-arrow-up-circle-fill" viewBox="0 0 16 16">
Expand Down
Loading