Merge pull request #499 from PR0M3TH3AN/codex/refactor-blog.js-for-dynamic-styling-and-setup

Refactor blog entry bootstrap
This commit is contained in:
thePR0M3TH3AN authored and GitHub committed 2025-10-13 17:24:10 -04:00
commit 3fba911f9a
2 files changed
+3 -3

No files matched your search

+1 -2
View File
@@ -43,10 +43,9 @@
<script src="./js/tracking.js" defer></script>
<script type="module" crossorigin>
import { bootstrapBlog } from "./js/blog/index.js";
import { initZapthreadsEmbed } from "./js/blog/zapthreadsEmbed.js";
const startBlog = () => {
bootstrapBlog({ initZapthreadsEmbed });
bootstrapBlog();
};
if (document.readyState === "loading") {
+2 -1
View File
@@ -1,5 +1,6 @@
import { createCarousel, advanceSlide, destroyCarousel } from './carousel.js';
import { mountProgressBar } from './progressBar.js';
import { initZapthreadsEmbed as defaultInitZapthreadsEmbed } from './zapthreadsEmbed.js';
import { applyDynamicStyles } from '../ui/styleSystem.js';
const CAROUSEL_AUTOPLAY_INTERVAL = 8000;
@@ -527,7 +528,7 @@ function initializeZapthreads({ registerCleanup, isDestroyed, initZapthreadsEmbe
});
}
function mountBlogApp({ initZapthreadsEmbed } = {}) {
function mountBlogApp({ initZapthreadsEmbed = defaultInitZapthreadsEmbed } = {}) {
const runtime = {
destroyed: false,
cleanupCallbacks: new Set(),