diff --git a/scripts/main.js b/scripts/main.js index 769a234..406dbd6 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -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(); diff --git a/styles/styles.css b/styles/styles.css index 486ae4a..08066aa 100644 --- a/styles/styles.css +++ b/styles/styles.css @@ -9,6 +9,7 @@ --border-color: #424245; --success-color: #32d74b; --error-color: #ff453a; + --time-based-color: #ffc799; } body { @@ -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;