Skip to content

Commit

Permalink
fixed git button
Browse files Browse the repository at this point in the history
  • Loading branch information
hello committed Nov 10, 2024
1 parent 184066c commit 8859fc1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ document.addEventListener("DOMContentLoaded", () => {
}
}

function setTimedLinkColor() {
const hour = new Date().getHours();
const color = hour >= 6 && hour < 18 ? "#FFC799" : "#99FFE4";
document.documentElement.style.setProperty("--time-based-color", color);
}

setTimedLinkColor();

setInterval(setTimedLinkColor, 60000);

form.addEventListener("submit", async (e) => {
e.preventDefault();

Expand Down
10 changes: 10 additions & 0 deletions styles/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
--border-color: #424245;
--success-color: #32d74b;
--error-color: #ff453a;
--time-based-color: #ffc799;
}

body {
Expand Down Expand Up @@ -37,6 +38,15 @@ body {
text-decoration: none;
}

.hero-subtitle a {
color: var(--time-based-color);
text-decoration: none;
}

.hero-subtitle a:hover {
text-decoration: underline;
}

.Btn {
width: 45px;
height: 45px;
Expand Down

0 comments on commit 8859fc1

Please sign in to comment.