feat: prettier

This commit is contained in:
Barrett Ruth 2025-10-08 17:35:57 -04:00
parent 0b8cb4f0bc
commit 9f5fa03ff0
2 changed files with 7 additions and 4 deletions

View file

@ -76,7 +76,10 @@
const div = document.createElement("div");
div.className = "post";
const a = document.createElement("a");
const slug = post.id.split("/").pop().replace(/\.mdx?$/, "");
const slug = post.id
.split("/")
.pop()
.replace(/\.mdx?$/, "");
a.href = `/posts/${topic}/${slug}.html`;
a.textContent = post.data.title;
a.style.textDecoration = "underline";
@ -173,7 +176,7 @@
"";
if (color) link.style.color = color;
},
true
true,
);
document.body.addEventListener(
@ -183,7 +186,7 @@
if (!link) return;
if (!link.classList.contains("active")) link.style.color = "";
},
true
true,
);
window.addEventListener("beforeunload", () => {

View file

@ -11,4 +11,4 @@ export function getTopicColor(topicName) {
default:
return "#000000";
}
}
}