From 05077cb19a780ec4bd66178f79b7c7de80f1e1dc Mon Sep 17 00:00:00 2001 From: Reimar Date: Sat, 10 Feb 2024 21:39:54 +0100 Subject: [PATCH] Add access keys and dark theme --- public/header.js | 10 +++++++--- public/style.css | 9 ++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/public/header.js b/public/header.js index dcbcfe7..66eebf1 100644 --- a/public/header.js +++ b/public/header.js @@ -3,24 +3,28 @@ function displayHeader() { { href: "/", name: "Home", + accessKey: "h", }, { href: "/register/", name: "Register", + accessKey: "r", }, { href: "/login/", name: "Login", + accessKey: "l", }, { href: "/upload/", name: "Upload", + accessKey: "u", }, - ].map(({name, href}) => { + ].map(({name, href, accessKey}) => { if (href === window.location.pathname) { - return `${name}` + return `${name}` } else { - return `${name}` + return `${name}` } }).join(" - "); diff --git a/public/style.css b/public/style.css index 221d5e6..a0a3bd3 100644 --- a/public/style.css +++ b/public/style.css @@ -13,7 +13,14 @@ body { text-align: center; font-family: system-ui, sans-serif; background-color: #dff3f1; - color: black; + color: #211; +} + +@media (prefers-color-scheme: dark) { + body { + background: #211; + color: #dff3f1; + } } .mao-error {