From 3b5561ad6aa213aea18119221ba5b818a6e2f0fc Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Fri, 29 Nov 2024 22:22:38 -0600 Subject: [PATCH] feat: font sizing --- scripts/post.js | 6 +++++- styles/post.css | 11 ----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/scripts/post.js b/scripts/post.js index 4a2db53..85fbfae 100644 --- a/scripts/post.js +++ b/scripts/post.js @@ -22,7 +22,11 @@ document.addEventListener("DOMContentLoaded", () => { }); document.addEventListener("DOMContentLoaded", () => { - document.querySelectorAll(".code").forEach(loadCode); + document.querySelectorAll(".code").forEach((e) => { + e.style.display = "flex"; + e.style["justify-content"] = "center"; + loadCode(e); + }); }); async function loadCode(e) { diff --git a/styles/post.css b/styles/post.css index f8f3435..e260b5e 100644 --- a/styles/post.css +++ b/styles/post.css @@ -109,14 +109,3 @@ pre * { .post-article a { text-decoration: underline; } - -.post-code { - display: flex; - justify-content: center; -} - -.language-python, -.language-cpp { - /* override prism.js styles */ - font-size: 0.85em !important; -}