Compare commits
19
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
15c88fc6be | ||
|
|
50cf334045 | ||
|
|
ddca7acbd4 | ||
|
|
55f5a1ac60 | ||
|
|
fd655952b6 | ||
|
|
f10e5fdb69 | ||
|
|
b672b1cefa | ||
|
|
61db4a9723 | ||
|
|
f7a8a3d6e0 | ||
|
|
f2953dd18f | ||
|
|
1af55d3b05 | ||
|
|
aee6bec940 | ||
|
|
0c4274d87b | ||
|
|
b88a88b225 | ||
|
|
4a2a84b36f | ||
|
|
a4173f90b6 | ||
|
|
3944c6a4b0 | ||
|
|
1ab693175e | ||
|
|
2b7866d4c5 |
@@ -17,6 +17,7 @@ ENV NODE_ENV=production NEXT_TELEMETRY_DISABLED=1 PORT=3000 HOSTNAME=0.0.0.0
|
||||
RUN addgroup -S app && adduser -S -G app app
|
||||
COPY --from=build --chown=app:app /app/.next/standalone ./
|
||||
COPY --from=build --chown=app:app /app/.next/static ./.next/static
|
||||
COPY --from=build --chown=app:app /app/public ./public
|
||||
USER app
|
||||
EXPOSE 3000
|
||||
HEALTHCHECK --interval=10s --timeout=3s --retries=5 CMD wget -qO- http://127.0.0.1:3000/healthz >/dev/null || exit 1
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg width="104" height="34" viewBox="0 0 104 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M29.4607 14.8836C29.4938 14.7064 29.5289 14.547 29.5631 14.4093L31.9385 4.67302C32.6172 2.05391 34.1442 0.516602 36.9155 0.516602C39.0646 0.516602 40.7048 1.94003 40.7048 3.93284C40.7048 5.58402 40.0261 7.12132 38.4425 8.82944L32.536 15.3314C31.9953 17.9568 33.3006 18.7935 34.7098 18.7935C37.4511 18.7935 39.171 16.5816 39.8689 14.7002C39.8994 14.5988 39.9328 14.5016 39.9696 14.4093L42.4015 4.67302C43.0802 2.05391 44.6072 0.516602 47.3785 0.516602C49.5276 0.516602 51.1678 1.94003 51.1678 3.93284C51.1678 5.58402 50.4891 7.12132 48.9055 8.82944L43.0004 15.3301C42.4728 17.9565 43.9568 18.7935 45.908 18.7935C47.8202 18.7935 49.6854 17.7475 50.5536 15.0039L52.0161 9.11413H55.4095L53.7128 15.8897C53.2604 17.7116 53.7694 18.7935 55.1833 18.7935C56.88 18.7935 57.5587 18.281 58.2374 15.548L59.0292 12.2457C59.6513 9.62656 61.2349 8.88638 63.7799 8.88638H67.1168C69.4356 8.88638 71.1889 10.8222 70.6233 13.1567L68.4742 21.8681H65.0807L67.2299 13.2705C67.4561 12.4165 67.1168 11.961 66.2684 11.961H63.6668C62.9882 11.961 62.5923 12.3026 62.4226 12.9289L61.2914 17.6547C60.6693 20.16 58.8595 21.8681 55.9186 21.8681H55.1833C53.4448 21.8681 51.9867 21.0542 51.1429 19.566C50.0152 20.8083 48.3105 21.8681 45.6252 21.8681C42.9145 21.8681 41.2907 20.6535 40.4395 19.142C39.1534 20.5894 37.2944 21.8681 34.7098 21.8681C32.3016 21.8681 30.9188 21.0235 30.1547 19.8824C29.0995 21.0343 27.5991 21.8681 25.4345 21.8681C23.0591 21.8681 19.6091 20.6724 21.023 15.0356L22.4935 9.11413H25.8869L24.2468 15.3772C23.6247 17.7116 24.5296 18.7935 26.1697 18.7935C28.254 18.7935 29.1046 16.4012 29.4607 14.8836ZM44.2588 10.2033L46.417 7.2352C47.6613 5.52708 48.0572 5.01464 48.0572 4.50221C48.0572 3.98977 47.6047 3.59121 47.0957 3.59121C46.3605 3.59121 45.7949 4.04671 45.4556 5.35627L44.2588 10.2033ZM33.796 10.2033L35.954 7.2352C37.1983 5.52708 37.5942 5.01464 37.5942 4.50221C37.5942 3.98977 37.1417 3.59121 36.6327 3.59121C35.8975 3.59121 35.3319 4.04671 34.9926 5.35627L33.796 10.2033ZM15.9782 11.1631C18.0006 12.0669 18.478 13.5535 18.478 15.3203C18.478 18.9643 15.4805 22.0958 10.1641 22.0958H7.44942C2.35931 22.0958 -1.20376 19.4767 0.379826 13.2705L2.35931 5.24239C3.49045 1.19985 3.99946 0.687413 9.03301 0.687413H13.1617C16.7813 0.687413 19.5526 2.28166 19.5526 5.98258C19.5526 7.81584 18.6593 9.93522 15.9782 11.1631ZM11.6912 12.5873H7.78876L8.58055 9.51269H11.5781C14.6887 9.51269 16.046 8.43088 16.046 6.3242C16.046 4.38833 14.9149 3.76202 12.3699 3.76202H8.75023C6.31828 3.76202 6.14862 3.8759 5.58305 6.15339L3.66012 13.6691C2.86832 16.9145 4.28224 19.0212 8.07154 19.0212H10.1076C13.6141 19.0212 14.9715 17.3131 14.9715 15.3772C14.9715 13.4414 14.2928 12.5873 11.6912 12.5873ZM80.5422 21.4649C79.6628 21.8561 78.5543 22.1528 77.0142 22.1528C73.9036 22.1528 71.1889 19.3059 71.9807 15.2064C72.7159 11.5055 75.7134 8.88638 79.5593 8.88638C83.5748 8.88638 86.0633 11.961 85.1018 15.7188L81.6519 29.156C80.8035 32.2306 79.1634 33.4833 76.7314 33.4833C73.6774 33.4833 72.0938 31.2627 72.7159 28.6436C73.5168 25.6211 76.7518 24.0694 80.5422 21.4649ZM77.6929 19.0212C79.8421 19.0212 81.1429 17.8255 81.6519 15.3203C81.9912 13.3844 80.9732 12.0749 79.1068 12.0749C77.0142 12.0749 75.8265 13.4983 75.4872 15.3203C74.9782 17.4839 76.0528 19.0212 77.6929 19.0212ZM79.6843 25.0346C77.7302 27.0126 76.4967 28.1005 76.2224 28.9283C75.9397 29.7254 76.5052 30.3517 77.0708 30.3517C77.6929 30.3517 78.2019 29.8962 78.6544 28.5297L79.6843 25.0346ZM98.2207 10.3098H103.2V13.0428H99.6895C99.8564 13.8619 99.8632 14.7655 99.6935 15.7188C99.0714 19.5906 96.0173 22.1528 92.0018 22.1528C87.9862 22.1528 85.724 19.4198 86.5723 15.2064C87.3076 11.6194 90.4182 8.88638 94.3206 8.88638C95.954 8.88638 97.2808 9.41515 98.2207 10.3098ZM92.2846 19.0212C94.1509 19.0212 95.7345 18.2241 96.2435 15.3203C96.5829 13.3844 95.7345 12.0749 93.755 12.0749C91.719 12.0749 90.4182 13.4983 90.0223 15.3203C89.5698 17.4839 90.6444 19.0212 92.2846 19.0212ZM25.1517 7.12132C23.7943 7.12132 22.7197 6.03951 22.7197 4.67302C22.7197 3.30653 23.7943 2.22472 25.1517 2.22472C26.509 2.22472 27.5836 3.30653 27.5836 4.67302C27.5836 6.03951 26.509 7.12132 25.1517 7.12132ZM54.6743 7.12132C53.3169 7.12132 52.2424 6.03951 52.2424 4.67302C52.2424 3.30653 53.3169 2.22472 54.6743 2.22472C56.0317 2.22472 57.1063 3.30653 57.1063 4.67302C57.1063 6.03951 56.0317 7.12132 54.6743 7.12132Z" fill="white"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.4 KiB |
@@ -0,0 +1 @@
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" style="enable-background:new 0 0 468 222.5;" xml:space="preserve" viewBox="54 36 360.02 149.84"> <style type="text/css"> .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#FFFFFF;} </style> <g> <path class="st0" d="M414,113.4c0-25.6-12.4-45.8-36.1-45.8c-23.8,0-38.2,20.2-38.2,45.6c0,30.1,17,45.3,41.4,45.3 c11.9,0,20.9-2.7,27.7-6.5v-20c-6.8,3.4-14.6,5.5-24.5,5.5c-9.7,0-18.3-3.4-19.4-15.2h48.9C413.8,121,414,115.8,414,113.4z M364.6,103.9c0-11.3,6.9-16,13.2-16c6.1,0,12.6,4.7,12.6,16H364.6z"></path> <path class="st0" d="M301.1,67.6c-9.8,0-16.1,4.6-19.6,7.8l-1.3-6.2h-22v116.6l25-5.3l0.1-28.3c3.6,2.6,8.9,6.3,17.7,6.3 c17.9,0,34.2-14.4,34.2-46.1C335.1,83.4,318.6,67.6,301.1,67.6z M295.1,136.5c-5.9,0-9.4-2.1-11.8-4.7l-0.1-37.1 c2.6-2.9,6.2-4.9,11.9-4.9c9.1,0,15.4,10.2,15.4,23.3C310.5,126.5,304.3,136.5,295.1,136.5z"></path> <polygon class="st0" points="223.8,61.7 248.9,56.3 248.9,36 223.8,41.3 "></polygon> <rect x="223.8" y="69.3" class="st0" width="25.1" height="87.5"></rect> <path class="st0" d="M196.9,76.7l-1.6-7.4h-21.6v87.5h25V97.5c5.9-7.7,15.9-6.3,19-5.2v-23C214.5,68.1,202.8,65.9,196.9,76.7z"></path> <path class="st0" d="M146.9,47.6l-24.4,5.2l-0.1,80.1c0,14.8,11.1,25.7,25.9,25.7c8.2,0,14.2-1.5,17.5-3.3V135 c-3.2,1.3-19,5.9-19-8.9V90.6h19V69.3h-19L146.9,47.6z"></path> <path class="st0" d="M79.3,94.7c0-3.9,3.2-5.4,8.5-5.4c7.6,0,17.2,2.3,24.8,6.4V72.2c-8.3-3.3-16.5-4.6-24.8-4.6 C67.5,67.6,54,78.2,54,95.9c0,27.6,38,23.2,38,35.1c0,4.6-4,6.1-9.6,6.1c-8.3,0-18.9-3.4-27.3-8v23.8c9.3,4,18.7,5.7,27.3,5.7 c20.8,0,35.1-10.3,35.1-28.2C117.4,100.6,79.3,105.9,79.3,94.7z"></path> </g> </svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -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">
|
||||
@@ -402,11 +442,22 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
</section>
|
||||
|
||||
<footer className="lp-footer">
|
||||
<div className="lp-wrap lp-partners">
|
||||
<span className="hint">Fizetés</span>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="/logos/stripe.svg" alt="Stripe" width="62" height="26" className="lp-partner" />
|
||||
<span className="hint">Számlázás</span>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img src="/logos/billingo.svg" alt="Billingo" width="80" height="26" className="lp-partner" />
|
||||
</div>
|
||||
<div className="lp-wrap lp-footer-inner">
|
||||
<Logo />
|
||||
<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ó.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -52,8 +52,13 @@ p { margin: 0; }
|
||||
padding: 12px 24px; background: rgba(13, 18, 32, 0.94);
|
||||
border-bottom: 1px solid var(--line); backdrop-filter: blur(6px);
|
||||
}
|
||||
.logo { font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: 0.3px; }
|
||||
.logo span { color: var(--gold); }
|
||||
.logo {
|
||||
display: inline-flex; align-items: center; gap: 9px;
|
||||
font-family: var(--font-display); font-size: 28px; font-weight: 600; color: var(--ink); text-decoration: none; letter-spacing: 0.3px;
|
||||
}
|
||||
.logo-word span { color: var(--gold); }
|
||||
.logo-mark { width: 1.15em; height: 1.15em; flex: none; color: var(--gold); }
|
||||
.logo-star { fill: var(--ink); }
|
||||
.logo:hover { color: var(--ink); }
|
||||
.nav { display: flex; gap: 4px; flex: 1; }
|
||||
.nav a { color: var(--ink-2); text-decoration: none; padding: 10px 12px; border-radius: 8px; min-height: 44px; display: inline-flex; align-items: center; }
|
||||
@@ -87,7 +92,19 @@ p { margin: 0; }
|
||||
border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink);
|
||||
font: 400 15px var(--font-body);
|
||||
}
|
||||
select.inp { padding-right: 32px; text-overflow: ellipsis; }
|
||||
/* Our own chevron, so the text starts where it does in the other fields */
|
||||
select.inp {
|
||||
appearance: none; -webkit-appearance: none; cursor: pointer; text-overflow: ellipsis;
|
||||
padding: 0 42px 0 14px;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23a3abc0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
|
||||
}
|
||||
select.inp:focus { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%23d9b46a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
|
||||
select.inp option { background: var(--panel-2); color: var(--ink); }
|
||||
/* Multi-line fields: room above and below the text too */
|
||||
textarea.inp { padding: 12px 14px; line-height: 1.55; min-height: 96px; resize: vertical; }
|
||||
/* A button beside input fields is as tall as they are */
|
||||
.row > .btn:not(.btn-sm), .redeem-row > .btn { min-height: 48px; }
|
||||
.inp::placeholder { color: #8a93ab; }
|
||||
.inp:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 106, 0.25); }
|
||||
.inp:disabled { opacity: 0.55; }
|
||||
@@ -914,3 +931,20 @@ 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; }
|
||||
|
||||
/* Home page footer: payment and invoicing partners */
|
||||
.lp-partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
|
||||
.lp-partner { height: 26px; width: auto; opacity: 0.65; transition: opacity 0.2s; }
|
||||
.lp-partner:hover { opacity: 1; }
|
||||
.lp-partners .hint + .lp-partner { margin-right: 18px; }
|
||||
.lp-partners .lp-partner:last-child { margin-right: 0; }
|
||||
|
||||
/* Chart page: below the wheel and the summary, the facts and the next steps side by side */
|
||||
.chart-extras { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; align-items: stretch; }
|
||||
.chart-extras > .card { margin: 0; }
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
||||
<rect width="64" height="64" rx="14" fill="#0d1220"/>
|
||||
<g transform="translate(6 6) scale(0.8125)" fill="none" stroke="#d9b46a" stroke-width="4.5" stroke-linecap="round">
|
||||
<circle cx="32" cy="32" r="23"/>
|
||||
<path d="M10 46 C 24 45, 29 23, 44 18"/>
|
||||
<path d="M18 33.5 L36 33.5" stroke-width="4.2"/>
|
||||
<path d="M49 6 L51.8 13.2 L59 16 L51.8 18.8 L49 26 L46.2 18.8 L39 16 L46.2 13.2 Z" fill="#ece6d8" stroke="none"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 502 B |
@@ -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",
|
||||
});
|
||||
}
|
||||
@@ -82,87 +82,90 @@ export default async function ChartPage({ params }: { params: Promise<{ id: stri
|
||||
referralsLeft={me.referral_rewards.limit - me.referral_rewards.earned}
|
||||
/>
|
||||
<BigThree chart={chart} />
|
||||
{(elements || modalities || phase) && (
|
||||
<div className="card" style={{ gap: 12 }}>
|
||||
<dl className="facts">
|
||||
{elements && (
|
||||
<>
|
||||
<dt>Elemek</dt>
|
||||
<dd>
|
||||
{Object.entries(elements)
|
||||
.map(([k, v]) => `${ELEMENTS[k] ?? k} ${v.count}`)
|
||||
.join(" · ")}
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
{modalities && (
|
||||
<>
|
||||
<dt>Minőségek</dt>
|
||||
<dd>
|
||||
{Object.entries(modalities)
|
||||
.map(([k, v]) => `${MODALITIES[k] ?? k} ${v.count}`)
|
||||
.join(" · ")}
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
{phase && (
|
||||
<>
|
||||
<dt>Holdfázis</dt>
|
||||
<dd>
|
||||
{MOON_PHASES[phase.phase] ?? phase.phase}, {Math.round(phase.illumination * 100)}%
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
</dl>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="chart-extras" aria-label="A képlet összegzése és továbblépés">
|
||||
{(elements || modalities || phase) && (
|
||||
<div className="card" style={{ gap: 12 }}>
|
||||
<dl className="facts">
|
||||
{elements && (
|
||||
<p className="hint">
|
||||
Az elemek és minőségek a tíz bolygóból számolva:{" "}
|
||||
{Object.entries(elements)
|
||||
.filter(([, v]) => v.count > 0)
|
||||
.map(([k, v]) => `${ELEMENTS[k] ?? k}: ${v.points.map(pointName).join(", ")}`)
|
||||
.join("; ")}
|
||||
.
|
||||
</p>
|
||||
<>
|
||||
<dt>Elemek</dt>
|
||||
<dd>
|
||||
{Object.entries(elements)
|
||||
.map(([k, v]) => `${ELEMENTS[k] ?? k} ${v.count}`)
|
||||
.join(" · ")}
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
{modalities && (
|
||||
<>
|
||||
<dt>Minőségek</dt>
|
||||
<dd>
|
||||
{Object.entries(modalities)
|
||||
.map(([k, v]) => `${MODALITIES[k] ?? k} ${v.count}`)
|
||||
.join(" · ")}
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
{phase && (
|
||||
<>
|
||||
<dt>Holdfázis</dt>
|
||||
<dd>
|
||||
{MOON_PHASES[phase.phase] ?? phase.phase}, {Math.round(phase.illumination * 100)}%
|
||||
</dd>
|
||||
</>
|
||||
)}
|
||||
</dl>
|
||||
{elements && (
|
||||
<p className="hint">
|
||||
Az elemek és minőségek a tíz bolygóból számolva:{" "}
|
||||
{Object.entries(elements)
|
||||
.filter(([, v]) => v.count > 0)
|
||||
.map(([k, v]) => `${ELEMENTS[k] ?? k}: ${v.points.map(pointName).join(", ")}`)
|
||||
.join("; ")}
|
||||
.
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
<Link href={`/kepletek/${chart.id}/elorejelzes`} className="card persons-tile">
|
||||
<span className="eyebrow">Éves előrejelzés</span>
|
||||
<strong>{chart.is_primary ? "Mit hoz az éved?" : `Mit hoz ${chart.label} éve?`}</strong>
|
||||
<span className="muted">
|
||||
Szolár képlet, tranzitok pontos dátumokkal, progresszió: egy év születésnaptól születésnapig.
|
||||
</span>
|
||||
<span className="persons-tile-arrow" aria-hidden="true">
|
||||
→
|
||||
</span>
|
||||
</Link>
|
||||
{!chart.is_primary && own && (
|
||||
<div className="card compare-tile">
|
||||
<span className="eyebrow">Összevetés</span>
|
||||
<strong>Te és {chart.label}</strong>
|
||||
<span className="muted">Két képlet egy körön: mi vonz, hol súrlódtok, és mit ad a kapcsolat.</span>
|
||||
<div className="form-actions">
|
||||
<CompareButton chart1={own.id} chart2={chart.id} label="Összevetés velem" className="btn" />
|
||||
</div>
|
||||
)}
|
||||
<Link href={`/kepletek/${chart.id}/elorejelzes`} className="card persons-tile">
|
||||
<span className="eyebrow">Éves előrejelzés</span>
|
||||
<strong>{chart.is_primary ? "Mit hoz az éved?" : `Mit hoz ${chart.label} éve?`}</strong>
|
||||
</div>
|
||||
)}
|
||||
{chart.is_primary && (
|
||||
<Link href="/szemelyek" className="card persons-tile">
|
||||
<span className="eyebrow">Személyek</span>
|
||||
<strong>
|
||||
{persons.length > 0 ? `${persons.length} felvett személy` : "Társad, családod képlete"}
|
||||
</strong>
|
||||
<span className="muted">
|
||||
Szolár képlet, tranzitok pontos dátumokkal, progresszió: egy év születésnaptól születésnapig.
|
||||
{persons.length > 0
|
||||
? persons.slice(0, 3).map((p) => p.label).join(", ") + (persons.length > 3 ? "…" : "")
|
||||
: "Vedd fel őket, és nézd meg az ő képletüket és elemzésüket is."}
|
||||
</span>
|
||||
<span className="persons-tile-arrow" aria-hidden="true">
|
||||
→
|
||||
</span>
|
||||
</Link>
|
||||
{!chart.is_primary && own && (
|
||||
<div className="card compare-tile">
|
||||
<span className="eyebrow">Összevetés</span>
|
||||
<strong>Te és {chart.label}</strong>
|
||||
<span className="muted">Két képlet egy körön: mi vonz, hol súrlódtok, és mit ad a kapcsolat.</span>
|
||||
<div className="form-actions">
|
||||
<CompareButton chart1={own.id} chart2={chart.id} label="Összevetés velem" className="btn" />
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{chart.is_primary && (
|
||||
<Link href="/szemelyek" className="card persons-tile">
|
||||
<span className="eyebrow">Személyek</span>
|
||||
<strong>
|
||||
{persons.length > 0 ? `${persons.length} felvett személy` : "Társad, családod képlete"}
|
||||
</strong>
|
||||
<span className="muted">
|
||||
{persons.length > 0
|
||||
? persons.slice(0, 3).map((p) => p.label).join(", ") + (persons.length > 3 ? "…" : "")
|
||||
: "Vedd fel őket, és nézd meg az ő képletüket és elemzésüket is."}
|
||||
</span>
|
||||
<span className="persons-tile-arrow" aria-hidden="true">
|
||||
→
|
||||
</span>
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</section>
|
||||
|
||||
<section className="card chart-tabs" aria-label="Elemzés és táblázatok">
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -5,14 +5,55 @@ import type { Me } from "@/lib/types";
|
||||
import { LogoutButton } from "./LogoutButton";
|
||||
import { NavLinks } from "./NavLinks";
|
||||
|
||||
/** The mark: the orbit, the thread (an S, with the crossbar an f) and a star on the rim. */
|
||||
export function LogoMark({ className = "logo-mark" }: { className?: string }) {
|
||||
return (
|
||||
<svg className={className} viewBox="0 0 64 64" aria-hidden="true">
|
||||
<g fill="none" stroke="currentColor" strokeWidth="4.5" strokeLinecap="round">
|
||||
<circle cx="32" cy="32" r="23" />
|
||||
<path d="M10 46 C 24 45, 29 23, 44 18" />
|
||||
<path d="M18 33.5 L36 33.5" strokeWidth="4.2" />
|
||||
</g>
|
||||
<path d="M49 6 L51.8 13.2 L59 16 L51.8 18.8 L49 26 L46.2 18.8 L39 16 L46.2 13.2 Z" className="logo-star" />
|
||||
</svg>
|
||||
);
|
||||
}
|
||||
|
||||
export function Logo() {
|
||||
return (
|
||||
<Link href="/" className="logo">
|
||||
sors<span>fonalak</span>
|
||||
<Link href="/" className="logo" aria-label="Sorsfonalak – főoldal">
|
||||
<LogoMark />
|
||||
<span className="logo-word">
|
||||
sors<span>fonalak</span>
|
||||
</span>
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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