Add Zola templates and browser-tested site scaffold

This commit is contained in:
ms2k 2026-09-15 19:30:08 +09:00
commit a33673243e

27
static/post.js Normal file
View file

@ -0,0 +1,27 @@
import mermaid from "/vendor/mermaid/mermaid.esm.min.mjs";
const diagrams = document.querySelectorAll('pre code[data-lang="mermaid"]');
for (const code of diagrams) {
const diagram = document.createElement("div");
diagram.className = "mermaid";
diagram.textContent = code.textContent;
code.parentElement.replaceWith(diagram);
}
mermaid.initialize({
startOnLoad: false,
theme: "neutral",
fontFamily: "Comic Neue",
});
await mermaid.run();
window.MathJax = {
loader: { paths: { fonts: "/vendor/fonts" } },
output: { font: "mathjax-fira" },
chtml: { matchFontHeight: false },
};
const script = document.createElement("script");
script.src = "/vendor/mathjax/tex-chtml-nofont.js";
document.head.append(script);