A new Kártyajóslás page: choose a spread (1, 3 or 5 cards), ask a question, pick the cards from the fanned deck and watch them turn over; the reading is written by the detailed-analysis model from the cards, their positions and base meanings, the question and the reader's Sun, Moon and Ascendant. The server shuffles and draws, so nobody can draw again for free. A reading is a 'tarot' analysis (worker, retries, fallback, refunds and admin regeneration as for analyses), uses one 'tarot' unit, and survives recalculations; deleting the account deletes it. Packages carry 2/5/10 readings, the new +5 kártyajóslás addon costs 1 000 Ft. The card artwork comes from the tarot design studio (celestial astrolabe style); the deck JSON is shared by the frontend and the prompt. A public example is at /kartyajoslas/pelda. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
68 lines
2.1 KiB
TypeScript
68 lines
2.1 KiB
TypeScript
import { tarotCard, type TarotContent, type TarotReading } from "@/lib/tarot";
|
|
|
|
import { Paragraphs, Rich } from "../Rich";
|
|
import { TarotCard } from "./TarotCard";
|
|
|
|
/**
|
|
* A written reading: the title and the gist, each card in its position with
|
|
* its text, how they read together, and the advice.
|
|
*/
|
|
export function TarotResult({
|
|
cards,
|
|
question,
|
|
content,
|
|
}: {
|
|
cards: TarotReading["cards"];
|
|
question: string | null;
|
|
content: TarotContent;
|
|
}) {
|
|
return (
|
|
<article className="tarot-result">
|
|
<header className="tarot-result-head">
|
|
<span className="eyebrow">A jóslásod</span>
|
|
<h2>{content.title}</h2>
|
|
{question && <p className="tarot-question">„{question}”</p>}
|
|
<p className="tarot-summary">
|
|
<Rich text={content.summary} />
|
|
</p>
|
|
</header>
|
|
|
|
<ol className="tarot-card-texts">
|
|
{cards.map((c, i) => {
|
|
const card = tarotCard(c.card);
|
|
if (!card) return null;
|
|
return (
|
|
<li key={`${c.card}-${i}`} className="tarot-card-text">
|
|
<TarotCard card={card} reversed={c.reversed} className="tarot-card-sm" />
|
|
<div className="tarot-card-text-body">
|
|
<span className="eyebrow">
|
|
{i + 1}. {c.position}
|
|
</span>
|
|
<h3>
|
|
{card.nameHu}
|
|
{c.reversed && <span className="muted"> · fordított</span>}
|
|
</h3>
|
|
{c.about && <p className="hint">{c.about}</p>}
|
|
<Paragraphs text={content.cards[i]?.body ?? ""} />
|
|
</div>
|
|
</li>
|
|
);
|
|
})}
|
|
</ol>
|
|
|
|
{content.synthesis && (
|
|
<section className="tarot-synthesis" aria-label="A lapok együtt">
|
|
<h3>A lapok együtt</h3>
|
|
<Paragraphs text={content.synthesis} />
|
|
</section>
|
|
)}
|
|
{content.advice && (
|
|
<section className="tarot-advice" aria-label="Útravaló">
|
|
<h3>Útravaló</h3>
|
|
<Paragraphs text={content.advice} />
|
|
</section>
|
|
)}
|
|
</article>
|
|
);
|
|
}
|