fixed stuff and improved the rendering engine by making inline math available using $$ and for ml $$\ncontent\n$$

This commit is contained in:
2025-10-10 17:25:31 +02:00
parent a74d482d7a
commit 3494298330
5 changed files with 205 additions and 117 deletions

View File

@@ -1,11 +1,18 @@
/*
* We autoset the CSS to darkmode if no choice is in localstorage
* Else we allow White styles cause it doesnt look too bad
*/
function toggleDarkMode() {
document.body.classList.toggle("dark-mode");
localStorage.setItem("dark-mode", document.body.classList.contains("dark-mode"));
}
// Apply stored preference when the page loads
document.addEventListener("DOMContentLoaded", () => {
if (localStorage.getItem("dark-mode") === "true") {
const stored = localStorage.getItem("dark-mode");
if (stored === null || stored === "true") {
document.body.classList.add("dark-mode");
} else {
document.body.classList.remove("dark-mode");
}
});
});