Feedback: the recommendation box at the bottom, a contact page

- The "would you recommend us?" box moves from under the header to the
  bottom of the page, after the content and apart from it (up top it drew
  the eye away); not on pages with the public footer
- /kapcsolat, linked from the footers: logged in, the feedback page;
  otherwise the e-mail address, and that logging in lets one write on the
  site; in the sitemap

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:17:58 +00:00
co-authored by Claude Opus 5.5
parent 62ae4a438e
commit 2eaae68271
8 changed files with 73 additions and 8 deletions
+1
View File
@@ -515,6 +515,7 @@ export function Landing({ inviteOnly, loggedIn = false }: { inviteOnly: boolean;
<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>}
+3 -1
View File
@@ -1631,8 +1631,9 @@ span.tarot-fan-card { cursor: default; }
.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 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. */
.nps {
max-width: 1180px; margin: 12px auto 0; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start;
max-width: 1180px; margin: 8px auto 96px; 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);
}
.nps-main { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
@@ -1670,3 +1671,4 @@ span.tarot-fan-card { cursor: default; }
.fb-weeks li { grid-template-columns: 90px minmax(0, 1fr) 70px; }
.nps-score { min-width: 34px; }
}
.contact-card p { margin: 0; }
@@ -0,0 +1,48 @@
import type { Metadata } from "next";
import Link from "next/link";
import { redirect } from "next/navigation";
import { PublicFooter } from "@/components/PublicFooter";
import { PublicHeader } from "@/components/SiteHeader";
import { OPERATOR } from "@/lib/legal";
import { getMe } from "@/lib/server";
export const metadata: Metadata = {
title: "Kapcsolat",
description: "Kérdésed, ötleted van, vagy hibát találtál? Írj nekünk e-mailt, vagy belépve üzenetet az oldalon.",
alternates: { canonical: "/kapcsolat" },
};
/** Contact: logged in, the feedback page; otherwise the e-mail address, and that logging in lets one write on the site. */
export default async function ContactPage() {
if (await getMe()) redirect("/visszajelzes");
return (
<>
<PublicHeader />
<main className="page" style={{ maxWidth: 760 }}>
<div className="page-head">
<span className="eyebrow">Kapcsolat</span>
<h1>Írj nekünk</h1>
<p className="muted">Kérdésed vagy ötleted van, esetleg hibát találtál? Szívesen segítünk.</p>
</div>
<section className="card contact-card">
<p>
E-mailben ezen a címen érsz el minket:{" "}
<a href={`mailto:${OPERATOR.email}`}>
<strong>{OPERATOR.email}</strong>
</a>
</p>
<p className="muted">
Ha belépsz, az oldalon is küldhetsz nekünk szöveges üzenetet, és a válaszunkat is ott látod.
</p>
<div className="form-actions">
<Link className="btn btn-primary" href="/belepes?vissza=%2Fvisszajelzes">
Belépés
</Link>
</div>
</section>
</main>
<PublicFooter />
</>
);
}
+2 -1
View File
@@ -36,8 +36,9 @@ export default async function RootLayout({ children }: { children: React.ReactNo
<NightSky />
<ValidationMessages />
{me && <SiteHeader me={me} />}
{me?.nps_due && <NpsBanner />}
{children}
{/* At the very bottom, apart from the page content: up top it drew the eye away. */}
{me?.nps_due && <NpsBanner />}
{me && (
<Suspense fallback={null}>
<PaymentReturn />
+2
View File
@@ -31,6 +31,8 @@ export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
priority: 0.6,
})),
{ url: `${base}/aszf`, changeFrequency: "yearly", priority: 0.2 },
{ url: `${base}/kapcsolat`, changeFrequency: "yearly", priority: 0.2 },
{ url: `${base}/adatvedelem`, changeFrequency: "yearly", priority: 0.2, alternates: privacy },
{ url: `${base}/privacy`, changeFrequency: "yearly", priority: 0.2, alternates: privacy },
];
+10 -4
View File
@@ -1,14 +1,20 @@
"use client";
import { useState } from "react";
import { usePathname } from "next/navigation";
import { useEffect, useState } from "react";
import { api, errorText } from "@/lib/api";
/**
* "Would you recommend us?" (0–10), once, as a bar under the header (no
* pop-up, no e-mail). Closing it counts: it does not come again.
* "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
* footer (it would come under it): the next app page shows it. Closing it
* counts: it does not come again.
*/
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 [score, setScore] = useState<number | null>(null);
const [comment, setComment] = useState("");
@@ -35,7 +41,7 @@ export function NpsBanner() {
}
}
if (!shown) return null;
if (!shown || footer) return null;
if (thanks) {
return (
<aside className="nps" aria-label="Köszönjük">
@@ -16,6 +16,7 @@ export function PublicFooter() {
<Link href="/retrograd">Retrográd bolygók</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>
</nav>