mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-14 04:46:49 +00:00
parent
d4c03fe1be
commit
f76dc766a8
@ -23,7 +23,7 @@ document.querySelector('.site-title').addEventListener('contextmenu', function(e
|
|||||||
const changeNavColor = () => {
|
const changeNavColor = () => {
|
||||||
const scrollPosition = document.documentElement.scrollTop;
|
const scrollPosition = document.documentElement.scrollTop;
|
||||||
const nav = document.querySelector("header");
|
const nav = document.querySelector("header");
|
||||||
if (scrollPosition <= 10) {
|
if (scrollPosition <= 1) {
|
||||||
nav.classList.add("dark");
|
nav.classList.add("dark");
|
||||||
} else {
|
} else {
|
||||||
nav.classList.remove("dark");
|
nav.classList.remove("dark");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user