A footer on every page

The root layout draws one footer for every page (the app pages, the
chart page and admin had none): the free content pages, Kapcsolat (the
feedback page when logged in, /kapcsolat otherwise), ÁSZF, Adatvédelem,
and Belépés when logged out. The pages drop their own; the home page
keeps its payment partners above it. The recommendation box sits right
before it on every page.

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-24 07:21:19 +00:00
co-authored by Claude Opus 5.5
parent 2eaae68271
commit 3a38518d07
14 changed files with 35 additions and 61 deletions
+2 -5
View File
@@ -22,7 +22,7 @@ A felhasználók elégedettségét a rendszeren belül mérjük: semmi nem megy
- **Hol érhető el:** - **Hol érhető el:**
- a fiókmenü „Visszajelzés” pontja (a menü magával viszi, melyik oldalon volt a felhasználó); - a fiókmenü „Visszajelzés” pontja (a menü magával viszi, melyik oldalon volt a felhasználó);
- a „Hiba jelzése” link a sikertelen elemzés, kártyajóslás és válasz üzeneténél; - a „Hiba jelzése” link a sikertelen elemzés, kártyajóslás és válasz üzeneténél;
- a lábléc „Kapcsolat” linkje (`/kapcsolat`): belépve ide visz, kijelentkezve az info@sorsfonalak.hu címet mutatja, és hogy belépve az oldalon is írhat (Belépés gomb, utána ide jut). - a lábléc „Kapcsolat” linkje (a lábléc minden oldalon ott van): belépve ide visz, kijelentkezve a `/kapcsolat` oldalra, ami az info@sorsfonalak.hu címet mutatja, és hogy belépve az oldalon is írhat (Belépés gomb, utána ide jut).
- **Az űrlap:** - **Az űrlap:**
- típus: *Hiba*, *Ötlet*, *Kérdés*, *Egyéb*; - típus: *Hiba*, *Ötlet*, *Kérdés*, *Egyéb*;
- üzenet: max. 2000 karakter; - üzenet: max. 2000 karakter;
@@ -35,10 +35,7 @@ A felhasználók elégedettségét a rendszeren belül mérjük: semmi nem megy
## 3. Ajánlási kérdés (NPS) ## 3. Ajánlási kérdés (NPS)
- **Kinek:** akinek már legalább 2 kész tartalma van (részletes elemzés, előrejelzés, kártyajóslás vagy válasz; az ingyenes összefoglaló nem számít). - **Kinek:** akinek már legalább 2 kész tartalma van (részletes elemzés, előrejelzés, kártyajóslás vagy válasz; az ingyenes összefoglaló nem számít).
- **Hogyan:** egyszer, egy bezárható dobozban az oldal legalján, a tartalom (a `main`) után, külön: „Mennyire ajánlanád a Sorsfonalakat egy barátodnak?” (0–10), utána egy nem kötelező „Mi a legfontosabb oka?”. - **Hogyan:** egyszer, egy bezárható dobozban az oldal legalján, a tartalom (a `main`) után és a lábléc előtt, külön: „Mennyire ajánlanád a Sorsfonalakat egy barátodnak?” (0–10), utána egy nem kötelező „Mi a legfontosabb oka?”. Fent túlságosan elvonta volna a figyelmet a tartalomról.
- Fent túlságosan elvonta volna a figyelmet a tartalomról.
- A nyilvános, lábléces oldalakon nem jelenik meg (a lábléc alá kerülne): a következő alkalmazás-oldalon jön elő.
- Alatta hely marad, hogy a jobb alsó „Kérdezz” gomb ne takarja.
- **Ha bezárja,** az is számít: nem jön elő újra. - **Ha bezárja,** az is számít: nem jön elő újra.
- **Pontszám:** a 9–10 ajánló, a 7–8 semleges, a 0–6 nem ajánló. Az NPS = (ajánlók − nem ajánlók) / válaszok × 100, −100 és 100 között. - **Pontszám:** a 9–10 ajánló, a 7–8 semleges, a 0–6 nem ajánló. Az NPS = (ajánlók − nem ajánlók) / válaszok × 100, −100 és 100 között.
+2 -17
View File
@@ -3,7 +3,7 @@ import Link from "next/link";
import { ChartWheel } from "@/components/ChartWheel"; import { ChartWheel } from "@/components/ChartWheel";
import { Rich } from "@/components/Rich"; import { Rich } from "@/components/Rich";
import { TarotCard, TarotCardBack } from "@/components/tarot/TarotCard"; import { TarotCard, TarotCardBack } from "@/components/tarot/TarotCard";
import { Logo, PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import example from "@/content/pelda.json"; import example from "@/content/pelda.json";
import { tarotCard } from "@/lib/tarot"; import { tarotCard } from "@/lib/tarot";
import type { AnalysisContent, ChartResult } from "@/lib/types"; import type { AnalysisContent, ChartResult } from "@/lib/types";
@@ -499,7 +499,7 @@ export function Landing({ inviteOnly, loggedIn = false }: { inviteOnly: boolean;
</div> </div>
</section> </section>
<footer className="lp-footer"> {/* Who takes the payments and makes the invoices, above the common footer. */}
<div className="lp-wrap lp-partners"> <div className="lp-wrap lp-partners">
<span className="hint">Fizetés</span> <span className="hint">Fizetés</span>
{/* eslint-disable-next-line @next/next/no-img-element */} {/* eslint-disable-next-line @next/next/no-img-element */}
@@ -508,21 +508,6 @@ export function Landing({ inviteOnly, loggedIn = false }: { inviteOnly: boolean;
{/* eslint-disable-next-line @next/next/no-img-element */} {/* eslint-disable-next-line @next/next/no-img-element */}
<img src="/logos/billingo.svg" alt="Billingo" width="80" height="26" className="lp-partner" /> <img src="/logos/billingo.svg" alt="Billingo" width="80" height="26" className="lp-partner" />
</div> </div>
<div className="lp-wrap lp-footer-inner">
<Logo />
<nav aria-label="Lábléc" className="lp-footer-nav">
<Link href="/szuletesi-horoszkop">Születési horoszkóp</Link>
<Link href="/csillagjegyek">Csillagjegyek</Link>
<Link href="/pelda">Példaelemzés</Link>
<Link href="/kartyajoslas/pelda">Példajóslás</Link>
<Link href="/kapcsolat">Kapcsolat</Link>
<Link href="/aszf">ÁSZF</Link>
<Link href="/adatvedelem">Adatvédelem</Link>
{!loggedIn && <Link href="/belepes">Belépés</Link>}
</nav>
<span className="hint">© {new Date().getFullYear()} Sorsfonalak</span>
</div>
</footer>
</div> </div>
); );
} }
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
import Link from "next/link"; import Link from "next/link";
import { notFound } from "next/navigation"; import { notFound } from "next/navigation";
import { JsonLd, PublicFooter } from "@/components/PublicFooter"; import { JsonLd } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { ZODIAC, ZODIAC_BY_SLUG } from "@/content/zodiac"; import { ZODIAC, ZODIAC_BY_SLUG } from "@/content/zodiac";
import { SIGNS } from "@/lib/astro"; import { SIGNS } from "@/lib/astro";
@@ -130,7 +130,6 @@ export default async function SignPage({ params }: { params: Promise<{ jegy: str
<Link href={`/csillagjegyek/${next.slug}`}>{next.name} →</Link> <Link href={`/csillagjegyek/${next.slug}`}>{next.name} →</Link>
</nav> </nav>
</main> </main>
<PublicFooter />
<JsonLd <JsonLd
data={{ data={{
"@context": "https://schema.org", "@context": "https://schema.org",
@@ -1,7 +1,6 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import Link from "next/link"; import Link from "next/link";
import { PublicFooter } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { ZODIAC } from "@/content/zodiac"; import { ZODIAC } from "@/content/zodiac";
import { SIGNS } from "@/lib/astro"; import { SIGNS } from "@/lib/astro";
@@ -46,7 +45,6 @@ export default async function SignsPage() {
))} ))}
</ul> </ul>
</main> </main>
<PublicFooter />
</> </>
); );
} }
+6 -3
View File
@@ -1084,6 +1084,8 @@ a.pair-row:hover strong { color: var(--gold); }
.lp-emblem-outer { fill: none; stroke: var(--gold); stroke-opacity: 0.5; stroke-width: 1; } .lp-emblem-outer { fill: none; stroke: var(--gold); stroke-opacity: 0.5; stroke-width: 1; }
.lp-disclaimer { max-width: 560px; } .lp-disclaimer { max-width: 560px; }
.lp-footer { border-top: 1px solid var(--line); padding: 28px 0; } .lp-footer { border-top: 1px solid var(--line); padding: 28px 0; }
/* The floating "Kérdezz" button must not cover the footer's last line. */
body:has(.qdock-fab) .site-footer { padding-bottom: 88px; }
.lp-footer-inner { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; } .lp-footer-inner { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.lp-footer-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; } .lp-footer-nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }
.lp-footer-nav a { color: var(--muted); text-decoration: none; } .lp-footer-nav a { color: var(--muted); text-decoration: none; }
@@ -1161,7 +1163,8 @@ a.pair-row:hover strong { color: var(--gold); }
} }
/* Home page footer: payment and invoicing partners */ /* Home page footer: payment and invoicing partners */
.lp-partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line); } /* On the home page, right above the common footer (whose top line separates them). */
.lp-partners { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding: 24px 16px; }
.lp-partner { height: 26px; width: auto; opacity: 0.65; transition: opacity 0.2s; } .lp-partner { height: 26px; width: auto; opacity: 0.65; transition: opacity 0.2s; }
.lp-partner:hover { opacity: 1; } .lp-partner:hover { opacity: 1; }
.lp-partners .hint + .lp-partner { margin-right: 18px; } .lp-partners .hint + .lp-partner { margin-right: 18px; }
@@ -1631,9 +1634,9 @@ span.tarot-fan-card { cursor: default; }
.feedback-body { margin: 0; white-space: pre-line; color: var(--ink-2); } .feedback-body { margin: 0; white-space: pre-line; color: var(--ink-2); }
.feedback-reply { padding: 10px 14px; border-left: 2px solid var(--gold); background: rgba(217, 180, 106, 0.06); border-radius: 0 8px 8px 0; } .feedback-reply { padding: 10px 14px; border-left: 2px solid var(--gold); background: rgba(217, 180, 106, 0.06); border-radius: 0 8px 8px 0; }
.feedback-reply p { margin: 4px 0 0; white-space: pre-line; } .feedback-reply p { margin: 4px 0 0; white-space: pre-line; }
/* At the bottom of the page; the room under it keeps the "Kérdezz" button off it. */ /* At the bottom of the page, before the footer. */
.nps { .nps {
max-width: 1180px; margin: 8px auto 96px; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; max-width: 1180px; margin: 8px auto 24px; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start;
background: var(--panel); border: 1px solid rgba(217, 180, 106, 0.4); border-radius: 12px; width: calc(100% - 32px); background: var(--panel); border: 1px solid rgba(217, 180, 106, 0.4); border-radius: 12px; width: calc(100% - 32px);
} }
.nps-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; } .nps-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@@ -5,7 +5,7 @@ import { notFound } from "next/navigation";
import { AnalysisView } from "@/components/AnalysisView"; import { AnalysisView } from "@/components/AnalysisView";
import { ChartWheel, WheelLegend } from "@/components/ChartWheel"; import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
import { JsonLd, PublicFooter } from "@/components/PublicFooter"; import { JsonLd } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { SIGNS, signName } from "@/lib/astro"; import { SIGNS, signName } from "@/lib/astro";
import { birthLine, celebrityImageVersion, loadCelebrity } from "@/lib/celebrities"; import { birthLine, celebrityImageVersion, loadCelebrity } from "@/lib/celebrities";
@@ -135,7 +135,6 @@ export default async function CelebrityPage({ params }: Props) {
A portrét mesterséges intelligencia írta, kizárólag a születési képlet alapján, nem az életrajz ismeretében. A portrét mesterséges intelligencia írta, kizárólag a születési képlet alapján, nem az életrajz ismeretében.
</p> </p>
</main> </main>
<PublicFooter />
</> </>
); );
} }
@@ -2,7 +2,6 @@ import type { Metadata } from "next";
import Image from "next/image"; import Image from "next/image";
import Link from "next/link"; import Link from "next/link";
import { PublicFooter } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { SIGNS, signName } from "@/lib/astro"; import { SIGNS, signName } from "@/lib/astro";
import { loadCelebrities } from "@/lib/celebrities"; import { loadCelebrities } from "@/lib/celebrities";
@@ -69,7 +68,6 @@ export default async function CelebritiesPage() {
</ul> </ul>
)} )}
</main> </main>
<PublicFooter />
</> </>
); );
} }
@@ -1,6 +1,5 @@
import Link from "next/link"; import Link from "next/link";
import { PublicFooter } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { YearNav } from "@/components/YearNav"; import { YearNav } from "@/components/YearNav";
import { MOON_PHASES, SIGNS } from "@/lib/astro"; import { MOON_PHASES, SIGNS } from "@/lib/astro";
@@ -119,7 +118,6 @@ export function MoonCalendar({ year, events, sky, me }: { year: number; events:
</p> </p>
</section> </section>
</main> </main>
<PublicFooter />
</> </>
); );
} }
@@ -2,7 +2,6 @@ import type { Metadata } from "next";
import Link from "next/link"; import Link from "next/link";
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
import { PublicFooter } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { OPERATOR } from "@/lib/legal"; import { OPERATOR } from "@/lib/legal";
import { getMe } from "@/lib/server"; import { getMe } from "@/lib/server";
@@ -42,7 +41,6 @@ export default async function ContactPage() {
</div> </div>
</section> </section>
</main> </main>
<PublicFooter />
</> </>
); );
} }
+2
View File
@@ -5,6 +5,7 @@ import { Suspense } from "react";
import { NightSky } from "@/components/NightSky"; import { NightSky } from "@/components/NightSky";
import { NpsBanner } from "@/components/NpsBanner"; import { NpsBanner } from "@/components/NpsBanner";
import { PaymentReturn } from "@/components/PaymentReturn"; import { PaymentReturn } from "@/components/PaymentReturn";
import { SiteFooter } from "@/components/PublicFooter";
import { SiteHeader } from "@/components/SiteHeader"; import { SiteHeader } from "@/components/SiteHeader";
import { ValidationMessages } from "@/components/ValidationMessages"; import { ValidationMessages } from "@/components/ValidationMessages";
import { getMe } from "@/lib/server"; import { getMe } from "@/lib/server";
@@ -39,6 +40,7 @@ export default async function RootLayout({ children }: { children: React.ReactNo
{children} {children}
{/* At the very bottom, apart from the page content: up top it drew the eye away. */} {/* At the very bottom, apart from the page content: up top it drew the eye away. */}
{me?.nps_due && <NpsBanner />} {me?.nps_due && <NpsBanner />}
<SiteFooter loggedIn={me !== null} />
{me && ( {me && (
<Suspense fallback={null}> <Suspense fallback={null}>
<PaymentReturn /> <PaymentReturn />
@@ -1,6 +1,5 @@
import Link from "next/link"; import Link from "next/link";
import { PublicFooter } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { YearNav } from "@/components/YearNav"; import { YearNav } from "@/components/YearNav";
import { POINTS } from "@/lib/astro"; import { POINTS } from "@/lib/astro";
@@ -112,7 +111,6 @@ export function RetrogradeCalendar({
</p> </p>
</section> </section>
</main> </main>
<PublicFooter />
</> </>
); );
} }
@@ -1,7 +1,7 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import Link from "next/link"; import Link from "next/link";
import { JsonLd, PublicFooter } from "@/components/PublicFooter"; import { JsonLd } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader"; import { PublicHeader } from "@/components/SiteHeader";
import { getMe } from "@/lib/server"; import { getMe } from "@/lib/server";
import { siteUrl } from "@/lib/share"; import { siteUrl } from "@/lib/share";
@@ -92,7 +92,6 @@ export default async function BirthChartPage() {
))} ))}
</section> </section>
</main> </main>
<PublicFooter />
<JsonLd <JsonLd
data={{ data={{
"@context": "https://schema.org", "@context": "https://schema.org",
@@ -1,20 +1,15 @@
"use client"; "use client";
import { usePathname } from "next/navigation"; import { useState } from "react";
import { useEffect, useState } from "react";
import { api, errorText } from "@/lib/api"; import { api, errorText } from "@/lib/api";
/** /**
* "Would you recommend us?" (0–10), once, as a box at the bottom of the page, * "Would you recommend us?" (0–10), once, as a box at the bottom of the page,
* after its content (no pop-up, no e-mail). Not on pages with the public * after its content and before the footer (no pop-up, no e-mail). Closing it
* footer (it would come under it): the next app page shows it. Closing it
* counts: it does not come again. * counts: it does not come again.
*/ */
export function NpsBanner() { export function NpsBanner() {
const pathname = usePathname();
const [footer, setFooter] = useState(true);
useEffect(() => setFooter(document.querySelector(".lp-footer") !== null), [pathname]);
const [shown, setShown] = useState(true); const [shown, setShown] = useState(true);
const [score, setScore] = useState<number | null>(null); const [score, setScore] = useState<number | null>(null);
const [comment, setComment] = useState(""); const [comment, setComment] = useState("");
@@ -41,7 +36,7 @@ export function NpsBanner() {
} }
} }
if (!shown || footer) return null; if (!shown) return null;
if (thanks) { if (thanks) {
return ( return (
<aside className="nps" aria-label="Köszönjük"> <aside className="nps" aria-label="Köszönjük">
@@ -2,10 +2,14 @@ import Link from "next/link";
import { Logo } from "@/components/SiteHeader"; import { Logo } from "@/components/SiteHeader";
/** The footer of the public content pages (calculator, signs): their links help visitors and search engines. */ /**
export function PublicFooter() { * The footer of every page (the root layout draws it): the free content
* pages (they help visitors and search engines), contact and the legal
* pages. Contact leads a logged-in user straight to the feedback page.
*/
export function SiteFooter({ loggedIn }: { loggedIn: boolean }) {
return ( return (
<footer className="lp-footer"> <footer className="lp-footer site-footer">
<div className="lp-wrap lp-footer-inner"> <div className="lp-wrap lp-footer-inner">
<Logo /> <Logo />
<nav aria-label="Lábléc" className="lp-footer-nav"> <nav aria-label="Lábléc" className="lp-footer-nav">
@@ -16,9 +20,10 @@ export function PublicFooter() {
<Link href="/retrograd">Retrográd bolygók</Link> <Link href="/retrograd">Retrográd bolygók</Link>
<Link href="/pelda">Példaelemzés</Link> <Link href="/pelda">Példaelemzés</Link>
<Link href="/kartyajoslas/pelda">Példajóslás</Link> <Link href="/kartyajoslas/pelda">Példajóslás</Link>
<Link href="/kapcsolat">Kapcsolat</Link> <Link href={loggedIn ? "/visszajelzes" : "/kapcsolat"}>Kapcsolat</Link>
<Link href="/aszf">ÁSZF</Link> <Link href="/aszf">ÁSZF</Link>
<Link href="/adatvedelem">Adatvédelem</Link> <Link href="/adatvedelem">Adatvédelem</Link>
{!loggedIn && <Link href="/belepes">Belépés</Link>}
</nav> </nav>
<span className="hint">© {new Date().getFullYear()} Sorsfonalak</span> <span className="hint">© {new Date().getFullYear()} Sorsfonalak</span>
</div> </div>