This commit is contained in:
betalabor.de
2026-04-27 21:05:48 +02:00
parent fe7cbf78c1
commit afca68db7f
2 changed files with 12 additions and 4 deletions

View File

@@ -245,7 +245,9 @@ const de = lang === "de";
async function printCV(el, title, settings, tpl) { async function printCV(el, title, settings, tpl) {
let globalCss = ""; let globalCss = "";
try { 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) {} } catch (e) {}
const inlineStyles = Array.from(document.querySelectorAll("style")) const inlineStyles = Array.from(document.querySelectorAll("style"))
@@ -346,7 +348,9 @@ const de = lang === "de";
// ── HTML Export ─────────────────────────────────────────────── // ── HTML Export ───────────────────────────────────────────────
window.exportHTML = async function () { window.exportHTML = async function () {
const el = document.getElementById("cv-content"); 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()) .then((r) => r.text())
.catch(() => ""); .catch(() => "");
const inlineStyles = Array.from(document.querySelectorAll("style")) const inlineStyles = Array.from(document.querySelectorAll("style"))

View File

@@ -496,7 +496,9 @@ function j(v: any) {
async function printCV(el, title, settings, tpl) { async function printCV(el, title, settings, tpl) {
let globalCss = ""; let globalCss = "";
try { 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) {} } catch (e) {}
const inlineStyles = Array.from(document.querySelectorAll("style")) const inlineStyles = Array.from(document.querySelectorAll("style"))
@@ -596,7 +598,9 @@ function j(v: any) {
window.exportHTML = async function () { window.exportHTML = async function () {
document.getElementById("export-menu").classList.add("hidden"); document.getElementById("export-menu").classList.add("hidden");
const el = document.getElementById("cv-preview"); 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()) .then((r) => r.text())
.catch(() => ""); .catch(() => "");
const inlineStyles = Array.from(document.querySelectorAll("style")) const inlineStyles = Array.from(document.querySelectorAll("style"))