import type { Metadata } from "next"; import Image from "next/image"; import Link from "next/link"; import { notFound } from "next/navigation"; import { AnalysisView } from "@/components/AnalysisView"; import { ChartWheel, WheelLegend } from "@/components/ChartWheel"; import { JsonLd, PublicFooter } from "@/components/PublicFooter"; import { PublicHeader } from "@/components/SiteHeader"; import { SIGNS, signName } from "@/lib/astro"; import { birthLine, celebrityImageVersion, loadCelebrity } from "@/lib/celebrities"; import { objectPosition, photoSrc } from "@/lib/celebrityPhoto"; import { getMe } from "@/lib/server"; import { bigThree, plain, shorten, siteUrl } from "@/lib/share"; type Props = { params: Promise<{ slug: string }> }; export async function generateMetadata({ params }: Props): Promise { const { slug } = await params; const c = await loadCelebrity(slug); if (!c) return { title: "Nem található", robots: { index: false } }; const base = await siteUrl(); const title = `${c.name} horoszkópja`; const summary = c.analysis?.content.summary; const description = summary ? shorten(plain(summary), 200) : `${c.name} születési képlete: ${birthLine(c.chart.birth)}.`; const url = `${base}/hires-emberek/${c.slug}`; const image = { url: `${url}/kep/${celebrityImageVersion(c)}.png`, width: 1200, height: 630, alt: title }; return { title, description, // A draft (only admins see it) stays out of search engines. robots: c.published ? undefined : { index: false, follow: false }, alternates: { canonical: url }, openGraph: { type: "article", siteName: "Sorsfonalak", locale: "hu_HU", url, title, description, images: [image] }, twitter: { card: "summary_large_image", title, description, images: [image.url] }, }; } /** A famous person: photo, birth data, chart and the detailed portrait. */ export default async function CelebrityPage({ params }: Props) { const { slug } = await params; const [c, me] = await Promise.all([loadCelebrity(slug), getMe()]); if (!c) notFound(); const chart = c.chart; const trio = bigThree(chart); const base = await siteUrl(); return ( <> {!me && }
{!c.published && (

Vázlat: csak az adminok látják. Szerkesztés

)}
Híres emberek

{c.name} horoszkópja

{c.subtitle &&

{c.subtitle}

}

Született: {birthLine(chart.birth)}

{c.photo && (
{c.name}
)} {trio.length > 0 && (

{trio.map((t) => ( {" "} {t.label} {signName(t.sign)} ))}

)} {!chart.time_known && (

A születési idő nem ismert, ezért a képleten nincsenek házak és Aszcendens.

)}

És a te képleted mit mutat?

Add meg a születési adataidat, és megkapod a saját képletedet a rövid összefoglalóval együtt, ingyen.

{me ? "A saját képletem" : "Ingyenes születési horoszkóp"}
{c.analysis ? (
Asztrológiai portré
) : (

A részletes portré hamarosan elkészül.

)}

A portrét mesterséges intelligencia írta, kizárólag a születési képlet alapján, nem az életrajz ismeretében.

); }