Files
sorsfonalak/services/frontend/src/app/layout.tsx
T
fecoandClaude Opus 5.5 27a6226d86
CI / test (push) Successful in 3m10s
CI / build (push) Skipped
CI / deploy (push) Skipped
Deploy only what changed; pages notice a new version; home page: personal analyses
- CI: ci/changed-services.sh compares HEAD with the last deployment's v*
  tag: the Rust tests run only when a Rust service changed, only the
  changed images are built, and the server's .env gets a tag per built
  service (TAG_FRONTEND, TAG_BACKEND, ...; TAG stays the fallback), so only
  their containers restart. Everything when in doubt.
- The frontend image knows its version (APP_VERSION, the commit): Next's
  deploymentId (a page from an older version reloads on navigation) and
  /api/version. VersionWatcher checks every 5 minutes and when the tab
  comes to the front: idle with nothing typed, the page reloads; otherwise
  a "Frissült az oldal" notice offers it.
- Home page: "Nem sablonszöveg, hanem a te elemzésed" in the hero, the
  "Miért más?" section now about analyses written for each chart; the two
  hero buttons side by side on phones.

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

64 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 { VersionWatcher } from "@/components/VersionWatcher";
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 />
<VersionWatcher />
<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>
);
}