--- import { getCVById, getProfileById } from "../../lib/db"; import { getLang, useT } from "../../lib/i18n"; import { TEMPLATES } from "../../types"; import Template1 from "../../components/templates/Template1.astro"; import Template2 from "../../components/templates/Template2.astro"; import Template3 from "../../components/templates/Template3.astro"; import Template4 from "../../components/templates/Template4.astro"; const { id } = Astro.params; const user = Astro.locals.user; const lang = getLang(Astro.request); const t = useT(lang); const cv = getCVById(id!, user.id); if (!cv) return Astro.redirect("/dashboard"); const profile = getProfileById(cv.profile_id, user.id); if (!profile) return Astro.redirect("/dashboard"); const d = profile.data; const s = cv.settings; const de = lang === "de"; function j(v: any) { return JSON.stringify(v).replace(/ {cv.title} – {t("app.name")}
{cv.title}
{de ? "✏️ Daten bearbeiten" : "✏️ Edit Data"}
{ TEMPLATES.map((tpl) => (
T{tpl.id}
<> {tpl.name}
{tpl.desc}
)) }

{t("settings.primaryColor")}
{t("settings.accentColor")}

{ cv.public && (
) }
{de ? "Vorschau (A4)" : "Preview (A4)"}
{cv.template === 1 && } {cv.template === 2 && } {cv.template === 3 && } {cv.template === 4 && }