diff --git a/docs/visszajelzesek.md b/docs/visszajelzesek.md index c6f3a66..6ab51bc 100644 --- a/docs/visszajelzesek.md +++ b/docs/visszajelzesek.md @@ -21,7 +21,8 @@ A felhasználók elégedettségét a rendszeren belül mérjük: semmi nem megy - **Hol érhető el:** - 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). - **Az űrlap:** - típus: *Hiba*, *Ötlet*, *Kérdés*, *Egyéb*; - üzenet: max. 2000 karakter; @@ -34,7 +35,10 @@ 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) - **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ó sávban a fejléc alatt: „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, 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. + - 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. - **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. diff --git a/services/frontend/src/app/Landing.tsx b/services/frontend/src/app/Landing.tsx index ae48aef..ec30610 100644 --- a/services/frontend/src/app/Landing.tsx +++ b/services/frontend/src/app/Landing.tsx @@ -515,6 +515,7 @@ export function Landing({ inviteOnly, loggedIn = false }: { inviteOnly: boolean; Csillagjegyek Példaelemzés Példajóslás + Kapcsolat ÁSZF Adatvédelem {!loggedIn && Belépés} diff --git a/services/frontend/src/app/globals.css b/services/frontend/src/app/globals.css index a066963..85742cc 100644 --- a/services/frontend/src/app/globals.css +++ b/services/frontend/src/app/globals.css @@ -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; } diff --git a/services/frontend/src/app/kapcsolat/page.tsx b/services/frontend/src/app/kapcsolat/page.tsx new file mode 100644 index 0000000..075858e --- /dev/null +++ b/services/frontend/src/app/kapcsolat/page.tsx @@ -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 ( + <> + +
+
+ Kapcsolat +

Írj nekünk

+

Kérdésed vagy ötleted van, esetleg hibát találtál? Szívesen segítünk.

+
+
+

+ E-mailben ezen a címen érsz el minket:{" "} + + {OPERATOR.email} + +

+

+ Ha belépsz, az oldalon is küldhetsz nekünk szöveges üzenetet, és a válaszunkat is ott látod. +

+
+ + Belépés + +
+
+
+ + + ); +} diff --git a/services/frontend/src/app/layout.tsx b/services/frontend/src/app/layout.tsx index 4cf10c8..a5c3e3e 100644 --- a/services/frontend/src/app/layout.tsx +++ b/services/frontend/src/app/layout.tsx @@ -36,8 +36,9 @@ export default async function RootLayout({ children }: { children: React.ReactNo {me && } - {me?.nps_due && } {children} + {/* At the very bottom, apart from the page content: up top it drew the eye away. */} + {me?.nps_due && } {me && ( diff --git a/services/frontend/src/app/sitemap.ts b/services/frontend/src/app/sitemap.ts index 8913298..7f2bafb 100644 --- a/services/frontend/src/app/sitemap.ts +++ b/services/frontend/src/app/sitemap.ts @@ -31,6 +31,8 @@ export default async function sitemap(): Promise { 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 }, ]; diff --git a/services/frontend/src/components/NpsBanner.tsx b/services/frontend/src/components/NpsBanner.tsx index ea47c7f..4ed524f 100644 --- a/services/frontend/src/components/NpsBanner.tsx +++ b/services/frontend/src/components/NpsBanner.tsx @@ -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(null); const [comment, setComment] = useState(""); @@ -35,7 +41,7 @@ export function NpsBanner() { } } - if (!shown) return null; + if (!shown || footer) return null; if (thanks) { return (