Add access keys and dark theme #3
@ -3,24 +3,28 @@ function displayHeader() {
|
|||||||
{
|
{
|
||||||
href: "/",
|
href: "/",
|
||||||
name: "Home",
|
name: "Home",
|
||||||
|
accessKey: "h",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: "/register/",
|
href: "/register/",
|
||||||
name: "Register",
|
name: "Register",
|
||||||
|
accessKey: "r",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: "/login/",
|
href: "/login/",
|
||||||
name: "Login",
|
name: "Login",
|
||||||
|
accessKey: "l",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
href: "/upload/",
|
href: "/upload/",
|
||||||
name: "Upload",
|
name: "Upload",
|
||||||
|
accessKey: "u",
|
||||||
},
|
},
|
||||||
].map(({name, href}) => {
|
].map(({name, href, accessKey}) => {
|
||||||
if (href === window.location.pathname) {
|
if (href === window.location.pathname) {
|
||||||
return `<a href="${href}"><b>${name}</b></a>`
|
return `<a href="${href}" accesskey="${accessKey}"><b>${name}</b></a>`
|
||||||
} else {
|
} else {
|
||||||
return `<a href="${href}">${name}</a>`
|
return `<a href="${href}" accesskey="${accessKey}">${name}</a>`
|
||||||
}
|
}
|
||||||
}).join(" - ");
|
}).join(" - ");
|
||||||
|
|
||||||
|
@ -13,7 +13,14 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-family: system-ui, sans-serif;
|
font-family: system-ui, sans-serif;
|
||||||
background-color: #dff3f1;
|
background-color: #dff3f1;
|
||||||
color: black;
|
color: #211;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body {
|
||||||
|
background: #211;
|
||||||
|
color: #dff3f1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mao-error {
|
.mao-error {
|
||||||
|
Loading…
Reference in New Issue
Block a user