Skip to content

Commit

Permalink
NEW SITE :O
Browse files Browse the repository at this point in the history
  • Loading branch information
twhlynch committed Apr 2, 2024
1 parent 52a863d commit 055bbd5
Show file tree
Hide file tree
Showing 53 changed files with 575 additions and 4,372 deletions.
68 changes: 0 additions & 68 deletions cursors.html

This file was deleted.

1 change: 1 addition & 0 deletions discord.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<html>
<head>
<meta http-equiv="refresh" content="0;url=https://discord.gg/YKfGWSYAqf">
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Redirecting...</h1>
Expand Down
Binary file modified favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
203 changes: 102 additions & 101 deletions index.html

Large diffs are not rendered by default.

165 changes: 0 additions & 165 deletions links.html

This file was deleted.

67 changes: 24 additions & 43 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,28 @@
let cursorOuter = document.getElementById("cursor-outer");
let cursorInner = document.getElementById("cursor-inner");
let links = document.getElementsByTagName("a");
const time = document.getElementById("time");
const state = document.getElementById("state");

document.addEventListener("mousemove", function (e) {
cursorInner.style.transform =
cursorOuter.style.transform = `translate(${e.clientX}px, ${e.clientY}px)`;
});

for (let i = 0; i < links.length; i++) {
links[i].addEventListener("mouseover", () => {
cursorOuter.classList.add("cursor-outer-hover");
cursorInner.classList.add("cursor-inner-hover");
});
links[i].addEventListener("mouseout", () => {
cursorOuter.classList.remove("cursor-outer-hover");
cursorInner.classList.remove("cursor-inner-hover");
});
if (state && time) {
const localTime = new Date().toLocaleString('en-US', { timeZone: 'Australia/Melbourne' });

const hour = new Date(localTime).getHours();
const minutes = new Date(localTime).getMinutes();

if (hour < 9) {
state.innerHTML = "sleeping";
} else if (hour < 17) {
state.innerHTML = "working";
}

time.innerHTML = `${hour < 12 ? hour : hour - 12}:${minutes < 10 ? '0' + minutes : minutes} ${hour >= 12 ? "PM" : "AM"}`;
}

const currentTime = document.getElementById("currentTime");
const currentState = document.getElementById("currentState");
const time = new Date();
const toTop = document.getElementById("toTop");

const options = { timeZone: 'Australia/Melbourne' };
const localTime = time.toLocaleString('en-US', options);

let hour = new Date(localTime).getHours();

if (hour >= 17 && hour < 24) {
currentState.innerHTML = "awake";
} else if (hour >= 9 && hour < 17) {
currentState.innerHTML = "working";
} else {
currentState.innerHTML = "sleeping";
}
let minutes = new Date(localTime).getMinutes();
currentTime.innerHTML = `${hour < 12 ? hour : hour - 12}:${minutes < 10 ? '0' + minutes : minutes} ${hour >= 12 ? "PM" : "AM"}`;

function changeStyle() {
document.documentElement.style.setProperty('--text-color-default', "#b7b8c5");
document.documentElement.style.setProperty('--text-color-alt', "#e0e1f0");
document.documentElement.style.setProperty('--background-color-default', "#1d1d1d");
document.documentElement.style.setProperty('--background-color-alt', "#131c22");
document.documentElement.style.setProperty('--text-color-link', "#329e9e");
document.documentElement.style.setProperty('--border-color', "#262626");
}
if (toTop) {
toTop.addEventListener("click", () => {
window.scrollTo({
top: 0,
behavior: "smooth"
});
});
}
Loading

0 comments on commit 055bbd5

Please sign in to comment.