feat: misc cleanups
This commit is contained in:
parent
2c617c21c7
commit
255563f267
4 changed files with 21 additions and 10 deletions
|
|
@ -1,8 +1,3 @@
|
|||
document.documentElement.style.setProperty(
|
||||
"--topic-color",
|
||||
getTopicColor(urlToTopic()),
|
||||
);
|
||||
|
||||
const tagToHeader = new Map([
|
||||
["H2", "#"],
|
||||
["H3", "##"],
|
||||
|
|
@ -17,6 +12,11 @@ const setStyle = (h) => {
|
|||
};
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
document.documentElement.style.setProperty(
|
||||
"--topic-color",
|
||||
getTopicColor(urlToTopic()),
|
||||
);
|
||||
|
||||
document.querySelectorAll(".post-article h2").forEach(setStyle);
|
||||
document.querySelectorAll(".post-article h3").forEach(setStyle);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue