From 6513d2880ec65113152b1786cf984c5a7bcea1c8 Mon Sep 17 00:00:00 2001 From: "betalabor.de" Date: Mon, 27 Apr 2026 21:23:31 +0200 Subject: [PATCH] 22 --- src/pages/cv/[hash].astro | 10 +++------- src/pages/editor/[id].astro | 8 +++----- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/pages/cv/[hash].astro b/src/pages/cv/[hash].astro index c39c721..c88ae82 100644 --- a/src/pages/cv/[hash].astro +++ b/src/pages/cv/[hash].astro @@ -249,16 +249,12 @@ const de = lang === "de"; `${window.location.origin}/styles/global.css`, ).then((r) => r.text()); } catch (e) {} - - // ── NEU: Alle lokalen Link-Stylesheets fetchen (Astro Component CSS) ── + // ── NEU: Astro-generierte CSS-Dateien fetchen ────────────────── const linkedCss = ( await Promise.all( Array.from(document.querySelectorAll('link[rel="stylesheet"]')) .map((l) => l.href) - .filter( - (href) => - href.startsWith(origin) && !href.includes("fonts.googleapis"), - ) + .filter((href) => href.startsWith(origin)) // nur lokale, keine Google Fonts .map((href) => fetch(href) .then((r) => r.text()) @@ -266,7 +262,7 @@ const de = lang === "de"; ), ) ).join("\n"); - + // ─────────────────────────────────────────────────────────────── const inlineStyles = Array.from(document.querySelectorAll("style")) .map((s) => s.textContent) .join("\n"); diff --git a/src/pages/editor/[id].astro b/src/pages/editor/[id].astro index cec4c1d..bcca00f 100644 --- a/src/pages/editor/[id].astro +++ b/src/pages/editor/[id].astro @@ -501,15 +501,12 @@ function j(v: any) { ).then((r) => r.text()); } catch (e) {} - // ── NEU: Alle lokalen Link-Stylesheets fetchen (Astro Component CSS) ── + // ── NEU: Astro-generierte CSS-Dateien fetchen ────────────────── const linkedCss = ( await Promise.all( Array.from(document.querySelectorAll('link[rel="stylesheet"]')) .map((l) => l.href) - .filter( - (href) => - href.startsWith(origin) && !href.includes("fonts.googleapis"), - ) + .filter((href) => href.startsWith(origin)) // nur lokale, keine Google Fonts .map((href) => fetch(href) .then((r) => r.text()) @@ -517,6 +514,7 @@ function j(v: any) { ), ) ).join("\n"); + // ─────────────────────────────────────────────────────────────── const inlineStyles = Array.from(document.querySelectorAll("style")) .map((s) => s.textContent)