Compare commits
2 Commits
697f1818ab
...
ba3785df0c
Author | SHA1 | Date | |
---|---|---|---|
ba3785df0c | |||
05077cb19a |
@ -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 `<a href="${href}"><b>${name}</b></a>`
|
||||
return `<a href="${href}" accesskey="${accessKey}"><b>${name}</b></a>`
|
||||
} else {
|
||||
return `<a href="${href}">${name}</a>`
|
||||
return `<a href="${href}" accesskey="${accessKey}">${name}</a>`
|
||||
}
|
||||
}).join(" - ");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user