From afca68db7f51c0a94eaf622292745d9e0bbdfb99 Mon Sep 17 00:00:00 2001 From: "betalabor.de" Date: Mon, 27 Apr 2026 21:05:48 +0200 Subject: [PATCH] 1 --- src/pages/cv/[hash].astro | 8 ++++++-- src/pages/editor/[id].astro | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pages/cv/[hash].astro b/src/pages/cv/[hash].astro index c437f46..c87961e 100644 --- a/src/pages/cv/[hash].astro +++ b/src/pages/cv/[hash].astro @@ -245,7 +245,9 @@ const de = lang === "de"; async function printCV(el, title, settings, tpl) { let globalCss = ""; try { - globalCss = await fetch("/styles/global.css").then((r) => r.text()); + globalCss = await fetch( + `${window.location.origin}/styles/global.css`, + ).then((r) => r.text()); } catch (e) {} const inlineStyles = Array.from(document.querySelectorAll("style")) @@ -346,7 +348,9 @@ const de = lang === "de"; // ── HTML Export ─────────────────────────────────────────────── window.exportHTML = async function () { const el = document.getElementById("cv-content"); - const globalCss = await fetch("/styles/global.css") + const globalCss = await fetch( + `${window.location.origin}/styles/global.css`, + ) .then((r) => r.text()) .catch(() => ""); const inlineStyles = Array.from(document.querySelectorAll("style")) diff --git a/src/pages/editor/[id].astro b/src/pages/editor/[id].astro index af04213..8058ad6 100644 --- a/src/pages/editor/[id].astro +++ b/src/pages/editor/[id].astro @@ -496,7 +496,9 @@ function j(v: any) { async function printCV(el, title, settings, tpl) { let globalCss = ""; try { - globalCss = await fetch("/styles/global.css").then((r) => r.text()); + globalCss = await fetch( + `${window.location.origin}/styles/global.css`, + ).then((r) => r.text()); } catch (e) {} const inlineStyles = Array.from(document.querySelectorAll("style")) @@ -596,7 +598,9 @@ function j(v: any) { window.exportHTML = async function () { document.getElementById("export-menu").classList.add("hidden"); const el = document.getElementById("cv-preview"); - const globalCss = await fetch("/styles/global.css") + const globalCss = await fetch( + `${window.location.origin}/styles/global.css`, + ) .then((r) => r.text()) .catch(() => ""); const inlineStyles = Array.from(document.querySelectorAll("style"))