Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f2953dd18f | ||
|
|
1af55d3b05 | ||
|
|
aee6bec940 | ||
|
|
0c4274d87b | ||
|
|
b88a88b225 | ||
|
|
4a2a84b36f | ||
|
|
a4173f90b6 | ||
|
|
3944c6a4b0 | ||
|
|
1ab693175e | ||
|
|
2b7866d4c5 |
@@ -5,7 +5,10 @@ const config: NextConfig = {
|
||||
output: "standalone",
|
||||
poweredByHeader: false,
|
||||
// The fonts of the share preview images are read from disk at run time.
|
||||
outputFileTracingIncludes: { "/s/[slug]/kep/[file]": ["./src/assets/og/*.ttf"] },
|
||||
outputFileTracingIncludes: {
|
||||
"/s/[slug]/kep/[file]": ["./src/assets/og/*.ttf"],
|
||||
"/kep/fooldal.png": ["./src/assets/og/*.ttf"],
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
|
||||
@@ -2,7 +2,7 @@ import Link from "next/link";
|
||||
|
||||
import { ChartWheel } from "@/components/ChartWheel";
|
||||
import { Rich } from "@/components/Rich";
|
||||
import { Logo } from "@/components/SiteHeader";
|
||||
import { Logo, PublicHeader } from "@/components/SiteHeader";
|
||||
import { Waitlist } from "@/components/Waitlist";
|
||||
import example from "@/content/pelda.json";
|
||||
import type { AnalysisContent, ChartResult } from "@/lib/types";
|
||||
@@ -60,18 +60,7 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
|
||||
return (
|
||||
<div className="lp">
|
||||
<header className="site-header lp-header">
|
||||
<Logo />
|
||||
<nav className="nav lp-nav" aria-label="Fő navigáció">
|
||||
<a href="#elemzes">Elemzés</a>
|
||||
<a href="#elorejelzes">Előrejelzés</a>
|
||||
<a href="#osszevetes">Összevetés</a>
|
||||
<Link href="/pelda">Példa</Link>
|
||||
</nav>
|
||||
<Link href="/belepes" className="btn btn-sm">
|
||||
Belépés
|
||||
</Link>
|
||||
</header>
|
||||
<PublicHeader onHome />
|
||||
|
||||
<section className="lp-hero">
|
||||
<svg className="lp-stars" aria-hidden="true" viewBox="0 0 1000 600" preserveAspectRatio="xMidYMid slice">
|
||||
@@ -91,6 +80,10 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
Add meg, mikor és hol születtél: percre pontosan kiszámoljuk a képletedet, és személyre szóló elemzést írunk
|
||||
belőle. Megmutatjuk, mit hoz az éved, és mennyire illetek össze azzal, akit szeretsz.
|
||||
</p>
|
||||
<p className="ai-line lp-ai-line lp-rise lp-r3">
|
||||
Részletes elemzések a legfejlettebb AI-modellekkel: egy tapasztalt asztrológushoz közelítő mélység, töredék
|
||||
áron.
|
||||
</p>
|
||||
<div className="lp-actions lp-rise lp-r4">
|
||||
<Link href="/belepes" className="btn btn-primary lp-btn">
|
||||
{signIn}
|
||||
@@ -139,6 +132,53 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="lp-band lp-why" aria-labelledby="why-title">
|
||||
<div className="lp-wrap lp-stack">
|
||||
<div className="lp-intro">
|
||||
<span className="eyebrow">Miért más?</span>
|
||||
<h2 id="why-title" className="lp-h2">
|
||||
Egy asztrológus mélysége, töredék áron
|
||||
</h2>
|
||||
</div>
|
||||
<ul className="lp-why-grid">
|
||||
<li className="card lp-why-card">
|
||||
<svg aria-hidden="true" viewBox="0 0 24 24" className="lp-why-icon">
|
||||
<path d="M12 3l1.8 4.6L18.5 9l-4.7 1.6L12 15l-1.8-4.4L5.5 9l4.7-1.4z" />
|
||||
<path d="M18 15l.9 2.1L21 18l-2.1.9L18 21l-.9-2.1L15 18l2.1-.9z" />
|
||||
</svg>
|
||||
<h3 className="lp-step-title">A legfejlettebb AI-modellek</h3>
|
||||
<p className="lp-small">
|
||||
Az elemzéseket a legújabb, legnagyobb nyelvi modellek írják, a te képleted pontosan kiszámolt adataiból. Nem
|
||||
sablonszövegekből rakjuk össze: minden mondat a te képletedről szól.
|
||||
</p>
|
||||
</li>
|
||||
<li className="card lp-why-card">
|
||||
<svg aria-hidden="true" viewBox="0 0 24 24" className="lp-why-icon">
|
||||
<circle cx="12" cy="12" r="9" />
|
||||
<circle cx="12" cy="12" r="4" />
|
||||
<path d="M12 3v5M12 16v5M3 12h5M16 12h5" />
|
||||
</svg>
|
||||
<h3 className="lp-step-title">Asztrológusi mélység</h3>
|
||||
<p className="lp-small">
|
||||
A bolygókat jegyükben, házukban, fényszögeikben és uralkodóik láncolatában olvassa, a holdcsomópontokkal és
|
||||
az év tranzitjaival együtt, ahogy egy tapasztalt asztrológus is tenné.
|
||||
</p>
|
||||
</li>
|
||||
<li className="card lp-why-card">
|
||||
<svg aria-hidden="true" viewBox="0 0 24 24" className="lp-why-icon">
|
||||
<path d="M4 7h16M4 12h10M4 17h6" />
|
||||
<path d="M17 14l3 3-3 3" />
|
||||
</svg>
|
||||
<h3 className="lp-step-title">Töredék áron, azonnal</h3>
|
||||
<p className="lp-small">
|
||||
Egy személyes asztrológiai konzultáció ára sokszorosa egy részletes elemzésnek, és napokat kell rá várni. Itt
|
||||
percek alatt kész, és amit nem értesz, rá is kérdezhetsz.
|
||||
</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="lp-band lp-alt">
|
||||
<div className="lp-wrap lp-two">
|
||||
<div className="lp-intro">
|
||||
@@ -407,6 +447,9 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
<nav aria-label="Lábléc" className="lp-footer-nav">
|
||||
<Link href="/pelda">Példaelemzés</Link>
|
||||
<Link href="/adatvedelem">Adatvédelem</Link>
|
||||
<Link href="/privacy" lang="en">
|
||||
Privacy Policy
|
||||
</Link>
|
||||
<Link href="/belepes">Belépés</Link>
|
||||
</nav>
|
||||
<span className="hint">© {new Date().getFullYear()} Sorsfonalak</span>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
|
||||
import { Logo } from "@/components/SiteHeader";
|
||||
import { OPERATOR, PRIVACY_UPDATED } from "@/lib/legal";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { OPERATOR, PRIVACY_UPDATED, operatorDetails } from "@/lib/legal";
|
||||
import { getMe } from "@/lib/server";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
@@ -16,22 +16,31 @@ export default async function PrivacyPage() {
|
||||
return (
|
||||
<>
|
||||
{!me && (
|
||||
<header className="site-header">
|
||||
<Logo />
|
||||
</header>
|
||||
<PublicHeader />
|
||||
)}
|
||||
<main className="page legal">
|
||||
<div className="page-head">
|
||||
<h1>Adatvédelmi tájékoztató</h1>
|
||||
<p className="muted">Hatályos: {PRIVACY_UPDATED}</p>
|
||||
<p className="muted">
|
||||
Hatályos: {PRIVACY_UPDATED} · <Link href="/privacy" lang="en">English version</Link>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h2>1. Ki kezeli az adataidat?</h2>
|
||||
<p>
|
||||
A Sorsfonalak szolgáltatás (sorsfonalak.hu) adatkezelője: <strong>{OPERATOR.name}</strong>, {OPERATOR.address}
|
||||
{OPERATOR.registration ? `, ${OPERATOR.registration}` : ""}. Adatvédelmi kérdésekben itt érsz el minket:{" "}
|
||||
<strong>{OPERATOR.email}</strong>.
|
||||
{operatorDetails() ? (
|
||||
<>
|
||||
A Sorsfonalak szolgáltatás (sorsfonalak.hu) adatkezelője: <strong>{operatorDetails()}</strong>.{" "}
|
||||
</>
|
||||
) : (
|
||||
"A Sorsfonalak szolgáltatás (sorsfonalak.hu) adatkezelőjét e-mailben éred el. "
|
||||
)}
|
||||
Adatvédelmi és minden más kérdésben itt érsz el minket:{" "}
|
||||
<a href={`mailto:${OPERATOR.email}`}>
|
||||
<strong>{OPERATOR.email}</strong>
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
@@ -65,7 +74,7 @@ export default async function PrivacyPage() {
|
||||
<tr>
|
||||
<td>Az általad felvett személyek neve és születési adatai</td>
|
||||
<td>Az ő képletük és elemzésük elkészítése a kérésedre</td>
|
||||
<td>Szerződés teljesítése; a felvételhez az érintett beleegyezése szükséges (lásd 4. pont)</td>
|
||||
<td>Szerződés teljesítése; a felvételhez az érintett beleegyezése szükséges (lásd 5. pont)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>A képletek és az elkészült elemzések</td>
|
||||
@@ -107,7 +116,52 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>3. Az elemzések és a mesterséges intelligencia</h2>
|
||||
<h2>3. A Google-fiókodból kapott adatok</h2>
|
||||
<p>
|
||||
A belépéshez a „Bejelentkezés Google-fiókkal” szolgáltatást használjuk, az <code>openid</code>,{" "}
|
||||
<code>email</code> és <code>profile</code> engedélyekkel. Belépéskor a Google ezeket adja át nekünk:
|
||||
</p>
|
||||
<ul>
|
||||
<li>a Google-fiókod egyedi azonosítóját,</li>
|
||||
<li>az e-mail-címedet és azt, hogy a Google igazolta-e,</li>
|
||||
<li>a nevedet,</li>
|
||||
<li>a nyelvi beállításodat.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<strong>Mire használjuk:</strong> a fiókod létrehozására és arra, hogy belépéskor felismerjünk; az
|
||||
e-mail-címedet a rendszerlevelekhez (például ha elkészült egy elemzésed vagy elfogadták a meghívódat); a
|
||||
nevedet a megjelenítéshez; a nyelvet az oldal és az elemzések nyelvéhez.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Amit nem teszünk:</strong> más Google-adatodhoz (Gmail, Drive, naptár, névjegyek, fényképek) nem férünk
|
||||
hozzá, és a nevedben semmilyen Google-szolgáltatást nem használunk. A Google-től kapott adatokat nem adjuk el,
|
||||
nem használjuk hirdetésre vagy profilalkotásra, nem adjuk át harmadik félnek (kivéve a tárolást és a
|
||||
levélküldést végző adatfeldolgozókat, lásd 6. pont), és a mesterséges intelligenciának sem küldjük el.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Meddig és hogyan törölheted:</strong> a fiókod törléséig őrizzük. A fiókodat és minden adatodat a{" "}
|
||||
<Link href="/profil#adataim">Profil</Link> oldalon bármikor törölheted. A Sorsfonalak hozzáférését a
|
||||
Google-fiókodban is visszavonhatod:{" "}
|
||||
<a href="https://myaccount.google.com/permissions" target="_blank" rel="noopener noreferrer">
|
||||
myaccount.google.com/permissions
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
<p>
|
||||
A Google API-kból kapott adatok felhasználása és továbbítása megfelel a{" "}
|
||||
<a
|
||||
href="https://developers.google.com/terms/api-services-user-data-policy"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Google API Services User Data Policy
|
||||
</a>{" "}
|
||||
szabályzatnak, beleértve a „Limited Use” (korlátozott felhasználás) követelményeit.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>4. Az elemzések és a mesterséges intelligencia</h2>
|
||||
<p>
|
||||
A rövid összefoglalót és a részletes elemzést nagy nyelvi modell (mesterséges intelligencia) írja. A
|
||||
modellhez <strong>csak a képlet csillagászati adatai</strong> jutnak el (a bolygók jegye, foka, háza és
|
||||
@@ -118,7 +172,7 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>4. Más emberek adatai</h2>
|
||||
<h2>5. Más emberek adatai</h2>
|
||||
<p>
|
||||
Ha valaki más (például társad vagy családtagod) születési adatait veszed fel, kérjük, csak az ő
|
||||
beleegyezésével tedd. Az ő adatait kizárólag te látod; tőlünk senki más nem kapja meg. Az általad felvett
|
||||
@@ -127,7 +181,7 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>5. Kik férnek hozzá az adatokhoz? (adatfeldolgozók)</h2>
|
||||
<h2>6. Kik férnek hozzá az adatokhoz? (adatfeldolgozók)</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>DigitalOcean, LLC</strong> – a szerverek üzemeltetése; az adatok az Európai Unióban (Amszterdam)
|
||||
@@ -145,9 +199,8 @@ export default async function PrivacyPage() {
|
||||
az Európai Unióban (Frankfurt).
|
||||
</li>
|
||||
<li>
|
||||
<strong>OpenRouter, Inc.</strong> és az általa elért modellszolgáltató (jelenleg{" "}
|
||||
<strong>Anthropic PBC</strong>) – az elemzések megírása, kizárólag a 3. pontban leírt csillagászati
|
||||
adatokból.
|
||||
<strong>OpenRouter, Inc.</strong> és az általa elért mesterségesintelligencia-szolgáltatók – az elemzések
|
||||
megírása, kizárólag a 4. pontban leírt csillagászati adatokból (személyes adat nem jut el hozzájuk).
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
@@ -158,7 +211,7 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>6. Meddig őrizzük az adatokat?</h2>
|
||||
<h2>7. Meddig őrizzük az adatokat?</h2>
|
||||
<ul>
|
||||
<li>Fiókod adatait, képleteidet és elemzéseidet a fiókod törléséig.</li>
|
||||
<li>A biztonsági mentésekből a törölt adatok legkésőbb 14 nap után tűnnek el.</li>
|
||||
@@ -173,7 +226,7 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>7. Sütik</h2>
|
||||
<h2>8. Sütik</h2>
|
||||
<p>
|
||||
Csak egy, a működéshez feltétlenül szükséges sütit használunk (<code>sf_session</code>), amely belépve
|
||||
tart. Reklám- vagy követő sütiket, illetve látogatottságmérőt nem használunk.
|
||||
@@ -181,7 +234,7 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>8. A jogaid</h2>
|
||||
<h2>9. A jogaid</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Hozzáférés és adathordozhatóság:</strong> a <Link href="/profil#adataim">Profil</Link> oldalon
|
||||
@@ -208,12 +261,12 @@ export default async function PrivacyPage() {
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>9. Korhatár</h2>
|
||||
<h2>10. Korhatár</h2>
|
||||
<p>A szolgáltatást 16 éven felüliek használhatják.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>10. Változások</h2>
|
||||
<h2>11. Változások</h2>
|
||||
<p>
|
||||
Ha a tájékoztató lényegesen változik, a belépéskor vagy e-mailben jelezzük. A mindenkori változat ezen az
|
||||
oldalon olvasható.
|
||||
|
||||
@@ -914,3 +914,9 @@ a.pair-row:hover strong { color: var(--gold); }
|
||||
.mode-option:disabled:hover { border-color: var(--line-2); }
|
||||
.mode-soon { margin-left: 8px; vertical-align: middle; font-family: var(--font-body); font-size: 11px; }
|
||||
.invite-soon .btn:disabled { cursor: not-allowed; }
|
||||
|
||||
/* Home page: the AI line and "why it is different" */
|
||||
.lp-ai-line { font-size: 16px; max-width: 540px; }
|
||||
.lp-why-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 24px; }
|
||||
.lp-why-card { gap: 12px; padding: 28px; }
|
||||
.lp-why-icon { width: 36px; height: 36px; fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
// The link preview image of the home page (og:image), drawn from the example
|
||||
// chart. The page links it with a version (?v=…), so a new design is fetched
|
||||
// again; until then it is kept long.
|
||||
import example from "@/content/pelda.json";
|
||||
import { chartCard } from "@/lib/ogCard";
|
||||
import type { ChartResult } from "@/lib/types";
|
||||
|
||||
export async function GET() {
|
||||
return chartCard({
|
||||
chart: example.chart as unknown as ChartResult,
|
||||
timeKnown: true,
|
||||
eyebrow: "KÉPLET · ELŐREJELZÉS · KAPCSOLAT",
|
||||
title: "Ahol a csillagok összekötnek.",
|
||||
text: "Percre pontos születési képlet és személyre szóló elemzés. Mit hoz az éved, és mennyire illetek össze azzal, akit szeretsz?",
|
||||
lines: [
|
||||
{ glyph: "☉", label: "Képletelemzés" },
|
||||
{ glyph: "♃", label: "Éves előrejelzés" },
|
||||
{ glyph: "♀", label: "Kapcsolati összevetés" },
|
||||
],
|
||||
cacheControl: "public, max-age=86400, s-maxage=604800",
|
||||
});
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
|
||||
import { GoogleLogin } from "@/app/belepes/GoogleLogin";
|
||||
import { Logo } from "@/components/SiteHeader";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { formatDate } from "@/lib/astro";
|
||||
import { BACKEND_URL, getMe } from "@/lib/server";
|
||||
import type { PersonInviteLanding, PublicConfig } from "@/lib/types";
|
||||
@@ -65,9 +65,7 @@ export default async function PersonInvitePage({ params }: { params: Promise<{ t
|
||||
return (
|
||||
<>
|
||||
{!me && (
|
||||
<header className="site-header">
|
||||
<Logo />
|
||||
</header>
|
||||
<PublicHeader />
|
||||
)}
|
||||
<main className="page" style={{ maxWidth: 720 }}>
|
||||
<div className="page-head">
|
||||
|
||||
@@ -2,22 +2,34 @@ import type { Metadata } from "next";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { BACKEND_URL, getMe } from "@/lib/server";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
import type { PublicConfig } from "@/lib/types";
|
||||
|
||||
import { Landing } from "./Landing";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: { absolute: "Sorsfonalak – születési képlet, éves előrejelzés, kapcsolati összevetés" },
|
||||
description:
|
||||
"Percre pontos születési képlet és személyre szóló elemzés, éves előrejelzés és kapcsolati összevetés: mennyire illetek össze?",
|
||||
openGraph: {
|
||||
type: "website",
|
||||
siteName: "Sorsfonalak",
|
||||
locale: "hu_HU",
|
||||
title: "Sorsfonalak – ahol a csillagok összekötnek",
|
||||
description: "Születési képlet, részletes elemzés, éves előrejelzés és kapcsolati összevetés.",
|
||||
},
|
||||
};
|
||||
/** Bumped when the preview image changes, so Facebook and co. fetch it again. */
|
||||
const PREVIEW_VERSION = 1;
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const base = await siteUrl();
|
||||
const title = "Sorsfonalak – ahol a csillagok összekötnek";
|
||||
const description =
|
||||
"Születési képlet, részletes elemzés, éves előrejelzés és kapcsolati összevetés a legfejlettebb AI-modellekkel, töredék áron.";
|
||||
const image = {
|
||||
url: `${base}/kep/fooldal.png?v=${PREVIEW_VERSION}`,
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: "Egy példa születési képlet a Sorsfonalakon",
|
||||
};
|
||||
return {
|
||||
title: { absolute: "Sorsfonalak – születési képlet, éves előrejelzés, kapcsolati összevetés" },
|
||||
description:
|
||||
"Percre pontos születési képlet és személyre szóló elemzés a legfejlettebb AI-modellekkel: egy tapasztalt asztrológushoz közelítő mélység, töredék áron. Éves előrejelzés és kapcsolati összevetés.",
|
||||
alternates: { canonical: `${base}/` },
|
||||
openGraph: { type: "website", siteName: "Sorsfonalak", locale: "hu_HU", url: `${base}/`, title, description, images: [image] },
|
||||
twitter: { card: "summary_large_image", title, description, images: [image.url] },
|
||||
};
|
||||
}
|
||||
|
||||
async function signupMode(): Promise<PublicConfig["signup_mode"]> {
|
||||
try {
|
||||
|
||||
@@ -4,7 +4,7 @@ import Link from "next/link";
|
||||
import { AnalysisView } from "@/components/AnalysisView";
|
||||
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
||||
import { Rich } from "@/components/Rich";
|
||||
import { Logo } from "@/components/SiteHeader";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import example from "@/content/pelda.json";
|
||||
import { getMe } from "@/lib/server";
|
||||
import type { AnalysisContent, ChartResult } from "@/lib/types";
|
||||
@@ -21,9 +21,7 @@ export default async function ExamplePage() {
|
||||
return (
|
||||
<>
|
||||
{!me && (
|
||||
<header className="site-header">
|
||||
<Logo />
|
||||
</header>
|
||||
<PublicHeader current="pelda" />
|
||||
)}
|
||||
<main className="page" style={{ maxWidth: 1180 }}>
|
||||
<div className="page-head">
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { OPERATOR, PRIVACY_UPDATED_EN, operatorDetails } from "@/lib/legal";
|
||||
import { getMe } from "@/lib/server";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Privacy Policy",
|
||||
description: "How Sorsfonalak handles your personal data, including the data received from your Google account.",
|
||||
};
|
||||
|
||||
const DATA: [string, string, string][] = [
|
||||
[
|
||||
"Your Google account's name, e-mail address and ID (passed on by Google when you sign in)",
|
||||
"Creating your account, signing you in, contacting you",
|
||||
"Performance of a contract (GDPR Art. 6(1)(b))",
|
||||
],
|
||||
["Display name, the language of your readings", "Personalising the service", "Performance of a contract"],
|
||||
[
|
||||
"Your birth data: date, time and place",
|
||||
"Calculating your birth chart and writing your readings",
|
||||
"Performance of a contract",
|
||||
],
|
||||
[
|
||||
"Names and birth data of the people you add",
|
||||
"Their charts and readings, at your request",
|
||||
"Performance of a contract; adding someone requires their consent (see section 5)",
|
||||
],
|
||||
["Your charts and finished readings", "So you can look at them again at any time", "Performance of a contract"],
|
||||
[
|
||||
"Your purchases and used allowances (readings, persons)",
|
||||
"Providing the purchased service, accounting",
|
||||
"Performance of a contract; legal obligation (Art. 6(1)(c))",
|
||||
],
|
||||
[
|
||||
"An invitee's e-mail address, the inviter's name and personal message",
|
||||
"Sending the invitation; while the site is invitation-only, only invitees can sign up",
|
||||
"Legitimate interest (Art. 6(1)(f))",
|
||||
],
|
||||
[
|
||||
"The e-mail address given on the waitlist",
|
||||
"Telling you when the site opens or an invitation is sent",
|
||||
"Consent (Art. 6(1)(a))",
|
||||
],
|
||||
[
|
||||
"Addresses that opted out of invitations (only a one-way hash of the address)",
|
||||
"Not sending further invitations to them",
|
||||
"Legitimate interest (Art. 6(1)(f))",
|
||||
],
|
||||
[
|
||||
"IP address, browser details, request times (server logs)",
|
||||
"Security, troubleshooting, preventing abuse",
|
||||
"Legitimate interest (Art. 6(1)(f))",
|
||||
],
|
||||
];
|
||||
|
||||
/** The privacy policy in English (the Hungarian one at /adatvedelem is the same in content). */
|
||||
export default async function PrivacyPolicyPage() {
|
||||
const me = await getMe();
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
<main className="page legal" lang="en">
|
||||
<div className="page-head">
|
||||
<h1>Privacy Policy</h1>
|
||||
<p className="muted">
|
||||
Effective: {PRIVACY_UPDATED_EN} ·{" "}
|
||||
<Link href="/adatvedelem" lang="hu">
|
||||
Magyar változat
|
||||
</Link>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
<h2>1. Who is responsible for your data?</h2>
|
||||
<p>
|
||||
{operatorDetails() ? (
|
||||
<>
|
||||
The controller of the Sorsfonalak service (sorsfonalak.hu) is <strong>{operatorDetails()}</strong>.{" "}
|
||||
</>
|
||||
) : (
|
||||
"The controller of the Sorsfonalak service (sorsfonalak.hu) can be reached by e-mail. "
|
||||
)}
|
||||
For any privacy or other question, contact us at{" "}
|
||||
<a href={`mailto:${OPERATOR.email}`}>
|
||||
<strong>{OPERATOR.email}</strong>
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>2. What data we process and why</h2>
|
||||
<div className="table-wrap">
|
||||
<table className="legal-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Data</th>
|
||||
<th>Purpose</th>
|
||||
<th>Legal basis</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{DATA.map(([data, purpose, basis]) => (
|
||||
<tr key={data}>
|
||||
<td>{data}</td>
|
||||
<td>{purpose}</td>
|
||||
<td>{basis}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<p>
|
||||
We do not process or store card details; payments, once available, will be handled by an external payment
|
||||
provider, named here.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>3. Data we receive from your Google account</h2>
|
||||
<p>
|
||||
We use “Sign in with Google” with the <code>openid</code>, <code>email</code> and <code>profile</code>{" "}
|
||||
scopes. When you sign in, Google passes us:
|
||||
</p>
|
||||
<ul>
|
||||
<li>your Google account's unique ID,</li>
|
||||
<li>your e-mail address and whether Google has verified it,</li>
|
||||
<li>your name,</li>
|
||||
<li>your language setting.</li>
|
||||
</ul>
|
||||
<p>
|
||||
<strong>How we use it:</strong> to create your account and recognise you when you sign in; your e-mail address
|
||||
for service e-mails (for example when a reading is ready or an invitation was accepted); your name for display;
|
||||
your language for the language of the site and your readings.
|
||||
</p>
|
||||
<p>
|
||||
<strong>What we do not do:</strong> we have no access to any other Google data (Gmail, Drive, Calendar,
|
||||
contacts, photos), and we do not use any Google service on your behalf. We do not sell the data received from
|
||||
Google, do not use it for advertising or profiling, do not share it with third parties (except the processors
|
||||
that store it and send e-mails, see section 6), and do not send it to artificial intelligence.
|
||||
</p>
|
||||
<p>
|
||||
<strong>Retention and deletion:</strong> we keep it until you delete your account. You can delete your account
|
||||
and all your data at any time on the <Link href="/profil#adataim">Profile</Link> page, and revoke
|
||||
Sorsfonalak's access in your Google account at{" "}
|
||||
<a href="https://myaccount.google.com/permissions" target="_blank" rel="noopener noreferrer">
|
||||
myaccount.google.com/permissions
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
<p>
|
||||
Sorsfonalak's use and transfer of information received from Google APIs adheres to the{" "}
|
||||
<a
|
||||
href="https://developers.google.com/terms/api-services-user-data-policy"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Google API Services User Data Policy
|
||||
</a>
|
||||
, including the Limited Use requirements.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>4. Readings and artificial intelligence</h2>
|
||||
<p>
|
||||
The short summary and the detailed reading are written by a large language model (artificial intelligence).
|
||||
Only the <strong>astronomical data of the chart</strong> reach the model (the signs, degrees, houses and
|
||||
aspects of the planets). We never send your name, e-mail address, birth date, time or place. The readings are
|
||||
for entertainment and self-reflection and are not medical, financial, legal or other professional advice.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>5. Other people's data</h2>
|
||||
<p>
|
||||
If you add someone else's birth data (for example your partner's or a family member's), please
|
||||
do so only with their consent. Only you see their data; nobody else receives it from us. You can delete a
|
||||
person you added at any time, which also deletes their chart and readings.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>6. Who has access to the data (processors)</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>DigitalOcean, LLC</strong>: hosting the servers; the data is stored in the European Union
|
||||
(Amsterdam).
|
||||
</li>
|
||||
<li>
|
||||
<strong>Cloudflare, Inc.</strong>: delivering traffic and protecting against attacks; processes your IP
|
||||
address and request data when the site loads.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Google LLC</strong>: signing in with a Google account.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Amazon Web Services EMEA SARL</strong> (Amazon SES): delivering service e-mails and invitations; in
|
||||
the European Union (Frankfurt).
|
||||
</li>
|
||||
<li>
|
||||
<strong>OpenRouter, Inc.</strong> and the artificial intelligence providers it reaches: writing the readings,
|
||||
only from the astronomical data described in section 4 (no personal data reaches them).
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
Some of these providers operate in the United States. Transfers are based on the EU–US Data Privacy Framework
|
||||
or the European Commission's Standard Contractual Clauses (SCC).
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>7. How long we keep data</h2>
|
||||
<ul>
|
||||
<li>Your account data, charts and readings: until you delete your account.</li>
|
||||
<li>Deleted data disappears from backups within 14 days.</li>
|
||||
<li>Server logs: at most 30 days.</li>
|
||||
<li>
|
||||
Invitations not accepted: deleted 30 days after they expire or are revoked. Every invitation e-mail has an
|
||||
unsubscribe link.
|
||||
</li>
|
||||
<li>Waitlist addresses: until you sign up, or until you ask us to delete them.</li>
|
||||
<li>Data needed for invoicing: for the period required by accounting law (8 years).</li>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>8. Cookies</h2>
|
||||
<p>
|
||||
We use a single cookie that is strictly necessary for the service (<code>sf_session</code>), which keeps you
|
||||
signed in. We use no advertising or tracking cookies and no analytics.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>9. Your rights</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<strong>Access and portability:</strong> download all your data with one click on the{" "}
|
||||
<Link href="/profil#adataim">Profile</Link> page.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Rectification:</strong> change your name and birth data on the Profile page.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Erasure:</strong> delete your account and all your data on the Profile page.
|
||||
</li>
|
||||
<li>
|
||||
<strong>Restriction and objection:</strong> ask us at the e-mail address above.
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
We answer within one month. If you think we have violated your rights, you can lodge a complaint with the
|
||||
Hungarian National Authority for Data Protection and Freedom of Information (NAIH, 1055 Budapest, Falk Miksa
|
||||
utca 9–11.,{" "}
|
||||
<a href="https://naih.hu" target="_blank" rel="noopener noreferrer">
|
||||
naih.hu
|
||||
</a>
|
||||
) or go to court.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>10. Age limit</h2>
|
||||
<p>The service is for people over 16.</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>11. Changes</h2>
|
||||
<p>
|
||||
If this policy changes materially, we will tell you when you sign in or by e-mail. The current version is
|
||||
always on this page.
|
||||
</p>
|
||||
</section>
|
||||
</main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -16,7 +16,7 @@ export function AccountData() {
|
||||
setError(null);
|
||||
try {
|
||||
await api("/me", { method: "DELETE", body: { confirm: "DELETE" } });
|
||||
window.location.href = "/belepes";
|
||||
window.location.href = "/";
|
||||
} catch (e) {
|
||||
setError(errorText(e));
|
||||
setBusy(false);
|
||||
|
||||
@@ -1,108 +1,27 @@
|
||||
// The link preview image of a shared chart (og:image): 1200×630 PNG with the
|
||||
// wheel, the title and the text of the short summary. The file name carries
|
||||
// a version (see `imageVersion`), so a rewritten summary gets a new address
|
||||
// and Facebook and co. fetch it again.
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
|
||||
import { ImageResponse } from "next/og";
|
||||
|
||||
// The link preview image of a shared chart (og:image): the wheel, the title
|
||||
// and the text of the short summary. The file name carries a version (see
|
||||
// `imageVersion`), so a rewritten summary gets a new address and Facebook and
|
||||
// co. fetch it again.
|
||||
import { SIGNS, signName } from "@/lib/astro";
|
||||
import { chartCard } from "@/lib/ogCard";
|
||||
import { bigThree, loadShare, plain, shorten } from "@/lib/share";
|
||||
import { wheelSvg } from "@/lib/wheelSvg";
|
||||
|
||||
const W = 1200;
|
||||
const H = 630;
|
||||
const WHEEL = 590;
|
||||
|
||||
const FONTS = join(process.cwd(), "src/assets/og");
|
||||
let fonts: Promise<{ name: string; data: Buffer; weight: 400 | 600; style: "normal" }[]> | null = null;
|
||||
|
||||
function loadFonts() {
|
||||
fonts ??= Promise.all(
|
||||
(
|
||||
[
|
||||
["Cormorant Garamond", "CormorantGaramond-SemiBold.ttf", 600],
|
||||
["Inter", "Inter-Regular.ttf", 400],
|
||||
["Inter", "Inter-SemiBold.ttf", 600],
|
||||
["DejaVu Sans", "DejaVuSans.ttf", 400],
|
||||
] as const
|
||||
).map(async ([name, file, weight]) => ({
|
||||
name,
|
||||
data: await readFile(join(FONTS, file)),
|
||||
weight,
|
||||
style: "normal" as const,
|
||||
})),
|
||||
);
|
||||
return fonts;
|
||||
}
|
||||
|
||||
// Letters, digits, punctuation and spaces only: a character missing from the
|
||||
// fonts would make the renderer download a font from the internet.
|
||||
const printable = (s: string) => s.replace(/[^\p{L}\p{N}\p{P}\p{Zs}+=<>°]/gu, "");
|
||||
|
||||
export async function GET(_req: Request, { params }: { params: Promise<{ slug: string; file: string }> }) {
|
||||
const { slug } = await params;
|
||||
const share = await loadShare(slug);
|
||||
const chart = share?.chart?.chart;
|
||||
if (!share || !chart) return new Response("Not found", { status: 404 });
|
||||
|
||||
const title = printable(share.summary?.title ?? "Születési képlet");
|
||||
const text = printable(shorten(plain(share.summary?.summary ?? ""), 280));
|
||||
const svg = wheelSvg(chart, chart.time_known, WHEEL);
|
||||
const trio = bigThree(chart);
|
||||
|
||||
const image = new ImageResponse(
|
||||
(
|
||||
<div style={{ display: "flex", width: W, height: H, background: "#0d1220", color: "#ece6d8", fontFamily: "Inter" }}>
|
||||
<div style={{ display: "flex", width: WHEEL + 40, height: H, alignItems: "center", justifyContent: "center" }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={`data:image/svg+xml;base64,${Buffer.from(svg).toString("base64")}`}
|
||||
width={WHEEL}
|
||||
height={WHEEL}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
flex: 1,
|
||||
padding: "56px 56px 44px 8px",
|
||||
gap: 18,
|
||||
}}
|
||||
>
|
||||
<div style={{ display: "flex", fontSize: 17, fontWeight: 600, letterSpacing: 2.5, color: "#d9b46a" }}>
|
||||
SZÜLETÉSI KÉPLET · RÖVIDEN
|
||||
</div>
|
||||
<div style={{ display: "flex", fontFamily: "Cormorant Garamond", fontSize: 56, lineHeight: 1.05 }}>{title}</div>
|
||||
{text && <div style={{ display: "flex", fontSize: 23, lineHeight: 1.45, color: "#c9cfdc" }}>{text}</div>}
|
||||
<div style={{ display: "flex", marginTop: "auto", gap: 22, fontSize: 21, color: "#c9cfdc" }}>
|
||||
{trio.map((t) => (
|
||||
<div key={t.label} style={{ display: "flex", alignItems: "center", gap: 8 }}>
|
||||
<span style={{ fontFamily: "DejaVu Sans", color: "#d9b46a" }}>
|
||||
{(SIGNS[t.sign]?.glyph ?? "").replace(/︎/g, "")}
|
||||
</span>
|
||||
<span>
|
||||
{t.label === "Aszcendens" ? "Asc" : t.label} {signName(t.sign)}
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div style={{ display: "flex", fontFamily: "Cormorant Garamond", fontSize: 30, color: "#ece6d8" }}>
|
||||
sors<span style={{ color: "#d9b46a" }}>fonalak</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
{
|
||||
width: W,
|
||||
height: H,
|
||||
fonts: await loadFonts(),
|
||||
// A day at the edge: a revoked link's image goes away from there too.
|
||||
headers: { "Cache-Control": "public, max-age=3600, s-maxage=86400" },
|
||||
},
|
||||
);
|
||||
return image;
|
||||
return chartCard({
|
||||
chart,
|
||||
timeKnown: chart.time_known,
|
||||
eyebrow: "SZÜLETÉSI KÉPLET · RÖVIDEN",
|
||||
title: share.summary?.title ?? "Születési képlet",
|
||||
text: shorten(plain(share.summary?.summary ?? ""), 280),
|
||||
lines: bigThree(chart).map((t) => ({
|
||||
glyph: SIGNS[t.sign]?.glyph ?? "",
|
||||
label: `${t.label === "Aszcendens" ? "Asc" : t.label} ${signName(t.sign)}`,
|
||||
})),
|
||||
// A day at the edge: a revoked link's image goes away from there too.
|
||||
cacheControl: "public, max-age=3600, s-maxage=86400",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import { notFound } from "next/navigation";
|
||||
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
||||
import { Rich } from "@/components/Rich";
|
||||
import { ShareVisit } from "@/components/ShareVisit";
|
||||
import { Logo } from "@/components/SiteHeader";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { SIGNS, signName } from "@/lib/astro";
|
||||
import { getMe } from "@/lib/server";
|
||||
import { bigThree, imageVersion, loadShare, plain, shorten, siteUrl } from "@/lib/share";
|
||||
@@ -48,13 +48,7 @@ export default async function SharedChartPage({ params }: Props) {
|
||||
<>
|
||||
<ShareVisit slug={slug} />
|
||||
{!me && (
|
||||
<header className="site-header">
|
||||
<Logo />
|
||||
<span style={{ flex: 1 }} />
|
||||
<Link href="/belepes" className="btn btn-sm">
|
||||
Belépés
|
||||
</Link>
|
||||
</header>
|
||||
<PublicHeader />
|
||||
)}
|
||||
<main className="page" style={{ maxWidth: 1180 }}>
|
||||
<div className="page-head">
|
||||
|
||||
@@ -13,10 +13,10 @@ export function LogoutButton() {
|
||||
try {
|
||||
await api("/auth/logout", { method: "POST" });
|
||||
} catch {
|
||||
// The session may already be gone; go to the login page either way.
|
||||
// The session may already be gone; go to the home page either way.
|
||||
}
|
||||
window.google?.accounts.id.disableAutoSelect();
|
||||
router.replace("/belepes");
|
||||
router.replace("/");
|
||||
router.refresh();
|
||||
}
|
||||
return (
|
||||
|
||||
@@ -13,6 +13,30 @@ export function Logo() {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* The header for visitors (not logged in): the home page sections, the
|
||||
* example and the login. `onHome`: the section links stay on the page.
|
||||
*/
|
||||
export function PublicHeader({ onHome = false, current }: { onHome?: boolean; current?: "pelda" }) {
|
||||
const home = onHome ? "" : "/";
|
||||
return (
|
||||
<header className="site-header lp-header">
|
||||
<Logo />
|
||||
<nav className="nav lp-nav" aria-label="Fő navigáció">
|
||||
<a href={`${home}#elemzes`}>Elemzés</a>
|
||||
<a href={`${home}#elorejelzes`}>Előrejelzés</a>
|
||||
<a href={`${home}#osszevetes`}>Összevetés</a>
|
||||
<Link href="/pelda" aria-current={current === "pelda" ? "page" : undefined}>
|
||||
Példa
|
||||
</Link>
|
||||
</nav>
|
||||
<Link href="/belepes" className="btn btn-sm">
|
||||
Belépés
|
||||
</Link>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
|
||||
/** The user's package and what is left of it; leads to the packages page. */
|
||||
function PackageBadge({ me }: { me: Me }) {
|
||||
const { natal, synastry } = me.analyses_left;
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
// Operator details shown on the legal pages. Fill these in before launch.
|
||||
// Operator details shown on the legal pages. The name, address and
|
||||
// registration come with the company (at the opening); until then the pages
|
||||
// leave them out and give the contact address only.
|
||||
export const OPERATOR = {
|
||||
name: "[Üzemeltető neve – kitöltendő]",
|
||||
address: "[Székhely / postacím – kitöltendő]",
|
||||
email: "[Kapcsolattartási e-mail – kitöltendő]",
|
||||
name: null as string | null,
|
||||
address: null as string | null,
|
||||
email: "info@sorsfonalak.hu",
|
||||
/** Company registration and tax number, if the operator is a company. */
|
||||
registration: null as string | null,
|
||||
};
|
||||
|
||||
export const PRIVACY_UPDATED = "2026. november 17.";
|
||||
/** Name, address and registration as one phrase ("Kft., 1234 Budapest, …"), or null. */
|
||||
export function operatorDetails(): string | null {
|
||||
const parts = [OPERATOR.name, OPERATOR.address, OPERATOR.registration].filter(Boolean);
|
||||
return parts.length > 0 ? parts.join(", ") : null;
|
||||
}
|
||||
|
||||
export const PRIVACY_UPDATED = "2026. november 19.";
|
||||
export const PRIVACY_UPDATED_EN = "19 November 2026";
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
// Link preview images (og:image): 1200×630 PNG with a chart wheel on the left
|
||||
// and text on the right, in the site's look. Used by the shared charts and
|
||||
// the home page.
|
||||
import "server-only";
|
||||
|
||||
import { readFile } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
|
||||
import { ImageResponse } from "next/og";
|
||||
|
||||
import type { ChartResult } from "./types";
|
||||
import { wheelSvg } from "./wheelSvg";
|
||||
|
||||
const W = 1200;
|
||||
const H = 630;
|
||||
const WHEEL = 590;
|
||||
|
||||
const FONTS = join(process.cwd(), "src/assets/og");
|
||||
let fonts: Promise<{ name: string; data: Buffer; weight: 400 | 600; style: "normal" }[]> | null = null;
|
||||
|
||||
function loadFonts() {
|
||||
fonts ??= Promise.all(
|
||||
(
|
||||
[
|
||||
["Cormorant Garamond", "CormorantGaramond-SemiBold.ttf", 600],
|
||||
["Inter", "Inter-Regular.ttf", 400],
|
||||
["Inter", "Inter-SemiBold.ttf", 600],
|
||||
["DejaVu Sans", "DejaVuSans.ttf", 400],
|
||||
] as const
|
||||
).map(async ([name, file, weight]) => ({
|
||||
name,
|
||||
data: await readFile(join(FONTS, file)),
|
||||
weight,
|
||||
style: "normal" as const,
|
||||
})),
|
||||
);
|
||||
return fonts;
|
||||
}
|
||||
|
||||
/**
|
||||
* Letters, digits, punctuation and spaces only: a character missing from the
|
||||
* fonts would make the renderer download a font from the internet.
|
||||
*/
|
||||
export const printable = (s: string) => s.replace(/[^\p{L}\p{N}\p{P}\p{Zs}+=<>°]/gu, "");
|
||||
|
||||
export interface CardLine {
|
||||
/** A zodiac or planet glyph (DejaVu Sans has them all). */
|
||||
glyph: string;
|
||||
label: string;
|
||||
}
|
||||
|
||||
/** The preview image as a response with the given cache header. */
|
||||
export async function chartCard({
|
||||
chart,
|
||||
timeKnown,
|
||||
eyebrow,
|
||||
title,
|
||||
text,
|
||||
lines,
|
||||
cacheControl,
|
||||
}: {
|
||||
chart: ChartResult;
|
||||
timeKnown: boolean;
|
||||
eyebrow: string;
|
||||
title: string;
|
||||
text: string;
|
||||
lines: CardLine[];
|
||||
cacheControl: string;
|
||||
}): Promise<Response> {
|
||||
const svg = wheelSvg(chart, timeKnown, WHEEL);
|
||||
return new ImageResponse(
|
||||
(
|
||||
<div style={{ display: "flex", width: W, height: H, background: "#0d1220", color: "#ece6d8", fontFamily: "Inter" }}>
|
||||
<div style={{ display: "flex", width: WHEEL + 40, height: H, alignItems: "center", justifyContent: "center" }}>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img
|
||||
src={`data:image/svg+xml;base64,${Buffer.from(svg).toString("base64")}`}
|
||||
width={WHEEL}
|
||||
height={WHEEL}
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div style={{ display: "flex", flexDirection: "column", flex: 1, padding: "56px 56px 44px 8px", gap: 18 }}>
|
||||
<div style={{ display: "flex", fontSize: 17, fontWeight: 600, letterSpacing: 2.5, color: "#d9b46a" }}>
|
||||
{printable(eyebrow)}
|
||||
</div>
|
||||
<div style={{ display: "flex", fontFamily: "Cormorant Garamond", fontSize: 56, lineHeight: 1.05 }}>
|
||||
{printable(title)}
|
||||
</div>
|
||||
{text && (
|
||||
<div style={{ display: "flex", fontSize: 23, lineHeight: 1.45, color: "#c9cfdc" }}>{printable(text)}</div>
|
||||
)}
|
||||
<div style={{ display: "flex", flexWrap: "wrap", marginTop: "auto", gap: "8px 22px", fontSize: 21, color: "#c9cfdc" }}>
|
||||
{lines.map((l) => (
|
||||
<div key={l.label} style={{ display: "flex", alignItems: "center", gap: 8 }}>
|
||||
<span style={{ fontFamily: "DejaVu Sans", color: "#d9b46a" }}>{l.glyph.replace(/︎/g, "")}</span>
|
||||
<span>{printable(l.label)}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
<div style={{ display: "flex", fontFamily: "Cormorant Garamond", fontSize: 30, color: "#ece6d8" }}>
|
||||
sors<span style={{ color: "#d9b46a" }}>fonalak</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
{ width: W, height: H, fonts: await loadFonts(), headers: { "Cache-Control": cacheControl } },
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user