diff --git a/404.html b/404.html new file mode 100644 index 0000000..964ddae --- /dev/null +++ b/404.html @@ -0,0 +1,19 @@ + + + + + + + + + + 404 + + +
+ Logo +

Requested resource was not found

+

Go back to Homepage

+
+ + diff --git a/scripts/main.js b/scripts/main.js index e52c9b5..bad0f13 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -31,7 +31,7 @@ theme_switcher.addEventListener("click", () => { }); function changeToDarkTheme() { - theme_switcher.setAttribute("title", "turn the light on"); + theme_switcher?.setAttribute("title", "turn the light on"); document.documentElement.style.setProperty("--border", "var(--dark-border)"); document.documentElement.style.setProperty("--text", "var(--dark-text)"); document.documentElement.style.setProperty("--bg", "var(--dark-bg)"); @@ -42,7 +42,7 @@ function changeToDarkTheme() { } function changeToLightTheme() { - theme_switcher.setAttribute("title", "turn the light off"); + theme_switcher?.setAttribute("title", "turn the light off"); document.documentElement.style.setProperty("--border", "var(--light-border)"); document.documentElement.style.setProperty("--text", "var(--light-text)"); document.documentElement.style.setProperty("--bg", "var(--light-bg)"); diff --git a/styles/404.css b/styles/404.css new file mode 100644 index 0000000..5f54899 --- /dev/null +++ b/styles/404.css @@ -0,0 +1,12 @@ +main { + max-width: fit-content; + display: flex; + flex-direction: column; + align-items: center; + gap: 1rem; + margin: 0 auto; +} + +main img { + width: min(70vw, 15rem); +} \ No newline at end of file