Header: ☰ menu where the links do not fit; famous people in the menus
CI / test (push) Successful in 1m59s
CI / build (push) Skipped
CI / deploy (push) Skipped

- Logged out below 1240px and logged in below 1380px the link rows give way
  to a ☰ menu (with the "Ingyenes" group when logged out); on phones the
  account button is an icon and the package pill makes room.
- "Híres emberek" in the free links of the header, among the free cards
  of the home page and in the menu of logged-in users.

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-22 17:14:50 +00:00
co-authored by Claude Opus 5.5
parent 2997a06474
commit 26c5bb2746
6 changed files with 173 additions and 3 deletions
@@ -2,6 +2,7 @@ import Link from "next/link";
import type { Me } from "@/lib/types";
import { MobileMenu } from "./MobileMenu";
import { NavLinks } from "./NavLinks";
import { UserMenu } from "./UserMenu";
@@ -40,7 +41,7 @@ export function PublicHeader({
current,
}: {
onHome?: boolean;
current?: "pelda" | "horoszkop" | "csillagjegyek";
current?: "pelda" | "horoszkop" | "csillagjegyek" | "hires";
}) {
const home = onHome ? "" : "/";
const here = (page: typeof current) => (current === page ? "page" : undefined);
@@ -63,10 +64,34 @@ export function PublicHeader({
<Link href="/csillagjegyek" aria-current={here("csillagjegyek")}>
Csillagjegyek
</Link>
<Link href="/hires-emberek" aria-current={here("hires")}>
Híres emberek
</Link>
</nav>
<Link href="/belepes" className="btn btn-sm">
Belépés
</Link>
<MobileMenu
className="mobile-menu-public"
sections={[
{
links: [
{ href: `${home}#elemzes`, label: "Elemzés" },
{ href: `${home}#elorejelzes`, label: "Előrejelzés" },
{ href: `${home}#osszevetes`, label: "Összevetés" },
{ href: "/pelda", label: "Példa" },
],
},
{
title: "Ingyenes",
links: [
{ href: "/szuletesi-horoszkop", label: "Születési horoszkóp" },
{ href: "/csillagjegyek", label: "Csillagjegyek" },
{ href: "/hires-emberek", label: "Híres emberek" },
],
},
]}
/>
</header>
);
}
@@ -108,6 +133,7 @@ export function SiteHeader({ me }: { me: Me }) {
{ href: "/osszevetesek", label: "Összevetések" },
{ href: "/kartyajoslas", label: "Kártyajóslás" },
{ href: "/csillagjegyek", label: "Csillagjegyek" },
{ href: "/hires-emberek", label: "Híres emberek" },
{ href: "/csomagok", label: "Csomagok" },
];
if (me.user.roles.includes("admin")) links.push({ href: "/admin", label: "Admin" });
@@ -119,6 +145,7 @@ export function SiteHeader({ me }: { me: Me }) {
<PackageBadge me={me} />
<UserMenu name={me.user.display_name || me.user.email} invoices={me.invoice_count > 0} />
</div>
<MobileMenu className="mobile-menu-app" sections={[{ links }]} />
</header>
);
}