Night sky background with shooting stars on every page
CI / test (push) Successful in 1m42s
CI / build (push) Successful in 5m18s
CI / deploy (push) Skipped

Faint twinkling stars and, on average every 6 seconds, a gold shooting
star, on a fixed canvas behind all content: anything with its own
background (bands, cards, the header) covers it, so the meteor passes
under them. With reduced motion only still stars are drawn. Replaces the
home page hero's own starfield.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-21 21:23:52 +00:00
co-authored by Claude Opus 5.5
parent 8b8285b5d2
commit 116e4747c2
4 changed files with 149 additions and 20 deletions
-20
View File
@@ -12,21 +12,6 @@ import type { AnalysisContent, ChartResult } from "@/lib/types";
/** The cards fanned out next to the tarot line (after a card back). */
const TAROT_CARDS = ["major-2", "major-17"].map((id) => tarotCard(id)).filter((c) => c !== undefined);
// A quiet starfield, the same on every render.
const STARS = (() => {
let seed = 7;
const rnd = () => {
seed = (seed * 9301 + 49297) % 233280;
return seed / 233280;
};
return Array.from({ length: 70 }, (_, i) => ({
x: (rnd() * 1000).toFixed(1),
y: (rnd() * 600).toFixed(1),
r: (0.6 + rnd() * 1.4).toFixed(1),
t: i % 5,
}));
})();
const MONTHS = ["márc", "ápr", "máj", "jún", "júl", "aug", "szept", "okt", "nov", "dec", "jan", "febr"];
/** Points of a ring of the comparison picture. */
@@ -68,11 +53,6 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
<PublicHeader onHome />
<section className="lp-hero">
<svg className="lp-stars" aria-hidden="true" viewBox="0 0 1000 600" preserveAspectRatio="xMidYMid slice">
{STARS.map((s, i) => (
<circle key={i} cx={s.x} cy={s.y} r={s.r} className={`lp-star lp-t${s.t}`} />
))}
</svg>
<div className="lp-wrap lp-hero-grid">
<div className="lp-hero-text">
<span className="eyebrow lp-rise lp-r1">Születési képlet · Éves előrejelzés · Kapcsolat</span>