Skip to content

Commit

Permalink
Commited more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
polylogue2 committed Nov 12, 2024
1 parent c1e3e44 commit 7c83838
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 51 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ <h2>Gallery</h2>
<h2>Project Ninjago</h2>
<p1 class="p1">© Hengill</p1>
<br>
<p2 class="p2">Project Ninjago is a community-maintained unofficial wiki by <strong>Hengill</strong>, and developed by <strong>polylogue</strong> in HTML & CSS.</p2>
<p2 class="p2">Project Ninjago is a community-maintained <br> unofficial wiki by <strong><a href="https://github.com/hengilldesigns">Hengill</a></strong>.</p2>
<br>

<hr>
Expand Down
14 changes: 14 additions & 0 deletions search/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search | Project Ninjago</title>
<link rel="stylesheet" href="/static/styles/search.css">
</head>
<body>
<nav>
<li><a href="/" class="navheader">Project Ninjago</a></li>
</nav>
</body>
</html>
30 changes: 6 additions & 24 deletions static/scripts/home.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,9 @@
console.log("Script loaded at", window.location.href)

views = ['.databank', '.gallery']
i = 0
function scrollDown() {
const nextSection = document.querySelector('.databank');
const nextSection = document.querySelector(views[i]);
nextSection.scrollIntoView({ behavior: 'smooth' });
i = i + 1
}
document.addEventListener("DOMContentLoaded", () => {
const cursor = document.querySelector(".custom-cursor");

// Update cursor position
document.addEventListener("mousemove", (e) => {
cursor.style.left = `${e.clientX}px`;
cursor.style.top = `${e.clientY}px`;
});

// Resize cursor on hover over links/buttons
document.querySelectorAll("a, button").forEach((el) => {
el.addEventListener("mouseenter", () => {
const rect = el.getBoundingClientRect();
cursor.style.width = `${rect.width + 10}px`;
cursor.style.height = `${rect.height + 10}px`;
});

el.addEventListener("mouseleave", () => {
cursor.style.width = "40px";
cursor.style.height = "40px";
});
});
});
28 changes: 2 additions & 26 deletions static/styles/home.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
padding: 0;
box-sizing: border-box;
font-family: 'Inter', Arial, sans-serif;
cursor: none;
}

.body {
Expand Down Expand Up @@ -209,7 +208,7 @@
}

.sitemap p1 {
font-size: 25px;
font-size: 23px;
font-family: 'Inter', serif;
margin-left: 37.5px;
color: #939393;
Expand All @@ -219,7 +218,7 @@
}

.sitemap p2 {
font-size: 25px;
font-size: 20px;
font-family: 'Inter', serif;
margin-left: 37.5px;
margin-top: 25px;
Expand Down Expand Up @@ -260,26 +259,3 @@
opacity: 0.8;
}

.custom-cursor {
position: fixed;
top: 0;
left: 0;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: rgba(150, 150, 150, 0.6);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
backdrop-filter: blur(3px);
pointer-events: none;
transition: width 0.2s ease, height 0.2s ease, transform 0.2s ease, border-radius 0.2s ease;
transform: translate(-50%, -50%);
z-index: 9999;
}

/* Change cursor style on interactive elements */
button:hover ~ .custom-cursor,
a:hover ~ .custom-cursor {
border-radius: 12px;
background-color: rgba(100, 100, 100, 0.6);
box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}
19 changes: 19 additions & 0 deletions static/styles/search.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400;1,700&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&family=Inter:wght@300;400;600;700&display=swap');

.navheader {
font-family: 'Amiri', sans-serif;
text-decoration: none;
font-size: 50px;

margin: 15px;
padding: 0;
color: black;
}
.navheader a {
text-decoration: none;
color: inherit;
list-style-type: none;
}
.navheader::marker {
content: ''; /* Removes the marker */
}

0 comments on commit 7c83838

Please sign in to comment.