1
0
mirror of https://github.com/osmarks/website synced 2025-03-10 21:48:11 +00:00

Stylistic tweak

This commit is contained in:
osmarks 2024-08-31 18:40:12 +01:00
parent 8d81924804
commit aec521ccbf
2 changed files with 11 additions and 3 deletions

View File

@ -11,7 +11,7 @@ const prefetchHook = () => {
target = target.parentElement
}
const href = new URL(target.getAttribute("href"), window.location)
if (href.origin === window.location.origin) {
if (href.origin === window.location.origin && (href.pathname !== window.location.pathname || href.search !== window.location.search)) {
for (const ignorePath of ignorePaths) {
if (href.pathname.startsWith(ignorePath)) return
}
@ -644,4 +644,12 @@ loginButton.onclick = async ev => {
}
overlay.appendChild(input)
input.focus()
}
}
window.addEventListener("keydown", ev => {
if (ev.key === "Escape") {
if (document.querySelector(".search-overlay")) {
document.querySelector(".search-overlay").remove()
}
}
})

View File

@ -375,7 +375,7 @@ table
color: white
z-index: 1000
input
margin: 0.5em
margin: 0.5rem
font-size: 1.5em
border: 4px solid green
a