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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
@@ -2,7 +2,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 { Logo } from "@/components/SiteHeader";
|
import { Logo, PublicHeader } from "@/components/SiteHeader";
|
||||||
import { Waitlist } from "@/components/Waitlist";
|
import { Waitlist } from "@/components/Waitlist";
|
||||||
import example from "@/content/pelda.json";
|
import example from "@/content/pelda.json";
|
||||||
import type { AnalysisContent, ChartResult } from "@/lib/types";
|
import type { AnalysisContent, ChartResult } from "@/lib/types";
|
||||||
@@ -60,18 +60,7 @@ export function Landing({ inviteOnly }: { inviteOnly: boolean }) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="lp">
|
<div className="lp">
|
||||||
<header className="site-header lp-header">
|
<PublicHeader onHome />
|
||||||
<Logo />
|
|
||||||
<nav className="nav lp-nav" aria-label="Fő navigáció">
|
|
||||||
<a href="#elemzes">Elemzés</a>
|
|
||||||
<a href="#elorejelzes">Előrejelzés</a>
|
|
||||||
<a href="#osszevetes">Összevetés</a>
|
|
||||||
<Link href="/pelda">Példa</Link>
|
|
||||||
</nav>
|
|
||||||
<Link href="/belepes" className="btn btn-sm">
|
|
||||||
Belépés
|
|
||||||
</Link>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<section className="lp-hero">
|
<section className="lp-hero">
|
||||||
<svg className="lp-stars" aria-hidden="true" viewBox="0 0 1000 600" preserveAspectRatio="xMidYMid slice">
|
<svg className="lp-stars" aria-hidden="true" viewBox="0 0 1000 600" preserveAspectRatio="xMidYMid slice">
|
||||||
|
|||||||
@@ -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 { Logo } from "@/components/SiteHeader";
|
import { PublicHeader } from "@/components/SiteHeader";
|
||||||
import { OPERATOR, PRIVACY_UPDATED } from "@/lib/legal";
|
import { OPERATOR, PRIVACY_UPDATED } from "@/lib/legal";
|
||||||
import { getMe } from "@/lib/server";
|
import { getMe } from "@/lib/server";
|
||||||
|
|
||||||
@@ -16,9 +16,7 @@ export default async function PrivacyPage() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!me && (
|
{!me && (
|
||||||
<header className="site-header">
|
<PublicHeader />
|
||||||
<Logo />
|
|
||||||
</header>
|
|
||||||
)}
|
)}
|
||||||
<main className="page legal">
|
<main className="page legal">
|
||||||
<div className="page-head">
|
<div className="page-head">
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import type { Metadata } from "next";
|
|||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
|
||||||
import { GoogleLogin } from "@/app/belepes/GoogleLogin";
|
import { GoogleLogin } from "@/app/belepes/GoogleLogin";
|
||||||
import { Logo } from "@/components/SiteHeader";
|
import { PublicHeader } from "@/components/SiteHeader";
|
||||||
import { formatDate } from "@/lib/astro";
|
import { formatDate } from "@/lib/astro";
|
||||||
import { BACKEND_URL, getMe } from "@/lib/server";
|
import { BACKEND_URL, getMe } from "@/lib/server";
|
||||||
import type { PersonInviteLanding, PublicConfig } from "@/lib/types";
|
import type { PersonInviteLanding, PublicConfig } from "@/lib/types";
|
||||||
@@ -65,9 +65,7 @@ export default async function PersonInvitePage({ params }: { params: Promise<{ t
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!me && (
|
{!me && (
|
||||||
<header className="site-header">
|
<PublicHeader />
|
||||||
<Logo />
|
|
||||||
</header>
|
|
||||||
)}
|
)}
|
||||||
<main className="page" style={{ maxWidth: 720 }}>
|
<main className="page" style={{ maxWidth: 720 }}>
|
||||||
<div className="page-head">
|
<div className="page-head">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|||||||
import { AnalysisView } from "@/components/AnalysisView";
|
import { AnalysisView } from "@/components/AnalysisView";
|
||||||
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
||||||
import { Rich } from "@/components/Rich";
|
import { Rich } from "@/components/Rich";
|
||||||
import { Logo } from "@/components/SiteHeader";
|
import { PublicHeader } from "@/components/SiteHeader";
|
||||||
import example from "@/content/pelda.json";
|
import example from "@/content/pelda.json";
|
||||||
import { getMe } from "@/lib/server";
|
import { getMe } from "@/lib/server";
|
||||||
import type { AnalysisContent, ChartResult } from "@/lib/types";
|
import type { AnalysisContent, ChartResult } from "@/lib/types";
|
||||||
@@ -21,9 +21,7 @@ export default async function ExamplePage() {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{!me && (
|
{!me && (
|
||||||
<header className="site-header">
|
<PublicHeader current="pelda" />
|
||||||
<Logo />
|
|
||||||
</header>
|
|
||||||
)}
|
)}
|
||||||
<main className="page" style={{ maxWidth: 1180 }}>
|
<main className="page" style={{ maxWidth: 1180 }}>
|
||||||
<div className="page-head">
|
<div className="page-head">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { notFound } from "next/navigation";
|
|||||||
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
import { ChartWheel, WheelLegend } from "@/components/ChartWheel";
|
||||||
import { Rich } from "@/components/Rich";
|
import { Rich } from "@/components/Rich";
|
||||||
import { ShareVisit } from "@/components/ShareVisit";
|
import { ShareVisit } from "@/components/ShareVisit";
|
||||||
import { Logo } from "@/components/SiteHeader";
|
import { PublicHeader } from "@/components/SiteHeader";
|
||||||
import { SIGNS, signName } from "@/lib/astro";
|
import { SIGNS, signName } from "@/lib/astro";
|
||||||
import { getMe } from "@/lib/server";
|
import { getMe } from "@/lib/server";
|
||||||
import { bigThree, imageVersion, loadShare, plain, shorten, siteUrl } from "@/lib/share";
|
import { bigThree, imageVersion, loadShare, plain, shorten, siteUrl } from "@/lib/share";
|
||||||
@@ -48,13 +48,7 @@ export default async function SharedChartPage({ params }: Props) {
|
|||||||
<>
|
<>
|
||||||
<ShareVisit slug={slug} />
|
<ShareVisit slug={slug} />
|
||||||
{!me && (
|
{!me && (
|
||||||
<header className="site-header">
|
<PublicHeader />
|
||||||
<Logo />
|
|
||||||
<span style={{ flex: 1 }} />
|
|
||||||
<Link href="/belepes" className="btn btn-sm">
|
|
||||||
Belépés
|
|
||||||
</Link>
|
|
||||||
</header>
|
|
||||||
)}
|
)}
|
||||||
<main className="page" style={{ maxWidth: 1180 }}>
|
<main className="page" style={{ maxWidth: 1180 }}>
|
||||||
<div className="page-head">
|
<div className="page-head">
|
||||||
|
|||||||
@@ -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 (
|
||||||
|
<header className="site-header lp-header">
|
||||||
|
<Logo />
|
||||||
|
<nav className="nav lp-nav" aria-label="Fő navigáció">
|
||||||
|
<a href={`${home}#elemzes`}>Elemzés</a>
|
||||||
|
<a href={`${home}#elorejelzes`}>Előrejelzés</a>
|
||||||
|
<a href={`${home}#osszevetes`}>Összevetés</a>
|
||||||
|
<Link href="/pelda" aria-current={current === "pelda" ? "page" : undefined}>
|
||||||
|
Példa
|
||||||
|
</Link>
|
||||||
|
</nav>
|
||||||
|
<Link href="/belepes" className="btn btn-sm">
|
||||||
|
Belépés
|
||||||
|
</Link>
|
||||||
|
</header>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/** The user's package and what is left of it; leads to the packages page. */
|
/** The user's package and what is left of it; leads to the packages page. */
|
||||||
function PackageBadge({ me }: { me: Me }) {
|
function PackageBadge({ me }: { me: Me }) {
|
||||||
const { natal, synastry } = me.analyses_left;
|
const { natal, synastry } = me.analyses_left;
|
||||||
|
|||||||
Reference in New Issue
Block a user