Files
sorsfonalak/services/frontend/src/app/layout.tsx
T
fecoandClaude Opus 5.5 42283d740e Forum: answers to me as the only count, reply box in the branch, keyboard-safe inputs
- The "Követett" tab becomes "Válaszok": its count is the unread answers
  to the member (a reply to their post, a first-level reply in their
  thread, or a post naming them), listed on /forum/valaszok with "Mind
  olvasott"; the followed threads are its second view. The other counts
  are gone from the menu; listeners see the waiting threads on their card
  on the front page.
- Replying to a post opens the box at the bottom of its branch and scrolls
  there; another branch moves it (with the text typed so far).
- Phones: while typing, the forum's bottom menu and floating bars step
  aside and the box with its send button is scrolled above the keyboard
  (KeyboardSafe, site-wide; Android resizes the page for the keyboard).
- The "Meghallgató" badge is now "Kísérő", with a new icon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
2026-11-26 13:31:00 +00:00

62 lines
2.3 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Metadata, Viewport } from "next";
import { Cormorant_Garamond, Inter } from "next/font/google";
import { Suspense } from "react";
import { KeyboardSafe } from "@/components/KeyboardSafe";
import { NightSky } from "@/components/NightSky";
import { NpsBanner } from "@/components/NpsBanner";
import { PaymentReturn } from "@/components/PaymentReturn";
import { SiteFooter } from "@/components/PublicFooter";
import { SiteHeader } from "@/components/SiteHeader";
import { ValidationMessages } from "@/components/ValidationMessages";
import { getMe } from "@/lib/server";
import { loadSky } from "@/lib/sky";
import { siteUrl } from "@/lib/share";
import "./globals.css";
const cormorant = Cormorant_Garamond({
subsets: ["latin", "latin-ext"],
weight: ["500", "600"],
variable: "--font-cormorant",
});
const inter = Inter({ subsets: ["latin", "latin-ext"], variable: "--font-inter" });
export async function generateMetadata(): Promise<Metadata> {
return {
// Relative canonical and alternate addresses resolve against the site's address.
metadataBase: new URL(await siteUrl()),
title: { default: "Sorsfonalak", template: "%s · Sorsfonalak" },
description: "Születési képlet, szinasztria és közösség – egy helyen.",
};
}
// On Android the opening keyboard shrinks the page instead of covering it
// (iOS ignores this; KeyboardSafe handles both).
export const viewport: Viewport = { width: "device-width", initialScale: 1, interactiveWidget: "resizes-content" };
export default async function RootLayout({ children }: { children: React.ReactNode }) {
const me = await getMe();
// The Moon today in the header (cached for five minutes).
const sky = me ? await loadSky() : null;
return (
<html lang="hu" className={`${cormorant.variable} ${inter.variable}`}>
<body>
<NightSky />
<KeyboardSafe />
<ValidationMessages />
{me && <SiteHeader me={me} sky={sky} />}
{children}
{/* At the very bottom, apart from the page content: up top it drew the eye away. */}
{me?.nps_due && <NpsBanner />}
<SiteFooter loggedIn={me !== null} />
{me && (
<Suspense fallback={null}>
<PaymentReturn />
</Suspense>
)}
</body>
</html>
);
}