Tarot example: the draw played as an animation, and a love reading
The example page now plays each reading: cards are picked from the fanned deck, laid out and turned over, then the written reading appears below. A second example, a five-card love reading, sits next to the work one in a tab. The fan and the spread are shared with the real draw (TarotSpread). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -1007,6 +1007,17 @@ a.pair-row:hover strong { color: var(--gold); }
|
||||
.tarot-fan-card .tarot-card { box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4); }
|
||||
.tarot-fan-card:hover:not(:disabled), .tarot-fan-card:focus-visible { transform: rotate(calc(var(--i) * var(--step))) translateY(-14px); }
|
||||
.tarot-fan-card.is-picked { opacity: 0; transform: rotate(calc(var(--i) * var(--step))) translateY(-60px); cursor: default; }
|
||||
.tarot-fan-card { animation: tarot-deal 0.7s cubic-bezier(0.3, 0.7, 0.3, 1) backwards; }
|
||||
@keyframes tarot-deal { from { transform: rotate(0deg); } }
|
||||
span.tarot-fan-card { cursor: default; }
|
||||
.tarot-fan-card.is-lifted { transform: rotate(calc(var(--i) * var(--step))) translateY(-26px); }
|
||||
.tarot-fan-card.is-lifted .tarot-card { box-shadow: 0 0 0 1px var(--gold), 0 10px 26px rgba(217, 180, 106, 0.35); }
|
||||
|
||||
/* The example page: a reading played from the deck to the text. */
|
||||
.tarot-demo { display: flex; flex-direction: column; gap: 18px; padding-top: 8px; }
|
||||
.tarot-demo-status { text-align: center; min-height: 36px; display: flex; align-items: center; justify-content: center; }
|
||||
.tarot-demo-text { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(16px); }
|
||||
.tarot-demo-text.is-shown { max-height: none; overflow: visible; opacity: 1; transform: none; transition: opacity 0.8s ease, transform 0.8s ease; }
|
||||
|
||||
.tarot-result { display: flex; flex-direction: column; gap: 28px; }
|
||||
.tarot-result-head { display: flex; flex-direction: column; gap: 10px; }
|
||||
@@ -1034,5 +1045,5 @@ a.pair-row:hover strong { color: var(--gold); }
|
||||
.tarot-history-cards .tarot-card-xs:nth-child(n + 4) { display: none; }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.tarot-flip-inner, .tarot-fan-card { transition: none; animation: none; }
|
||||
.tarot-flip-inner, .tarot-fan-card, .tarot-demo-text { transition: none; animation: none; }
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@ import type { Metadata } from "next";
|
||||
import Link from "next/link";
|
||||
|
||||
import { PublicHeader } from "@/components/SiteHeader";
|
||||
import { TarotResult } from "@/components/tarot/TarotResult";
|
||||
import example from "@/content/tarot-pelda.json";
|
||||
import { TarotDemo, type TarotExample } from "@/components/tarot/TarotDemo";
|
||||
import data from "@/content/tarot-pelda.json";
|
||||
import { getMe } from "@/lib/server";
|
||||
import type { TarotContent, TarotReading } from "@/lib/tarot";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Példajóslás",
|
||||
description: "Így néz ki egy Sorsfonalak-kártyajóslás: három lap egy kitalált kérdésre, személyre szabott értelmezéssel.",
|
||||
description:
|
||||
"Így néz ki egy Sorsfonalak-kártyajóslás: lapválasztás a pakliból, kirakás és személyre szabott értelmezés, munkáról és szerelemről.",
|
||||
};
|
||||
|
||||
/** A full example tarot reading for a made-up question, for visitors and users without readings. */
|
||||
@@ -23,17 +23,11 @@ export default async function TarotExamplePage() {
|
||||
<span className="eyebrow">Példajóslás</span>
|
||||
<h1>Így néz ki egy kártyajóslás</h1>
|
||||
<p className="muted">
|
||||
A kérdés és a képlet kitalált ({example.signs}), a kirakás: {example.spread_name}. A saját jóslásod a te
|
||||
kérdésedre, a te lapjaidra és a képletedre készül.
|
||||
Két kitalált kérdés, két kirakás: nézd meg, hogyan választ a pakliból, hogyan fordulnak fel a lapok, és mit
|
||||
mondanak együtt. A saját jóslásod a te kérdésedre, a te lapjaidra és a képletedre készül.
|
||||
</p>
|
||||
</div>
|
||||
<section className="card">
|
||||
<TarotResult
|
||||
cards={example.cards as TarotReading["cards"]}
|
||||
question={example.question}
|
||||
content={example.content as TarotContent}
|
||||
/>
|
||||
</section>
|
||||
<TarotDemo examples={data.examples as TarotExample[]} />
|
||||
<section className="card" style={{ gap: 12 }}>
|
||||
<p>
|
||||
{me
|
||||
|
||||
Reference in New Issue
Block a user