redesign site as "case file" theme

- new paper/ink palette with single red accent, replacing catppuccin
- self-hosted IBM Plex Serif (display) + Source Serif 4 (body), drop Outfit
- rebuilt homepage masthead, numbered post index, navbar with active states
- switch syntax highlighting + utterances to gruvbox, synced via postMessage
- remove terminal/404 easter egg chrome, clean up remaining inline styles
- fix stray syntax.css link causing a 404
This commit is contained in:
2026-07-16 12:28:34 +03:00
parent 57462869ec
commit a51671d7e4
62 changed files with 2116 additions and 2806 deletions
+25
View File
@@ -60,4 +60,29 @@ document.addEventListener('DOMContentLoaded', () => {
});
// Initial sync in case banner is already mounted
setTimeout(syncCCTheme, 100);
// Sync Utterances (comments iframe) theme with the site theme.
// The iframe only reads its initial `theme` attribute once, so later
// changes must go through postMessage per the utterances protocol.
const syncUtterancesTheme = () => {
const commentsEl = document.getElementById('comments');
const frame = document.querySelector('.utterances-frame');
if (!commentsEl || !frame) return;
const theme = htmlElement.classList.contains('dark')
? commentsEl.dataset.utterancesThemeDark
: commentsEl.dataset.utterancesThemeLight;
frame.contentWindow.postMessage({ type: 'set-theme', theme }, 'https://utteranc.es');
};
new MutationObserver(syncUtterancesTheme).observe(htmlElement, {
attributes: true,
attributeFilter: ['class'],
});
// The iframe loads asynchronously, so poll briefly until it's mounted.
let utterancesTries = 0;
const utterancesPoll = setInterval(() => {
if (document.querySelector('.utterances-frame') || ++utterancesTries > 20) {
clearInterval(utterancesPoll);
syncUtterancesTheme();
}
}, 250);
});