- charts.kind own/person; a new person uses a 'person' unit (not refunded on delete); person packages and an unlimited entitlement; admins unlimited - a person's birth data can be corrected within an hour (admins any time) - /kepletek list with tiles, /kepletek/uj, correction page, mock person packages, chart page title switches between charts keeping the tab Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
44 lines
1.4 KiB
TypeScript
44 lines
1.4 KiB
TypeScript
import Link from "next/link";
|
||
|
||
import { SIGNS, formatBirthDate } from "@/lib/astro";
|
||
import type { ChartListItem } from "@/lib/types";
|
||
|
||
/** Sun, Moon and Ascendant sign glyphs of a chart. */
|
||
export function SignTrio({ chart }: { chart: ChartListItem }) {
|
||
const h = chart.highlights;
|
||
const items: [string, string | null][] = [
|
||
["☉", h.sun],
|
||
["☽", h.moon],
|
||
["AC", h.time_known ? h.ascendant : null],
|
||
];
|
||
return (
|
||
<span className="sign-trio" aria-hidden="true">
|
||
{items.map(([k, sign]) => (
|
||
<span key={k}>
|
||
<span className={k === "AC" ? "trio-ac" : "sym"}>{k}</span>
|
||
<span className="sym trio-sign">{sign ? SIGNS[sign]?.glyph : "–"}</span>
|
||
</span>
|
||
))}
|
||
</span>
|
||
);
|
||
}
|
||
|
||
/** One chart in the list: name, birth date and place, the three main signs. */
|
||
export function ChartCard({ chart, title, children }: { chart: ChartListItem; title: string; children?: React.ReactNode }) {
|
||
const { birth } = chart;
|
||
return (
|
||
<div className="chart-card">
|
||
<Link href={`/kepletek/${chart.id}`} className="chart-card-link">
|
||
<strong className="chart-card-name">{title}</strong>
|
||
<span className="muted">
|
||
{formatBirthDate(birth.date)}
|
||
{birth.time ? `, ${birth.time.slice(0, 5)}` : ""}
|
||
{birth.place ? ` · ${birth.place}` : ""}
|
||
</span>
|
||
<SignTrio chart={chart} />
|
||
</Link>
|
||
{children}
|
||
</div>
|
||
);
|
||
}
|