feat(index): replace inline svg with lucide icons & make logo unselectable
All checks were successful
build dist / build-dist (push) Successful in 35s
All checks were successful
build dist / build-dist (push) Successful in 35s
This commit is contained in:
parent
53ae4c2fdd
commit
69e584cea6
6 changed files with 20 additions and 83 deletions
|
@ -15,28 +15,3 @@ animate(
|
|||
ease: "easeIn",
|
||||
},
|
||||
);
|
||||
|
||||
document.addEventListener("keydown", ({ key }: KeyboardEvent) => {
|
||||
const shortcuts: Record<string, string> = {
|
||||
g: "a.git",
|
||||
b: "a.blog",
|
||||
m: "a.matrix",
|
||||
};
|
||||
|
||||
const selector = shortcuts[key.toLowerCase()];
|
||||
if (!selector) return;
|
||||
|
||||
const link = document.querySelector(selector) as HTMLAnchorElement | null;
|
||||
if (!link?.href) return;
|
||||
|
||||
const a = Object.assign(document.createElement("a"), {
|
||||
href: link.href,
|
||||
target: link.target,
|
||||
rel: link.rel,
|
||||
style: "display: none",
|
||||
});
|
||||
|
||||
document.body.append(a);
|
||||
a.click();
|
||||
a.remove();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue