From 1ab693175ea217cb7b2d98a8daccd26c8211dcd6 Mon Sep 17 00:00:00 2001 From: feco Date: Thu, 19 Nov 2026 11:42:02 +0000 Subject: [PATCH] The visitor header on every public page The example analysis, shared charts, the invitation page and the privacy page showed visitors just the logo. They now get the home page's header: the sections, the example and the login. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL --- services/frontend/src/app/Landing.tsx | 15 ++---------- .../frontend/src/app/adatvedelem/page.tsx | 6 ++--- .../src/app/meghivas/[token]/page.tsx | 6 ++--- services/frontend/src/app/pelda/page.tsx | 6 ++--- services/frontend/src/app/s/[slug]/page.tsx | 10 ++------ .../frontend/src/components/SiteHeader.tsx | 24 +++++++++++++++++++ 6 files changed, 34 insertions(+), 33 deletions(-) diff --git a/services/frontend/src/app/Landing.tsx b/services/frontend/src/app/Landing.tsx index ad994a6..ef3797c 100644 --- a/services/frontend/src/app/Landing.tsx +++ b/services/frontend/src/app/Landing.tsx @@ -2,7 +2,7 @@ import Link from "next/link"; import { ChartWheel } from "@/components/ChartWheel"; import { Rich } from "@/components/Rich"; -import { Logo } from "@/components/SiteHeader"; +import { Logo, PublicHeader } from "@/components/SiteHeader"; import { Waitlist } from "@/components/Waitlist"; import example from "@/content/pelda.json"; import type { AnalysisContent, ChartResult } from "@/lib/types"; @@ -60,18 +60,7 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) { return (
-
- - - - Belépés - -
+
diff --git a/services/frontend/src/app/meghivas/[token]/page.tsx b/services/frontend/src/app/meghivas/[token]/page.tsx index 432e284..1239a13 100644 --- a/services/frontend/src/app/meghivas/[token]/page.tsx +++ b/services/frontend/src/app/meghivas/[token]/page.tsx @@ -2,7 +2,7 @@ import type { Metadata } from "next"; import Link from "next/link"; import { GoogleLogin } from "@/app/belepes/GoogleLogin"; -import { Logo } from "@/components/SiteHeader"; +import { PublicHeader } from "@/components/SiteHeader"; import { formatDate } from "@/lib/astro"; import { BACKEND_URL, getMe } from "@/lib/server"; import type { PersonInviteLanding, PublicConfig } from "@/lib/types"; @@ -65,9 +65,7 @@ export default async function PersonInvitePage({ params }: { params: Promise<{ t return ( <> {!me && ( -
- -
+ )}
diff --git a/services/frontend/src/app/pelda/page.tsx b/services/frontend/src/app/pelda/page.tsx index 0e2bf5c..15f1942 100644 --- a/services/frontend/src/app/pelda/page.tsx +++ b/services/frontend/src/app/pelda/page.tsx @@ -4,7 +4,7 @@ import Link from "next/link"; import { AnalysisView } from "@/components/AnalysisView"; import { ChartWheel, WheelLegend } from "@/components/ChartWheel"; import { Rich } from "@/components/Rich"; -import { Logo } from "@/components/SiteHeader"; +import { PublicHeader } from "@/components/SiteHeader"; import example from "@/content/pelda.json"; import { getMe } from "@/lib/server"; import type { AnalysisContent, ChartResult } from "@/lib/types"; @@ -21,9 +21,7 @@ export default async function ExamplePage() { return ( <> {!me && ( -
- -
+ )}
diff --git a/services/frontend/src/app/s/[slug]/page.tsx b/services/frontend/src/app/s/[slug]/page.tsx index 6b67c74..bb96947 100644 --- a/services/frontend/src/app/s/[slug]/page.tsx +++ b/services/frontend/src/app/s/[slug]/page.tsx @@ -5,7 +5,7 @@ import { notFound } from "next/navigation"; import { ChartWheel, WheelLegend } from "@/components/ChartWheel"; import { Rich } from "@/components/Rich"; import { ShareVisit } from "@/components/ShareVisit"; -import { Logo } from "@/components/SiteHeader"; +import { PublicHeader } from "@/components/SiteHeader"; import { SIGNS, signName } from "@/lib/astro"; import { getMe } from "@/lib/server"; import { bigThree, imageVersion, loadShare, plain, shorten, siteUrl } from "@/lib/share"; @@ -48,13 +48,7 @@ export default async function SharedChartPage({ params }: Props) { <> {!me && ( -
- - - - Belépés - -
+ )}
diff --git a/services/frontend/src/components/SiteHeader.tsx b/services/frontend/src/components/SiteHeader.tsx index e625797..d38423b 100644 --- a/services/frontend/src/components/SiteHeader.tsx +++ b/services/frontend/src/components/SiteHeader.tsx @@ -13,6 +13,30 @@ export function Logo() { ); } +/** + * The header for visitors (not logged in): the home page sections, the + * example and the login. `onHome`: the section links stay on the page. + */ +export function PublicHeader({ onHome = false, current }: { onHome?: boolean; current?: "pelda" }) { + const home = onHome ? "" : "/"; + return ( +
+ + + + Belépés + +
+ ); +} + /** The user's package and what is left of it; leads to the packages page. */ function PackageBadge({ me }: { me: Me }) { const { natal, synastry } = me.analyses_left;