Free birth chart instead of the sign calculator; free tools in the header
/szuletesi-horoszkop (was /aszcendens-kalkulator) shows the whole natal chart without an account: the wheel, Sun/Moon/Ascendant with links to the sign pages, the positions, houses, aspect grid and aspect list, the same views as the chart pages but without the AI parts. A calculation only, nothing saved, still 30 an hour per address (POST /v1/public/chart). The typed birth data are offered on the profile after sign-up. The visitors' header gets a separate 'Ingyenes' group (birth chart, signs) next to the paid sections, on phones in its own row; the home page links them under the hero buttons and in an 'Ingyenes' band. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -97,6 +97,10 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
Példaelemzés
|
||||
</Link>
|
||||
</div>
|
||||
<p className="lp-free-line lp-rise lp-r4">
|
||||
<span className="lp-free-label">Ingyenes</span>
|
||||
<Link href="/szuletesi-horoszkop">Nézd meg a születési horoszkópodat belépés nélkül →</Link>
|
||||
</p>
|
||||
<p className="hint lp-rise lp-r4">
|
||||
{inviteOnly ? (
|
||||
<>
|
||||
@@ -137,6 +141,34 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="lp-free-band" aria-labelledby="free-title">
|
||||
<div className="lp-wrap">
|
||||
<div className="lp-free-head">
|
||||
<span className="lp-free-label">Ingyenes</span>
|
||||
<h2 id="free-title" className="lp-free-title">
|
||||
Belépés nélkül is kipróbálhatod
|
||||
</h2>
|
||||
</div>
|
||||
<div className="lp-free-grid">
|
||||
<Link href="/szuletesi-horoszkop" className="card lp-free-card">
|
||||
<strong>Születési horoszkóp</strong>
|
||||
<span className="muted">
|
||||
A teljes képleted percre pontosan: képletrajz, aszcendens, holdjegy, bolygók a jegyekben és a házakban,
|
||||
fényszögek.
|
||||
</span>
|
||||
<span className="lp-free-go">Elkészítem →</span>
|
||||
</Link>
|
||||
<Link href="/csillagjegyek" className="card lp-free-card">
|
||||
<strong>A 12 csillagjegy</strong>
|
||||
<span className="muted">
|
||||
Milyen a jegyed napjegyként, holdjegyként és aszcendensként? Párkapcsolat, munka, és ami nem igaz róla.
|
||||
</span>
|
||||
<span className="lp-free-go">Megnézem →</span>
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="lp-band lp-why" aria-labelledby="why-title">
|
||||
<div className="lp-wrap lp-stack">
|
||||
<div className="lp-intro">
|
||||
@@ -480,7 +512,7 @@ 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="/szuletesi-horoszkop">Születési horoszkóp</Link>
|
||||
<Link href="/csillagjegyek">Csillagjegyek</Link>
|
||||
<Link href="/pelda">Példaelemzés</Link>
|
||||
<Link href="/kartyajoslas/pelda">Példajóslás</Link>
|
||||
|
||||
@@ -39,7 +39,7 @@ export default async function SignPage({ params }: { params: Promise<{ jegy: str
|
||||
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
{!me && <PublicHeader current="csillagjegyek" />}
|
||||
<main className="page sign-page" style={{ maxWidth: 880 }}>
|
||||
<nav className="hint sign-crumbs" aria-label="Morzsamenü">
|
||||
<Link href="/csillagjegyek">Csillagjegyek</Link> / {z.name}
|
||||
@@ -75,8 +75,8 @@ export default async function SignPage({ params }: { params: Promise<{ jegy: str
|
||||
|
||||
<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.
|
||||
A dátumok évről évre egy napot csúszhatnak. Ha a határ közelében születtél, az{" "}
|
||||
<Link href="/szuletesi-horoszkop">ingyenes születési horoszkóp</Link> pontosan megmondja, melyik jegy a tiéd.
|
||||
</p>
|
||||
|
||||
<section id="nap" className="sign-section">
|
||||
@@ -118,8 +118,8 @@ export default async function SignPage({ params }: { params: Promise<{ jegy: str
|
||||
<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 href="/szuletesi-horoszkop" className="btn">
|
||||
Ingyenes születési horoszkóp
|
||||
</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"}
|
||||
|
||||
@@ -19,7 +19,7 @@ export default async function SignsPage() {
|
||||
const me = await getMe();
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
{!me && <PublicHeader current="csillagjegyek" />}
|
||||
<main className="page" style={{ maxWidth: 1080 }}>
|
||||
<div className="page-head">
|
||||
<span className="eyebrow">Csillagjegyek</span>
|
||||
@@ -47,12 +47,12 @@ export default async function SignsPage() {
|
||||
</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.
|
||||
Nem tudod, melyik jegyben áll a Holdad, vagy mi az aszcendensed? Az ingyenes születési horoszkóp a születési
|
||||
adataidból kiszámolja, belépés nélkül.
|
||||
</p>
|
||||
<div className="form-actions">
|
||||
<Link href="/aszcendens-kalkulator" className="btn btn-primary">
|
||||
Aszcendens- és holdjegy-kalkulátor
|
||||
<Link href="/szuletesi-horoszkop" className="btn btn-primary">
|
||||
Ingyenes születési horoszkóp
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -820,6 +820,17 @@ a.pair-row:hover strong { color: var(--gold); }
|
||||
.lp-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
|
||||
.lp-header { gap: 16px; }
|
||||
.lp-nav { flex: 1; }
|
||||
/* The free tools in the visitors' header, set apart from the paid sections. */
|
||||
.lp-free { display: flex; align-items: center; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line-2); }
|
||||
.lp-free-label {
|
||||
font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--gold);
|
||||
border: 1px solid rgba(217, 180, 106, 0.45); border-radius: 999px; padding: 2px 8px; margin-right: 6px; white-space: nowrap;
|
||||
}
|
||||
.lp-free a {
|
||||
color: var(--ink); text-decoration: none; padding: 10px 10px; border-radius: 8px; min-height: 44px;
|
||||
display: inline-flex; align-items: center; white-space: nowrap;
|
||||
}
|
||||
.lp-free a:hover, .lp-free a[aria-current="page"] { color: var(--gold); background: rgba(217, 180, 106, 0.08); }
|
||||
.lp-hero { position: relative; overflow: hidden; }
|
||||
.lp-stars { position: absolute; inset: 0; width: 100%; height: 100%; }
|
||||
.lp-star { fill: var(--ink); opacity: 0.25; animation: lp-twinkle 6s ease-in-out infinite; }
|
||||
@@ -957,6 +968,10 @@ a.pair-row:hover strong { color: var(--gold); }
|
||||
.lp-pair { grid-template-columns: minmax(0, 1fr); justify-items: center; }
|
||||
.lp-rings { max-width: 200px; }
|
||||
.lp-nav { display: none; }
|
||||
/* On phones the free tools get their own row under the logo. */
|
||||
.lp-header { flex-wrap: wrap; row-gap: 4px; }
|
||||
.lp-free { order: 3; flex-basis: 100%; padding-left: 0; border-left: 0; overflow-x: auto; scrollbar-width: none; }
|
||||
.lp-header > .btn { margin-left: auto; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.lp *, .lp-orbit { animation: none !important; }
|
||||
@@ -1172,3 +1187,20 @@ span.tarot-fan-card { cursor: default; }
|
||||
.sign-facts td { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
|
||||
.sign-glyph { font-size: 48px; }
|
||||
}
|
||||
|
||||
/* The free tools on the home page, set apart from the paid sections */
|
||||
.lp-free-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 15px; }
|
||||
.lp-free-line .lp-free-label { margin-right: 0; }
|
||||
.lp-free-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); padding: 36px 0; }
|
||||
.lp-free-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
|
||||
.lp-free-title { margin: 0; font-family: var(--font-display); font-size: 30px; font-weight: 600; }
|
||||
.lp-free-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 16px; }
|
||||
.lp-free-card { display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); border-color: rgba(217, 180, 106, 0.35); }
|
||||
.lp-free-card:hover { border-color: var(--gold); color: var(--ink); }
|
||||
.lp-free-card strong { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
|
||||
.lp-free-go { color: var(--gold); font-weight: 500; margin-top: auto; }
|
||||
.calc-result-head { margin-top: 32px; }
|
||||
.calc-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
|
||||
.calc-links li { font-size: 15px; }
|
||||
.calc-save { display: flex; flex-direction: column; gap: 10px; }
|
||||
.calc-save .btn { align-self: flex-start; }
|
||||
|
||||
@@ -4,7 +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 { BIRTH_DRAFT_KEY, type BirthDraft, 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;
|
||||
@@ -61,6 +61,37 @@ export function BirthForm({
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const [busy, setBusy] = useState(false);
|
||||
const today = useMemo(() => new Date().toISOString().slice(0, 10), []);
|
||||
const [fromDraft, setFromDraft] = useState(false);
|
||||
|
||||
// The own birth data, not given yet: offer what the visitor typed into the
|
||||
// public birth chart page before signing up.
|
||||
useEffect(() => {
|
||||
if (initial || person) return;
|
||||
let draft: BirthDraft | null = null;
|
||||
try {
|
||||
draft = JSON.parse(localStorage.getItem(BIRTH_DRAFT_KEY) ?? "null");
|
||||
} catch {
|
||||
return;
|
||||
}
|
||||
if (!draft || !/^\d{4}-\d{2}-\d{2}$/.test(draft.date) || !draft.geonames_id) return;
|
||||
setYear(draft.date.slice(0, 4));
|
||||
setMonth(String(Number(draft.date.slice(5, 7))));
|
||||
setDay(String(Number(draft.date.slice(8, 10))));
|
||||
if (draft.time) {
|
||||
setHour(draft.time.slice(0, 2));
|
||||
setMinute(draft.time.slice(3, 5));
|
||||
}
|
||||
setTimeUnknown(!draft.time);
|
||||
setCountry(draft.country);
|
||||
setPlace({
|
||||
geonames_id: draft.geonames_id,
|
||||
name: draft.placeName,
|
||||
region: draft.region,
|
||||
population: null,
|
||||
country_code: draft.country,
|
||||
});
|
||||
setFromDraft(true);
|
||||
}, [initial, person]);
|
||||
|
||||
async function submit(e: React.FormEvent) {
|
||||
e.preventDefault();
|
||||
@@ -100,6 +131,11 @@ export function BirthForm({
|
||||
? { label: name.trim(), is_primary: false, birth }
|
||||
: { label: "Saját képlet", is_primary: true, birth },
|
||||
});
|
||||
try {
|
||||
localStorage.removeItem(BIRTH_DRAFT_KEY);
|
||||
} catch {
|
||||
// storage blocked
|
||||
}
|
||||
onSaved(saved.id);
|
||||
} catch (err) {
|
||||
if (err instanceof ApiError && err.code === "ambiguous_local_time") {
|
||||
@@ -117,6 +153,11 @@ export function BirthForm({
|
||||
|
||||
return (
|
||||
<form onSubmit={submit} className="field" style={{ gap: 18 }} noValidate>
|
||||
{fromDraft && (
|
||||
<p className="msg msg-ok" style={{ margin: 0 }}>
|
||||
Áthoztuk az adatokat, amelyeket a születési horoszkópnál megadtál. Ellenőrizd, és mentsd el.
|
||||
</p>
|
||||
)}
|
||||
{person && (
|
||||
<div className="field" style={{ maxWidth: 420 }}>
|
||||
<label htmlFor="person-name">Név</label>
|
||||
@@ -346,6 +387,11 @@ export function PlaceSearch({
|
||||
setResults([]);
|
||||
}, [country]);
|
||||
|
||||
// A place set from outside (e.g. brought over from the public chart page) shows its name.
|
||||
useEffect(() => {
|
||||
if (value) setQuery((q) => (q === value.name ? q : value.name));
|
||||
}, [value]);
|
||||
|
||||
useEffect(() => {
|
||||
const q = query.trim();
|
||||
if (q.length < 2 || (value && value.name === query)) {
|
||||
|
||||
@@ -11,7 +11,7 @@ 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}/szuletesi-horoszkop`, 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 },
|
||||
|
||||
+143
-86
@@ -4,22 +4,20 @@ import Link from "next/link";
|
||||
import { useMemo, useRef, useState } from "react";
|
||||
|
||||
import { CountrySelect, PlaceSearch } from "@/app/profil/BirthForm";
|
||||
import { AspectGrid, AspectList, BigThree, PositionTables } from "@/components/ChartTables";
|
||||
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
||||
import { Tabs } from "@/components/Tabs";
|
||||
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";
|
||||
import { ASPECTS, countryName, formatBirthDate } from "@/lib/astro";
|
||||
import { BIRTH_DRAFT_KEY, MONTHS, type BirthDraft, composeDate, composeTime, daysIn } from "@/lib/birth";
|
||||
import type { BirthData, Chart, ChartResult, 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;
|
||||
highlights: Chart["highlights"];
|
||||
/** Without a birth time: the sign may have been the neighbouring one at the start or end of the day. */
|
||||
uncertain: { sun: boolean; moon: boolean };
|
||||
chart: ChartResult;
|
||||
}
|
||||
|
||||
const ERRORS: Record<string, string> = {
|
||||
@@ -30,35 +28,124 @@ const ERRORS: Record<string, string> = {
|
||||
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];
|
||||
const GRID_LEGEND = ["conjunction", "sextile", "square", "trine", "opposition"];
|
||||
|
||||
/** Links to the sign pages of the Sun, Moon and Ascendant. */
|
||||
function SignLinks({ result }: { result: Result }) {
|
||||
const links: [string, string | null, string, boolean][] = [
|
||||
["Napjegy", result.highlights.sun, "nap", result.uncertain.sun],
|
||||
["Holdjegy", result.highlights.moon, "hold", result.uncertain.moon],
|
||||
["Aszcendens", result.highlights.time_known ? result.highlights.ascendant : null, "aszcendens", false],
|
||||
];
|
||||
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 className="card calc-links">
|
||||
<span className="eyebrow">Mit jelentenek?</span>
|
||||
<ul>
|
||||
{links.map(([label, sign, anchor, uncertain]) => {
|
||||
const z = sign ? ZODIAC_BY_ID.get(sign) : undefined;
|
||||
return (
|
||||
<li key={anchor}>
|
||||
{z ? (
|
||||
<Link href={`/csillagjegyek/${z.slug}#${anchor}`}>
|
||||
{label}: {z.name} →
|
||||
</Link>
|
||||
) : (
|
||||
<span className="muted">{label}: pontos születési idő kell hozzá</span>
|
||||
)}
|
||||
{uncertain && <span className="hint"> (a születési idő nélkül a szomszédos jegy is lehet)</span>}
|
||||
</li>
|
||||
);
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
/** The public Sun, Moon and Ascendant calculator: a calculation only, nothing is saved and no AI is used. */
|
||||
export function SignCalculator() {
|
||||
/** The calculated chart: the wheel and the tables of the chart pages, without the AI parts. */
|
||||
function ChartView({ result, birth }: { result: Result; birth: BirthData }) {
|
||||
const r = result.chart;
|
||||
const timeKnown = result.highlights.time_known;
|
||||
const chart: Chart = {
|
||||
id: "",
|
||||
label: "Születési horoszkóp",
|
||||
is_primary: false,
|
||||
kind: "person",
|
||||
editable_until: null,
|
||||
birth_data: birth,
|
||||
highlights: result.highlights,
|
||||
chart: r,
|
||||
created_at: "",
|
||||
};
|
||||
const place = r.location.place;
|
||||
const country = place?.country_code ?? birth.country;
|
||||
return (
|
||||
<>
|
||||
<div className="page-head calc-result-head">
|
||||
<h2>A születési horoszkópod</h2>
|
||||
<p className="muted">
|
||||
{formatBirthDate(birth.date)}
|
||||
{timeKnown
|
||||
? `, ${r.time.local.slice(11, 16)} (UTC${r.time.utc_offset}${r.time.dst ? ", nyári idő" : ""})`
|
||||
: ", ismeretlen időpont"}
|
||||
{" · "}
|
||||
{place?.name ?? "–"}
|
||||
{country ? `, ${countryName(country)}` : ""}
|
||||
</p>
|
||||
</div>
|
||||
<section className="chart-layout" aria-label="Képletrajz">
|
||||
<div className="card chart-wheel-card">
|
||||
<ChartWheel chart={r} timeKnown={timeKnown} />
|
||||
<WheelLegend />
|
||||
</div>
|
||||
<div className="field chart-side">
|
||||
<BigThree chart={chart} />
|
||||
<SignLinks result={result} />
|
||||
<div className="card calc-save">
|
||||
<strong>Mentsd el, és ingyen elemezzük</strong>
|
||||
<p className="muted" style={{ margin: 0 }}>
|
||||
Regisztráció után a képleted megmarad, és ingyen kapsz hozzá egy rövid, személyre szabott összefoglalót.
|
||||
Innen kérhetsz részletes elemzést, éves előrejelzést vagy kapcsolati összevetést is.
|
||||
</p>
|
||||
<Link href="/belepes?mod=regisztracio&vissza=/profil" className="btn btn-primary">
|
||||
Mentés és ingyenes összefoglaló
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section className="card chart-tabs" aria-label="A képlet részletei">
|
||||
<Tabs
|
||||
label="A képlet részletei"
|
||||
tabs={[
|
||||
{ id: "bolygok", label: "Bolygók", content: <PositionTables chart={chart} /> },
|
||||
{
|
||||
id: "matrix",
|
||||
label: "Mátrix",
|
||||
content: (
|
||||
<div className="field" style={{ gap: 16 }}>
|
||||
<AspectGrid chart={chart} />
|
||||
<ul className="grid-legend" aria-label="Jelmagyarázat">
|
||||
{GRID_LEGEND.map((k) => (
|
||||
<li key={k}>
|
||||
<span className={`sym asp asp-${k}`} aria-hidden="true">
|
||||
{ASPECTS[k]?.glyph}
|
||||
</span>{" "}
|
||||
{ASPECTS[k]?.hu}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{ id: "reszletek", label: "Fényszögek", content: <AspectList chart={chart} /> },
|
||||
]}
|
||||
/>
|
||||
</section>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
/** The public birth chart: a calculation only, nothing is saved and no AI is used. */
|
||||
export function PublicChart() {
|
||||
const [year, setYear] = useState("");
|
||||
const [month, setMonth] = useState("");
|
||||
const [day, setDay] = useState("");
|
||||
@@ -71,7 +158,7 @@ export function SignCalculator() {
|
||||
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 [result, setResult] = useState<{ result: Result; birth: BirthData } | null>(null);
|
||||
const minuteRef = useRef<HTMLInputElement>(null);
|
||||
const resultRef = useRef<HTMLDivElement>(null);
|
||||
const today = useMemo(() => new Date().toISOString().slice(0, 10), []);
|
||||
@@ -88,16 +175,23 @@ export function SignCalculator() {
|
||||
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 } : {}),
|
||||
},
|
||||
const birth = {
|
||||
date,
|
||||
...(timeUnknown ? {} : { time }),
|
||||
country,
|
||||
geonames_id: place.geonames_id,
|
||||
};
|
||||
const r = await api<Result>("/public/chart", {
|
||||
body: { ...birth, ...(ambiguous ? { ambiguous_time: ambiguity } : {}) },
|
||||
});
|
||||
setResult(r);
|
||||
setResult({ result: r, birth });
|
||||
// After sign-up the profile page offers these birth data.
|
||||
const draft: BirthDraft = { ...birth, time: birth.time ?? null, placeName: place.name, region: place.region };
|
||||
try {
|
||||
localStorage.setItem(BIRTH_DRAFT_KEY, JSON.stringify(draft));
|
||||
} catch {
|
||||
// storage blocked
|
||||
}
|
||||
requestAnimationFrame(() =>
|
||||
resultRef.current?.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
@@ -118,8 +212,6 @@ export function SignCalculator() {
|
||||
}
|
||||
}
|
||||
|
||||
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>
|
||||
@@ -259,50 +351,15 @@ export function SignCalculator() {
|
||||
)}
|
||||
<div className="form-actions">
|
||||
<button type="submit" className="btn btn-primary" disabled={busy}>
|
||||
{busy ? "Számolás…" : "Kiszámolom"}
|
||||
{busy ? "Számolás…" : "Elkészítem a horoszkópom"}
|
||||
</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 ref={resultRef} className="calc-result" aria-live="polite" aria-label="A születési horoszkópod">
|
||||
<ChartView result={result.result} birth={result.birth} />
|
||||
</section>
|
||||
)}
|
||||
</>
|
||||
+23
-19
@@ -6,23 +6,27 @@ import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { getMe } from "@/lib/server";
|
||||
import { siteUrl } from "@/lib/share";
|
||||
|
||||
import { SignCalculator } from "./SignCalculator";
|
||||
import { PublicChart } from "./PublicChart";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Aszcendens- és holdjegy-kalkulátor",
|
||||
title: "Ingyenes születési horoszkóp: képletrajz, aszcendens, holdjegy",
|
||||
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" },
|
||||
"Készítsd el ingyen, belépés nélkül a születési horoszkópodat: képletrajz, aszcendens, holdjegy, a bolygók jegyekben és házakban, fényszögek.",
|
||||
alternates: { canonical: "/szuletesi-horoszkop" },
|
||||
};
|
||||
|
||||
const FAQ: [string, string][] = [
|
||||
[
|
||||
"Mit mutat a születési horoszkóp?",
|
||||
"A születési horoszkóp (más néven születési képlet vagy radix) az égbolt térképe a születésed pillanatában: hol állt a Nap, a Hold és a nyolc bolygó az állatövben, melyik házban, és milyen szöget zártak be egymással. A képletrajz és a táblázatok ezt mutatják.",
|
||||
],
|
||||
[
|
||||
"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.",
|
||||
"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 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.",
|
||||
"A horizonton nagyjából két óránként vált a jegy, ezért az aszcendens és a házak pár perc alatt is eltolódhatnak. Születési idő nélkül a bolygók jegyei kiderülnek, de aszcendens és házak nincsenek. 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?",
|
||||
@@ -30,31 +34,31 @@ const FAQ: [string, string][] = [
|
||||
],
|
||||
[
|
||||
"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.",
|
||||
"A napilapok csak a napjegyet nézik, ami egy hónapnyi születésnapra ugyanaz. A születési képlet ezzel szemben percre és helyre pontos: két ember, aki ugyanazon a napon született, más órában vagy más városban, egészen más képletet kap.",
|
||||
],
|
||||
];
|
||||
|
||||
/** The public sign calculator: no login, no AI, nothing saved. */
|
||||
export default async function CalculatorPage() {
|
||||
/** The public birth chart: no login, no AI, nothing saved. */
|
||||
export default async function BirthChartPage() {
|
||||
const me = await getMe();
|
||||
const base = await siteUrl();
|
||||
return (
|
||||
<>
|
||||
{!me && <PublicHeader />}
|
||||
<main className="page calc-page" style={{ maxWidth: 980 }}>
|
||||
{!me && <PublicHeader current="horoszkop" />}
|
||||
<main className="page calc-page" style={{ maxWidth: 1180 }}>
|
||||
<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.
|
||||
<span className="eyebrow">Ingyenes, belépés nélkül</span>
|
||||
<h1>Születési horoszkóp</h1>
|
||||
<p className="muted" style={{ maxWidth: 760 }}>
|
||||
Add meg, mikor és hol születtél, és percre pontosan kiszámoljuk a képletedet: a képletrajzot, az aszcendenst
|
||||
és a holdjegyet, a bolygókat a jegyekben és a házakban, és a köztük lévő fényszögeket.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<SignCalculator />
|
||||
<PublicChart />
|
||||
|
||||
<section className="calc-explain" aria-labelledby="calc-explain-title">
|
||||
<h2 id="calc-explain-title">Nap, Hold, aszcendens: mit mutat a három?</h2>
|
||||
<h2 id="calc-explain-title">Nap, Hold, aszcendens: a három legfontosabb pont</h2>
|
||||
<div className="calc-explain-grid">
|
||||
<div>
|
||||
<h3>Napjegy</h3>
|
||||
@@ -93,7 +97,7 @@ export default async function CalculatorPage() {
|
||||
data={{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "FAQPage",
|
||||
url: `${base}/aszcendens-kalkulator`,
|
||||
url: `${base}/szuletesi-horoszkop`,
|
||||
mainEntity: FAQ.map(([q, a]) => ({
|
||||
"@type": "Question",
|
||||
name: q,
|
||||
@@ -9,7 +9,7 @@ export function PublicFooter() {
|
||||
<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="/szuletesi-horoszkop">Születési horoszkóp</Link>
|
||||
<Link href="/csillagjegyek">Csillagjegyek</Link>
|
||||
<Link href="/pelda">Példaelemzés</Link>
|
||||
<Link href="/kartyajoslas/pelda">Példajóslás</Link>
|
||||
|
||||
@@ -31,11 +31,19 @@ export function Logo() {
|
||||
}
|
||||
|
||||
/**
|
||||
* The header for visitors (not logged in): the home page sections, the
|
||||
* example and the login. `onHome`: the section links stay on the page.
|
||||
* The header for visitors (not logged in): the home page sections and the
|
||||
* example, then, set apart, the free tools, and the login. `onHome`: the
|
||||
* section links stay on the page.
|
||||
*/
|
||||
export function PublicHeader({ onHome = false, current }: { onHome?: boolean; current?: "pelda" }) {
|
||||
export function PublicHeader({
|
||||
onHome = false,
|
||||
current,
|
||||
}: {
|
||||
onHome?: boolean;
|
||||
current?: "pelda" | "horoszkop" | "csillagjegyek";
|
||||
}) {
|
||||
const home = onHome ? "" : "/";
|
||||
const here = (page: typeof current) => (current === page ? "page" : undefined);
|
||||
return (
|
||||
<header className="site-header lp-header">
|
||||
<Logo />
|
||||
@@ -43,10 +51,19 @@ export function PublicHeader({ onHome = false, current }: { onHome?: boolean; cu
|
||||
<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}>
|
||||
<Link href="/pelda" aria-current={here("pelda")}>
|
||||
Példa
|
||||
</Link>
|
||||
</nav>
|
||||
<nav className="lp-free" aria-label="Ingyenes, belépés nélkül">
|
||||
<span className="lp-free-label">Ingyenes</span>
|
||||
<Link href="/szuletesi-horoszkop" aria-current={here("horoszkop")}>
|
||||
Születési horoszkóp
|
||||
</Link>
|
||||
<Link href="/csillagjegyek" aria-current={here("csillagjegyek")}>
|
||||
Csillagjegyek
|
||||
</Link>
|
||||
</nav>
|
||||
<Link href="/belepes" className="btn btn-sm">
|
||||
Belépés
|
||||
</Link>
|
||||
|
||||
@@ -37,3 +37,15 @@ export function composeTime(hour: string, minute: string): string | null {
|
||||
const m = Number(minute);
|
||||
return h <= 23 && m <= 59 ? `${pad(h)}:${pad(m)}` : null;
|
||||
}
|
||||
|
||||
/** Birth data typed into the public chart page, offered on the profile after sign-up. */
|
||||
export const BIRTH_DRAFT_KEY = "sf_birth_draft";
|
||||
|
||||
export interface BirthDraft {
|
||||
date: string;
|
||||
time: string | null;
|
||||
country: string;
|
||||
geonames_id: number;
|
||||
placeName: string;
|
||||
region: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user