Public sign calculator and the twelve sign pages, SEO basics
/aszcendens-kalkulator: Sun, Moon and Ascendant signs from birth data
without an account. A calculation only (no AI, nothing saved), limited to
30 calculations and 300 place searches an hour per visitor address
(POST /v1/public/signs, GET /v1/public/geo/*). Without a birth time there
is no Ascendant, and signs near a border are marked uncertain.
/csillagjegyek and /csillagjegyek/{jegy}: the twelve signs with facts,
Sun, Moon and Ascendant, love, work, a common misbelief and an offer,
each written on its own. Links to the calculator and sign-up.
SEO: metadataBase and canonical addresses, hreflang between the
Hungarian and English privacy pages, Organization and WebSite JSON-LD on
the home page, FAQPage on the calculator, BreadcrumbList on the sign
pages; the sitemap lists the new pages, the footers link them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -480,6 +480,8 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
<div className="lp-wrap lp-footer-inner">
|
||||
<Logo />
|
||||
<nav aria-label="Lábléc" className="lp-footer-nav">
|
||||
<Link href="/aszcendens-kalkulator">Aszcendens-kalkulátor</Link>
|
||||
<Link href="/csillagjegyek">Csillagjegyek</Link>
|
||||
<Link href="/pelda">Példaelemzés</Link>
|
||||
<Link href="/kartyajoslas/pelda">Példajóslás</Link>
|
||||
<Link href="/aszf">ÁSZF</Link>
|
||||
|
||||
@@ -8,6 +8,7 @@ import { getMe } from "@/lib/server";
|
||||
export const metadata: Metadata = {
|
||||
title: "Adatvédelmi tájékoztató",
|
||||
description: "Hogyan kezeli a Sorsfonalak a személyes adataidat.",
|
||||
alternates: { canonical: "/adatvedelem", languages: { hu: "/adatvedelem", en: "/privacy" } },
|
||||
};
|
||||
|
||||
/** Privacy policy: public, also for visitors who are not logged in. */
|
||||
|
||||
@@ -0,0 +1,310 @@
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { useMemo, useRef, useState } from "react";
|
||||
|
||||
import { CountrySelect, PlaceSearch } from "@/app/profil/BirthForm";
|
||||
import { ZODIAC_BY_ID } from "@/content/zodiac";
|
||||
import { ApiError, api, errorText } from "@/lib/api";
|
||||
import { SIGNS } from "@/lib/astro";
|
||||
import { MONTHS, composeDate, composeTime, daysIn } from "@/lib/birth";
|
||||
import type { Place } from "@/lib/types";
|
||||
|
||||
interface Sign {
|
||||
sign: string;
|
||||
degree: number | null;
|
||||
uncertain: boolean;
|
||||
}
|
||||
interface Result {
|
||||
sun: Sign;
|
||||
moon: Sign;
|
||||
ascendant: Sign | null;
|
||||
time_known: boolean;
|
||||
}
|
||||
|
||||
const ERRORS: Record<string, string> = {
|
||||
place_not_found: "Nem találjuk ezt a települést. Válassz a listából.",
|
||||
nonexistent_local_time:
|
||||
"Ez az időpont az óraátállítás miatt nem létezett ezen a napon (az órát előreállították). Ellenőrizd a születési időt.",
|
||||
invalid_date: "Érvénytelen dátum.",
|
||||
too_many_requests: "Erről a címről most túl sok számítás érkezett. Próbáld újra egy óra múlva.",
|
||||
};
|
||||
|
||||
function SignCard({ label, anchor, sign, note }: { label: string; anchor: string; sign: Sign; note?: string }) {
|
||||
const z = ZODIAC_BY_ID.get(sign.sign);
|
||||
const s = SIGNS[sign.sign];
|
||||
return (
|
||||
<div className="card calc-sign">
|
||||
<span className="eyebrow">{label}</span>
|
||||
<div className="calc-sign-main">
|
||||
<span className="calc-glyph" aria-hidden="true">
|
||||
{s?.glyph}
|
||||
</span>
|
||||
<strong>{s?.hu ?? sign.sign}</strong>
|
||||
{sign.degree !== null && <span className="muted">{sign.degree}°</span>}
|
||||
</div>
|
||||
{note && (
|
||||
<p className="hint" style={{ margin: 0 }}>
|
||||
{note}
|
||||
</p>
|
||||
)}
|
||||
{z && (
|
||||
<Link href={`/csillagjegyek/${z.slug}#${anchor}`} className="calc-sign-link">
|
||||
Mit jelent? →
|
||||
</Link>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/** The public Sun, Moon and Ascendant calculator: a calculation only, nothing is saved and no AI is used. */
|
||||
export function SignCalculator() {
|
||||
const [year, setYear] = useState("");
|
||||
const [month, setMonth] = useState("");
|
||||
const [day, setDay] = useState("");
|
||||
const [hour, setHour] = useState("");
|
||||
const [minute, setMinute] = useState("");
|
||||
const [timeUnknown, setTimeUnknown] = useState(false);
|
||||
const [country, setCountry] = useState("HU");
|
||||
const [place, setPlace] = useState<Place | null>(null);
|
||||
const [ambiguous, setAmbiguous] = useState(false);
|
||||
const [ambiguity, setAmbiguity] = useState<"earlier" | "later">("earlier");
|
||||
const [busy, setBusy] = useState(false);
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [result, setResult] = useState<Result | null>(null);
|
||||
const minuteRef = useRef<HTMLInputElement>(null);
|
||||
const resultRef = useRef<HTMLDivElement>(null);
|
||||
const today = useMemo(() => new Date().toISOString().slice(0, 10), []);
|
||||
|
||||
async function submit(e: React.FormEvent) {
|
||||
e.preventDefault();
|
||||
setError(null);
|
||||
const date = composeDate(year, month, day);
|
||||
const time = composeTime(hour, minute);
|
||||
if (!date) return setError("Ellenőrizd a dátumot: az év négy számjegy, és a nap legyen az adott hónapban.");
|
||||
if (date > today) return setError("A születési dátum nem lehet a jövőben.");
|
||||
if (!timeUnknown && !time)
|
||||
return setError("Add meg a születési időt (óra 0–23, perc 0–59), vagy jelöld, hogy nem tudod.");
|
||||
if (!place) return setError("Válaszd ki a születési helyet a listából.");
|
||||
setBusy(true);
|
||||
try {
|
||||
const r = await api<Result>("/public/signs", {
|
||||
body: {
|
||||
date,
|
||||
...(timeUnknown ? {} : { time }),
|
||||
country,
|
||||
geonames_id: place.geonames_id,
|
||||
...(ambiguous ? { ambiguous_time: ambiguity } : {}),
|
||||
},
|
||||
});
|
||||
setResult(r);
|
||||
requestAnimationFrame(() =>
|
||||
resultRef.current?.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
block: "start",
|
||||
}),
|
||||
);
|
||||
} catch (err) {
|
||||
if (err instanceof ApiError && err.code === "ambiguous_local_time") {
|
||||
setAmbiguous(true);
|
||||
setError(
|
||||
"Ez az időpont az óraátállítás miatt kétszer is előfordult ezen a napon. Válaszd ki, melyikben születtél.",
|
||||
);
|
||||
} else {
|
||||
setError(err instanceof ApiError ? (ERRORS[err.code] ?? errorText(err)) : errorText(err));
|
||||
}
|
||||
} finally {
|
||||
setBusy(false);
|
||||
}
|
||||
}
|
||||
|
||||
const uncertain = "A születési idő nélkül ez a jegy a nap elején vagy végén a szomszédos jegy is lehetett.";
|
||||
|
||||
return (
|
||||
<>
|
||||
<form onSubmit={submit} className="card field calc-form" style={{ gap: 18 }} noValidate>
|
||||
<div className="grid-2">
|
||||
<fieldset className="field birth-fields">
|
||||
<legend className="label">Születési dátum</legend>
|
||||
<div className="birth-row">
|
||||
<label className="sr-only" htmlFor="calc-year">
|
||||
Év
|
||||
</label>
|
||||
<input
|
||||
id="calc-year"
|
||||
className="inp birth-year"
|
||||
inputMode="numeric"
|
||||
placeholder="év"
|
||||
maxLength={4}
|
||||
value={year}
|
||||
onChange={(e) => setYear(e.target.value.replace(/\D/g, ""))}
|
||||
/>
|
||||
<label className="sr-only" htmlFor="calc-month">
|
||||
Hónap
|
||||
</label>
|
||||
<select
|
||||
id="calc-month"
|
||||
className="inp birth-month"
|
||||
value={month}
|
||||
onChange={(e) => setMonth(e.target.value)}
|
||||
>
|
||||
<option value="">hónap</option>
|
||||
{MONTHS.map((m, i) => (
|
||||
<option key={m} value={i + 1}>
|
||||
{m}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
<label className="sr-only" htmlFor="calc-day">
|
||||
Nap
|
||||
</label>
|
||||
<select id="calc-day" className="inp birth-day" value={day} onChange={(e) => setDay(e.target.value)}>
|
||||
<option value="">nap</option>
|
||||
{Array.from({ length: month ? daysIn(Number(year), Number(month)) : 31 }, (_, i) => (
|
||||
<option key={i + 1} value={i + 1}>
|
||||
{i + 1}.
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset className="field birth-fields">
|
||||
<legend className="label">Születési idő (helyi idő)</legend>
|
||||
<div className="birth-row">
|
||||
<label className="sr-only" htmlFor="calc-hour">
|
||||
Óra
|
||||
</label>
|
||||
<input
|
||||
id="calc-hour"
|
||||
className="inp birth-time"
|
||||
inputMode="numeric"
|
||||
placeholder="óra"
|
||||
maxLength={2}
|
||||
value={timeUnknown ? "" : hour}
|
||||
disabled={timeUnknown}
|
||||
onChange={(e) => {
|
||||
const v = e.target.value.replace(/\D/g, "");
|
||||
setHour(v);
|
||||
setAmbiguous(false);
|
||||
if (v.length === 2 || (v.length === 1 && Number(v) > 2)) minuteRef.current?.focus();
|
||||
}}
|
||||
/>
|
||||
<span className="birth-colon" aria-hidden="true">
|
||||
:
|
||||
</span>
|
||||
<label className="sr-only" htmlFor="calc-minute">
|
||||
Perc
|
||||
</label>
|
||||
<input
|
||||
id="calc-minute"
|
||||
ref={minuteRef}
|
||||
className="inp birth-time"
|
||||
inputMode="numeric"
|
||||
placeholder="perc"
|
||||
maxLength={2}
|
||||
value={timeUnknown ? "" : minute}
|
||||
disabled={timeUnknown}
|
||||
onChange={(e) => {
|
||||
setMinute(e.target.value.replace(/\D/g, ""));
|
||||
setAmbiguous(false);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<label className="check">
|
||||
<input type="checkbox" checked={timeUnknown} onChange={(e) => setTimeUnknown(e.target.checked)} />
|
||||
Nem tudom a születési időt
|
||||
</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div className="grid-2">
|
||||
<CountrySelect
|
||||
value={country}
|
||||
geoBase="/api/v1/public/geo"
|
||||
onChange={(c) => {
|
||||
setCountry(c);
|
||||
setPlace(null);
|
||||
}}
|
||||
/>
|
||||
<PlaceSearch country={country} value={place} onChange={setPlace} geoBase="/api/v1/public/geo" />
|
||||
</div>
|
||||
{ambiguous && (
|
||||
<fieldset className="field" style={{ border: 0, padding: 0, margin: 0 }}>
|
||||
<legend className="label" style={{ marginBottom: 8 }}>
|
||||
Melyik időpontban születtél?
|
||||
</legend>
|
||||
<label className="check">
|
||||
<input
|
||||
type="radio"
|
||||
name="calc-ambiguity"
|
||||
checked={ambiguity === "earlier"}
|
||||
onChange={() => setAmbiguity("earlier")}
|
||||
/>
|
||||
Az elsőben, még nyári időszámítás szerint
|
||||
</label>
|
||||
<label className="check">
|
||||
<input
|
||||
type="radio"
|
||||
name="calc-ambiguity"
|
||||
checked={ambiguity === "later"}
|
||||
onChange={() => setAmbiguity("later")}
|
||||
/>
|
||||
A másodikban, már téli időszámítás szerint
|
||||
</label>
|
||||
</fieldset>
|
||||
)}
|
||||
{error && (
|
||||
<p className="msg msg-error" role="alert" style={{ margin: 0 }}>
|
||||
{error}
|
||||
</p>
|
||||
)}
|
||||
<div className="form-actions">
|
||||
<button type="submit" className="btn btn-primary" disabled={busy}>
|
||||
{busy ? "Számolás…" : "Kiszámolom"}
|
||||
</button>
|
||||
<span className="hint">Ingyenes, belépés nélkül. Az adataidat nem mentjük el.</span>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{result && (
|
||||
<section ref={resultRef} className="calc-result" aria-live="polite" aria-label="Az eredmény">
|
||||
<div className="calc-signs">
|
||||
<SignCard
|
||||
label="Napjegy"
|
||||
anchor="nap"
|
||||
sign={result.sun}
|
||||
note={result.sun.uncertain ? uncertain : undefined}
|
||||
/>
|
||||
<SignCard
|
||||
label="Holdjegy"
|
||||
anchor="hold"
|
||||
sign={result.moon}
|
||||
note={result.moon.uncertain ? uncertain : undefined}
|
||||
/>
|
||||
{result.ascendant ? (
|
||||
<SignCard label="Aszcendens" anchor="aszcendens" sign={result.ascendant} />
|
||||
) : (
|
||||
<div className="card calc-sign">
|
||||
<span className="eyebrow">Aszcendens</span>
|
||||
<p className="muted" style={{ margin: 0 }}>
|
||||
Az aszcendens percről percre változik, ezért kiszámolásához pontos születési idő kell.
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="card calc-cta">
|
||||
<div>
|
||||
<h2 style={{ margin: 0 }}>Ez csak három pont a képletedből</h2>
|
||||
<p className="muted" style={{ margin: "6px 0 0" }}>
|
||||
A teljes születési képleted mind a tíz bolygót, a házakat és a fényszögeket is mutatja, és ingyen kapsz
|
||||
hozzá egy rövid, személyre szabott összefoglalót.
|
||||
</p>
|
||||
</div>
|
||||
<Link href="/belepes?mod=regisztracio&vissza=/profil" className="btn btn-primary">
|
||||
A teljes képletem ingyen
|
||||
</Link>
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
|
||||
import { JsonLd, PublicFooter } from "@/components/PublicFooter";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { getMe } from "@/lib/server";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
|
||||
import { SignCalculator } from "./SignCalculator";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Aszcendens- és holdjegy-kalkulátor",
|
||||
description:
|
||||
"Számold ki ingyen, belépés nélkül az aszcendensed, a holdjegyed és a napjegyed a születési dátumod, időd és helyed alapján.",
|
||||
alternates: { canonical: "/aszcendens-kalkulator" },
|
||||
};
|
||||
|
||||
const FAQ: [string, string][] = [
|
||||
[
|
||||
"Mi az aszcendens?",
|
||||
"Az aszcendens az az állatövi jegy, amely a születésed pillanatában a keleti horizonton emelkedett. Azt mutatja, hogyan lépsz be egy új helyzetbe, milyen első benyomást keltesz, és milyen szemüvegen át nézed a világot. A képletben a házak rendszere is innen indul.",
|
||||
],
|
||||
[
|
||||
"Miért kell hozzá a pontos születési idő?",
|
||||
"A horizonton nagyjából két óránként vált a jegy, vagyis az aszcendens pár perc alatt is átléphet a következő jegybe. Születési idő nélkül ezért nem lehet kiszámolni. Ha nem tudod a pontos időt, a születési anyakönyvi kivonaton vagy a kórházi zárójelentésen gyakran megtalálod.",
|
||||
],
|
||||
[
|
||||
"Mi a holdjegy?",
|
||||
"A holdjegy az a jegy, amelyben a Hold a születésedkor állt. Az érzelmi reakcióidról, a biztonságigényedről és arról szól, mi nyugtat meg. A Hold körülbelül két és fél naponta lép új jegybe, ezért a holdjegy sokszor születési idő nélkül is kiderül.",
|
||||
],
|
||||
[
|
||||
"Miben más ez, mint a napilapok horoszkópja?",
|
||||
"A napilapok csak a napjegyet nézik, ami egy hónapnyi születésnapra ugyanaz. A Nap, a Hold és az aszcendens együtt már sokkal személyesebb képet ad, a teljes születési képlet pedig mind a tíz bolygót és a házakat is mutatja.",
|
||||
],
|
||||
];
|
||||
|
||||
/** The public sign calculator: no login, no AI, nothing saved. */
|
||||
export default async function CalculatorPage() {
|
||||
const me = await getMe();
|
||||
const base = await siteUrl();
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
<main className="page calc-page" style={{ maxWidth: 980 }}>
|
||||
<div className="page-head">
|
||||
<span className="eyebrow">Ingyenes kalkulátor</span>
|
||||
<h1>Aszcendens- és holdjegy-kalkulátor</h1>
|
||||
<p className="muted">
|
||||
A napjegyed valószínűleg tudod. De melyik jegy emelkedett a születésed percében, és hol állt a Hold? Add meg
|
||||
a születési adataidat, és megmutatjuk a három legfontosabb pontot.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<SignCalculator />
|
||||
|
||||
<section className="calc-explain" aria-labelledby="calc-explain-title">
|
||||
<h2 id="calc-explain-title">Nap, Hold, aszcendens: mit mutat a három?</h2>
|
||||
<div className="calc-explain-grid">
|
||||
<div>
|
||||
<h3>Napjegy</h3>
|
||||
<p>
|
||||
Az alapvető jellemed, az, ami felé tartasz. Ezt kérdezik, amikor azt mondják: „Te milyen jegy vagy?”
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Holdjegy</h3>
|
||||
<p>Az érzelmeid és a megszokásaid. Az, ahogyan otthon, fáradtan, a szeretteid között vagy.</p>
|
||||
</div>
|
||||
<div>
|
||||
<h3>Aszcendens</h3>
|
||||
<p>Az első benyomás és a reflexeid. Sokan erre ismernek rá először, mert kívülről ez látszik.</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
Ha a három különböző jegyben áll, az teljesen természetes: ezért érzed úgy, hogy a napilapok horoszkópja
|
||||
csak részben illik rád. A jegyek részletes leírását a <Link href="/csillagjegyek">csillagjegyek</Link>{" "}
|
||||
oldalán találod.
|
||||
</p>
|
||||
</section>
|
||||
|
||||
<section className="calc-faq" aria-labelledby="calc-faq-title">
|
||||
<h2 id="calc-faq-title">Gyakori kérdések</h2>
|
||||
{FAQ.map(([q, a]) => (
|
||||
<details key={q} className="card calc-faq-item">
|
||||
<summary>{q}</summary>
|
||||
<p>{a}</p>
|
||||
</details>
|
||||
))}
|
||||
</section>
|
||||
</main>
|
||||
<PublicFooter />
|
||||
<JsonLd
|
||||
data={{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "FAQPage",
|
||||
url: `${base}/aszcendens-kalkulator`,
|
||||
mainEntity: FAQ.map(([q, a]) => ({
|
||||
"@type": "Question",
|
||||
name: q,
|
||||
acceptedAnswer: { "@type": "Answer", text: a },
|
||||
})),
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
import { notFound } from "next/navigation";
|
||||
|
||||
import { JsonLd, PublicFooter } from "@/components/PublicFooter";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { ZODIAC, ZODIAC_BY_SLUG } from "@/content/zodiac";
|
||||
import { SIGNS } from "@/lib/astro";
|
||||
import { getMe } from "@/lib/server";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
|
||||
export const dynamicParams = false;
|
||||
|
||||
export function generateStaticParams() {
|
||||
return ZODIAC.map((z) => ({ jegy: z.slug }));
|
||||
}
|
||||
|
||||
export async function generateMetadata({ params }: { params: Promise<{ jegy: string }> }): Promise<Metadata> {
|
||||
const z = ZODIAC_BY_SLUG.get((await params).jegy);
|
||||
if (!z) return {};
|
||||
return {
|
||||
title: `${z.name} csillagjegy: ${z.name} Nap, Hold és aszcendens`,
|
||||
description: `${z.name} (${z.dates}): milyen ${z.article} napjegyként, holdjegyként és aszcendensként, párkapcsolatban és munkában, és mi nem igaz róla.`,
|
||||
alternates: { canonical: `/csillagjegyek/${z.slug}` },
|
||||
};
|
||||
}
|
||||
|
||||
/** One sign: its facts, and what it means as Sun, Moon and Ascendant. */
|
||||
export default async function SignPage({ params }: { params: Promise<{ jegy: string }> }) {
|
||||
const z = ZODIAC_BY_SLUG.get((await params).jegy);
|
||||
if (!z) notFound();
|
||||
const me = await getMe();
|
||||
const base = await siteUrl();
|
||||
const index = ZODIAC.indexOf(z);
|
||||
const prev = ZODIAC[(index + 11) % 12];
|
||||
const next = ZODIAC[(index + 1) % 12];
|
||||
const opposite = ZODIAC_BY_SLUG.get(z.opposite)!;
|
||||
const glyph = SIGNS[z.id]?.glyph;
|
||||
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
<main className="page sign-page" style={{ maxWidth: 880 }}>
|
||||
<nav className="hint sign-crumbs" aria-label="Morzsamenü">
|
||||
<Link href="/csillagjegyek">Csillagjegyek</Link> / {z.name}
|
||||
</nav>
|
||||
<div className="page-head sign-head">
|
||||
<span className="sign-glyph" aria-hidden="true">
|
||||
{glyph}
|
||||
</span>
|
||||
<div>
|
||||
<h1>{z.name}</h1>
|
||||
<p className="muted">{z.dates}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table className="sign-facts">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">Elem</th>
|
||||
<td>{z.element}</td>
|
||||
<th scope="row">Minőség</th>
|
||||
<td>{z.modality}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Uralkodó bolygó</th>
|
||||
<td>{z.ruler}</td>
|
||||
<th scope="row">Ellentétes jegy</th>
|
||||
<td>
|
||||
<Link href={`/csillagjegyek/${opposite.slug}`}>{opposite.name}</Link>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p className="sign-intro">{z.intro}</p>
|
||||
<p className="hint">
|
||||
A dátumok évről évre egy napot csúszhatnak. Ha a határ közelében születtél, a{" "}
|
||||
<Link href="/aszcendens-kalkulator">kalkulátor</Link> pontosan megmondja, melyik jegy a tiéd.
|
||||
</p>
|
||||
|
||||
<section id="nap" className="sign-section">
|
||||
<h2>{z.name} napjegy</h2>
|
||||
<p>{z.sun}</p>
|
||||
</section>
|
||||
<section id="hold" className="sign-section">
|
||||
<h2>Hold {z.inSign}</h2>
|
||||
<p>{z.moon}</p>
|
||||
</section>
|
||||
<section id="aszcendens" className="sign-section">
|
||||
<h2>{z.name} aszcendens</h2>
|
||||
<p>{z.ascendant}</p>
|
||||
</section>
|
||||
<section className="sign-section">
|
||||
<h2>Párkapcsolatban</h2>
|
||||
<p>{z.love}</p>
|
||||
</section>
|
||||
<section className="sign-section">
|
||||
<h2>Munkában</h2>
|
||||
<p>{z.work}</p>
|
||||
</section>
|
||||
<section className="sign-section sign-myth">
|
||||
<h2>Amit rosszul tudnak róla</h2>
|
||||
<p>{z.myth}</p>
|
||||
</section>
|
||||
|
||||
<div className="sign-traits">
|
||||
<div>
|
||||
<h2>Erősségek</h2>
|
||||
<p>{z.strengths}</p>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Árnyoldalak</h2>
|
||||
<p>{z.challenges}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aside className="card sign-cta">
|
||||
<p style={{ margin: 0 }}>{z.offer}</p>
|
||||
<div className="form-actions">
|
||||
<Link href="/aszcendens-kalkulator" className="btn">
|
||||
Kiszámolom a holdjegyem és az aszcendensem
|
||||
</Link>
|
||||
<Link href={me ? "/keplet" : "/belepes?mod=regisztracio&vissza=/profil"} className="btn btn-primary">
|
||||
{me ? "A saját képletem" : "A teljes képletem ingyen"}
|
||||
</Link>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
<nav className="sign-pager" aria-label="Többi jegy">
|
||||
<Link href={`/csillagjegyek/${prev.slug}`}>← {prev.name}</Link>
|
||||
<Link href="/csillagjegyek">Mind a 12 jegy</Link>
|
||||
<Link href={`/csillagjegyek/${next.slug}`}>{next.name} →</Link>
|
||||
</nav>
|
||||
</main>
|
||||
<PublicFooter />
|
||||
<JsonLd
|
||||
data={{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "BreadcrumbList",
|
||||
itemListElement: [
|
||||
{
|
||||
"@type": "ListItem",
|
||||
position: 1,
|
||||
name: "Csillagjegyek",
|
||||
item: `${base}/csillagjegyek`,
|
||||
},
|
||||
{
|
||||
"@type": "ListItem",
|
||||
position: 2,
|
||||
name: z.name,
|
||||
item: `${base}/csillagjegyek/${z.slug}`,
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
|
||||
import { PublicFooter } from "@/components/PublicFooter";
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { ZODIAC } from "@/content/zodiac";
|
||||
import { SIGNS } from "@/lib/astro";
|
||||
import { getMe } from "@/lib/server";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Csillagjegyek: mind a 12 jegy napjegyként, holdjegyként és aszcendensként",
|
||||
description:
|
||||
"A tizenkét csillagjegy dátumokkal, elemekkel és uralkodó bolygókkal: milyen egy jegy napjegyként, holdjegyként és aszcendensként.",
|
||||
alternates: { canonical: "/csillagjegyek" },
|
||||
};
|
||||
|
||||
/** The twelve signs. */
|
||||
export default async function SignsPage() {
|
||||
const me = await getMe();
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
<main className="page" style={{ maxWidth: 1080 }}>
|
||||
<div className="page-head">
|
||||
<span className="eyebrow">Csillagjegyek</span>
|
||||
<h1>A tizenkét csillagjegy</h1>
|
||||
<p className="muted">
|
||||
A „milyen jegy vagy?” kérdésre a legtöbben a napjegyükkel felelnek. Pedig a Hold és az aszcendens jegye
|
||||
legalább ennyit elárul. Minden jegynél leírjuk, milyen napjegyként, holdjegyként és aszcendensként.
|
||||
</p>
|
||||
</div>
|
||||
<ul className="sign-grid">
|
||||
{ZODIAC.map((z) => (
|
||||
<li key={z.slug}>
|
||||
<Link href={`/csillagjegyek/${z.slug}`} className="card sign-tile">
|
||||
<span className="sign-tile-glyph" aria-hidden="true">
|
||||
{SIGNS[z.id]?.glyph}
|
||||
</span>
|
||||
<strong>{z.name}</strong>
|
||||
<span className="hint">{z.dates}</span>
|
||||
<span className="hint">
|
||||
{z.element} · {z.modality}
|
||||
</span>
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<div className="card sign-cta" style={{ marginTop: 32 }}>
|
||||
<p style={{ margin: 0 }}>
|
||||
Nem tudod, melyik jegyben áll a Holdad, vagy mi az aszcendensed? A kalkulátor a születési adataidból ingyen
|
||||
kiszámolja.
|
||||
</p>
|
||||
<div className="form-actions">
|
||||
<Link href="/aszcendens-kalkulator" className="btn btn-primary">
|
||||
Aszcendens- és holdjegy-kalkulátor
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<PublicFooter />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1126,3 +1126,49 @@ span.tarot-fan-card { cursor: default; }
|
||||
.birth-day { width: 5.2em; flex: none; }
|
||||
.birth-time { width: 4.4em; flex: none; text-align: center; }
|
||||
.birth-colon { color: var(--muted); font-weight: 600; }
|
||||
|
||||
/* Public sign calculator (/aszcendens-kalkulator) */
|
||||
.calc-form { margin-bottom: 8px; }
|
||||
.calc-result { display: flex; flex-direction: column; gap: 16px; margin: 24px 0 8px; scroll-margin-top: 16px; }
|
||||
.calc-signs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }
|
||||
.calc-sign { display: flex; flex-direction: column; gap: 10px; }
|
||||
.calc-sign-main { display: flex; align-items: baseline; gap: 10px; }
|
||||
.calc-sign-main strong { font-family: var(--font-display); font-size: 30px; font-weight: 600; }
|
||||
.calc-glyph { font-size: 30px; color: var(--gold); line-height: 1; }
|
||||
.calc-sign-link { font-size: 14px; margin-top: auto; }
|
||||
.calc-cta { display: flex; flex-direction: row; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
|
||||
.calc-cta > div { flex: 1 1 320px; }
|
||||
.calc-explain, .calc-faq { margin-top: 48px; display: flex; flex-direction: column; gap: 14px; }
|
||||
.calc-explain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
|
||||
.calc-explain h3 { font-size: 18px; margin: 0 0 6px; }
|
||||
.calc-explain p { margin: 0; color: var(--ink-2); line-height: 1.6; }
|
||||
.calc-faq-item { padding: 16px 20px; }
|
||||
.calc-faq-item summary { cursor: pointer; font-weight: 600; }
|
||||
.calc-faq-item p { margin: 10px 0 0; color: var(--ink-2); line-height: 1.6; }
|
||||
|
||||
/* Sign pages (/csillagjegyek) */
|
||||
.sign-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 16px; }
|
||||
.sign-tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); height: 100%; }
|
||||
.sign-tile:hover { border-color: #5a6790; color: var(--ink); }
|
||||
.sign-tile strong { font-family: var(--font-display); font-size: 26px; font-weight: 600; }
|
||||
.sign-tile-glyph { font-size: 28px; color: var(--gold); line-height: 1; }
|
||||
.sign-crumbs { margin-bottom: 8px; }
|
||||
.sign-crumbs a { color: var(--muted); }
|
||||
.sign-head { flex-direction: row; align-items: center; gap: 20px; }
|
||||
.sign-glyph { font-size: 64px; color: var(--gold); line-height: 1; }
|
||||
.sign-facts { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 15px; }
|
||||
.sign-facts th, .sign-facts td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
|
||||
.sign-facts th { color: var(--muted); font-weight: 500; white-space: nowrap; }
|
||||
.sign-intro { font-size: 18px; line-height: 1.65; }
|
||||
.sign-section { margin-top: 32px; scroll-margin-top: 16px; }
|
||||
.sign-section h2, .sign-traits h2 { font-size: 26px; margin: 0 0 10px; }
|
||||
.sign-section p, .sign-traits p { line-height: 1.7; color: var(--ink-2); margin: 0; }
|
||||
.sign-myth { border-left: 3px solid var(--gold); padding-left: 18px; }
|
||||
.sign-traits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; margin-top: 32px; }
|
||||
.sign-cta { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
|
||||
.sign-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 32px; font-size: 15px; }
|
||||
@media (max-width: 640px) {
|
||||
.sign-facts th, .sign-facts td { display: block; padding: 4px 0; border: 0; }
|
||||
.sign-facts td { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
|
||||
.sign-glyph { font-size: 48px; }
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Suspense } from "react";
|
||||
import { PaymentReturn } from "@/components/PaymentReturn";
|
||||
import { SiteHeader } from "@/components/SiteHeader";
|
||||
import { getMe } from "@/lib/server";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
|
||||
import "./globals.css";
|
||||
|
||||
@@ -15,10 +16,14 @@ const cormorant = Cormorant_Garamond({
|
||||
});
|
||||
const inter = Inter({ subsets: ["latin", "latin-ext"], variable: "--font-inter" });
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: { default: "Sorsfonalak", template: "%s · Sorsfonalak" },
|
||||
description: "Születési képlet, szinasztria és közösség – egy helyen.",
|
||||
};
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
return {
|
||||
// Relative canonical and alternate addresses resolve against the site's address.
|
||||
metadataBase: new URL(await siteUrl()),
|
||||
title: { default: "Sorsfonalak", template: "%s · Sorsfonalak" },
|
||||
description: "Születési képlet, szinasztria és közösség – egy helyen.",
|
||||
};
|
||||
}
|
||||
|
||||
export default async function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
const me = await getMe();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import type { Metadata } from "next";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
import { JsonLd } from "@/components/PublicFooter";
|
||||
import { OPERATOR } from "@/lib/legal";
|
||||
import { BACKEND_URL, getMe } from "@/lib/server";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
import type { PublicConfig } from "@/lib/types";
|
||||
@@ -44,5 +46,33 @@ async function signupMode(): Promise<PublicConfig["signup_mode"]> {
|
||||
export default async function Home() {
|
||||
const me = await getMe();
|
||||
if (me) redirect(me.primary_chart_id ? "/keplet" : "/profil");
|
||||
return <Landing inviteOnly={(await signupMode()) !== "open"} />;
|
||||
const base = await siteUrl();
|
||||
return (
|
||||
<>
|
||||
<Landing inviteOnly={(await signupMode()) !== "open"} />
|
||||
<JsonLd
|
||||
data={{
|
||||
"@context": "https://schema.org",
|
||||
"@graph": [
|
||||
{
|
||||
"@type": "Organization",
|
||||
"@id": `${base}/#organization`,
|
||||
name: "Sorsfonalak",
|
||||
url: `${base}/`,
|
||||
logo: `${base}/apple-icon.png`,
|
||||
email: OPERATOR.email,
|
||||
},
|
||||
{
|
||||
"@type": "WebSite",
|
||||
"@id": `${base}/#website`,
|
||||
name: "Sorsfonalak",
|
||||
url: `${base}/`,
|
||||
inLanguage: "hu",
|
||||
publisher: { "@id": `${base}/#organization` },
|
||||
},
|
||||
],
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.",
|
||||
alternates: { canonical: "/privacy", languages: { hu: "/adatvedelem", en: "/privacy" } },
|
||||
};
|
||||
|
||||
const DATA: [string, string, string][] = [
|
||||
|
||||
@@ -4,6 +4,7 @@ import { useEffect, useId, useMemo, useRef, useState } from "react";
|
||||
|
||||
import { ApiError, api, errorText } from "@/lib/api";
|
||||
import { countryName } from "@/lib/astro";
|
||||
import { MONTHS, composeDate, composeTime, daysIn } from "@/lib/birth";
|
||||
import type { BirthData, Country, Place } from "@/lib/types";
|
||||
|
||||
type Initial = (BirthData & { placeName: string | null; region: string | null }) | null;
|
||||
@@ -16,41 +17,6 @@ const ERRORS: Record<string, string> = {
|
||||
invalid_date: "Érvénytelen dátum.",
|
||||
};
|
||||
|
||||
const MONTHS = [
|
||||
"január",
|
||||
"február",
|
||||
"március",
|
||||
"április",
|
||||
"május",
|
||||
"június",
|
||||
"július",
|
||||
"augusztus",
|
||||
"szeptember",
|
||||
"október",
|
||||
"november",
|
||||
"december",
|
||||
];
|
||||
|
||||
const pad = (n: number) => String(n).padStart(2, "0");
|
||||
const daysIn = (year: number, month: number) => new Date(Date.UTC(year || 2000, month, 0)).getUTCDate();
|
||||
|
||||
/** "YYYY-MM-DD" from the three fields, or null while it is not a real date. */
|
||||
function composeDate(year: string, month: string, day: string): string | null {
|
||||
const y = Number(year);
|
||||
const m = Number(month);
|
||||
const d = Number(day);
|
||||
if (!/^\d{4}$/.test(year) || y < 1000 || !m || !d || d > daysIn(y, m)) return null;
|
||||
return `${year}-${pad(m)}-${pad(d)}`;
|
||||
}
|
||||
|
||||
/** "HH:MM" from the two fields, or null while it is not a real time. */
|
||||
function composeTime(hour: string, minute: string): string | null {
|
||||
if (!/^\d{1,2}$/.test(hour) || !/^\d{1,2}$/.test(minute)) return null;
|
||||
const h = Number(hour);
|
||||
const m = Number(minute);
|
||||
return h <= 23 && m <= 59 ? `${pad(h)}:${pad(m)}` : null;
|
||||
}
|
||||
|
||||
/** Someone else's chart: added with a name, or (with `chartId`) corrected. */
|
||||
export type PersonTarget = { chartId?: string; name?: string };
|
||||
|
||||
@@ -314,10 +280,21 @@ export function BirthForm({
|
||||
);
|
||||
}
|
||||
|
||||
export function CountrySelect({ value, onChange }: { value: string; onChange: (iso2: string) => void }) {
|
||||
/** Where the country list and the place search come from: logged-in users, or the public calculator. */
|
||||
export type GeoBase = "/api/geo" | "/api/v1/public/geo";
|
||||
|
||||
export function CountrySelect({
|
||||
value,
|
||||
onChange,
|
||||
geoBase = "/api/geo",
|
||||
}: {
|
||||
value: string;
|
||||
onChange: (iso2: string) => void;
|
||||
geoBase?: GeoBase;
|
||||
}) {
|
||||
const [countries, setCountries] = useState<Country[]>([]);
|
||||
useEffect(() => {
|
||||
fetch("/api/geo/countries")
|
||||
fetch(`${geoBase}/countries`)
|
||||
.then((r) => (r.ok ? r.json() : { countries: [] }))
|
||||
.then((d: { countries: Country[] }) => {
|
||||
const named = d.countries.map((c) => ({ iso2: c.iso2, name: countryName(c.iso2, c.name) }));
|
||||
@@ -325,7 +302,7 @@ export function CountrySelect({ value, onChange }: { value: string; onChange: (i
|
||||
setCountries(named);
|
||||
})
|
||||
.catch(() => setCountries([]));
|
||||
}, []);
|
||||
}, [geoBase]);
|
||||
return (
|
||||
<div className="field">
|
||||
<label htmlFor="birth-country">Ország</label>
|
||||
@@ -345,10 +322,12 @@ export function PlaceSearch({
|
||||
country,
|
||||
value,
|
||||
onChange,
|
||||
geoBase = "/api/geo",
|
||||
}: {
|
||||
country: string;
|
||||
value: Place | null;
|
||||
onChange: (p: Place | null) => void;
|
||||
geoBase?: GeoBase;
|
||||
}) {
|
||||
const listId = useId();
|
||||
const [query, setQuery] = useState(value?.name ?? "");
|
||||
@@ -377,7 +356,7 @@ export function PlaceSearch({
|
||||
setLoading(true);
|
||||
const timer = setTimeout(async () => {
|
||||
try {
|
||||
const res = await fetch(`/api/geo/places?country=${country}&q=${encodeURIComponent(q)}&limit=8`);
|
||||
const res = await fetch(`${geoBase}/places?country=${country}&q=${encodeURIComponent(q)}&limit=8`);
|
||||
const data = res.ok ? ((await res.json()) as { places: Place[] }) : { places: [] };
|
||||
if (id === seq.current) {
|
||||
setResults(data.places);
|
||||
@@ -391,7 +370,7 @@ export function PlaceSearch({
|
||||
}
|
||||
}, 250);
|
||||
return () => clearTimeout(timer);
|
||||
}, [query, country, value]);
|
||||
}, [query, country, value, geoBase]);
|
||||
|
||||
function choose(p: Place) {
|
||||
onChange(p);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { MetadataRoute } from "next";
|
||||
|
||||
import { ZODIAC } from "@/content/zodiac";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
|
||||
/** The public pages for search engines; everything else needs a login. */
|
||||
@@ -10,6 +11,9 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
|
||||
{ url: `${base}/`, changeFrequency: "weekly", priority: 1 },
|
||||
{ url: `${base}/pelda`, changeFrequency: "monthly", priority: 0.8 },
|
||||
{ url: `${base}/kartyajoslas/pelda`, changeFrequency: "monthly", priority: 0.7 },
|
||||
{ url: `${base}/aszcendens-kalkulator`, changeFrequency: "monthly", priority: 0.9 },
|
||||
{ url: `${base}/csillagjegyek`, changeFrequency: "monthly", priority: 0.8 },
|
||||
...ZODIAC.map((z) => ({ url: `${base}/csillagjegyek/${z.slug}`, changeFrequency: "monthly" as const, priority: 0.7 })),
|
||||
{ url: `${base}/aszf`, changeFrequency: "yearly", priority: 0.2 },
|
||||
{ url: `${base}/adatvedelem`, changeFrequency: "yearly", priority: 0.2, alternates: privacy },
|
||||
{ url: `${base}/privacy`, changeFrequency: "yearly", priority: 0.2, alternates: privacy },
|
||||
|
||||
Reference in New Issue
Block a user