Upgrade Theme

This commit is contained in:
FlintyLemming
2024-07-31 17:10:56 +08:00
parent d09d2ccf7f
commit 47b3d30137
57 changed files with 1330 additions and 958 deletions

View File

@@ -227,6 +227,7 @@ class Search {
Search.updateQueryString(keywords, true);
if (keywords === '') {
lastSearch = '';
return this.clear();
}

View File

@@ -21,8 +21,8 @@ function setupSmoothAnchors() {
aElement.addEventListener("click", clickEvent => {
clickEvent.preventDefault();
const targetId = aElement.getAttribute("href").substring(1),
target = document.getElementById(targetId) as HTMLElement,
const targetId = decodeURI(aElement.getAttribute("href").substring(1)),
target = document.getElementById(targetId) as HTMLElement,
offset = target.getBoundingClientRect().top - document.documentElement.getBoundingClientRect().top;
window.history.pushState({}, "", aElement.getAttribute("href"));