Files
site/components/Shell.jsx
Claude a20dc2568a Perf: Hanzo's header and footer HTML render on the server, not in every page's JS
Chrome.jsx (a client component on every page) imported all of content.js (375 KB raw: header,
footer and the home page's data). The markup now comes from components/Shell.jsx, a server
component, and Chrome only attaches behaviour by selector. Menus, search, dark-room header and
the footer wordmark work as before. (PLAN-COMPONENTS 2.13, P1.)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01DqUybA3gCfaruBE8tifYd5
2026-11-07 14:00:51 +00:00

14 lines
802 B
React

/* Hanzo's own header and footer markup, rendered on the server only (no 'use client'). They used to be rendered by
the client Chrome.jsx, which put all of content.js (375 KB: header, footer and the home page's data) into every
page's JavaScript. Now the HTML arrives in the page and costs no JS; components/Chrome.jsx attaches the behaviour
(scrolled hairline, dark rooms, menus, search, the footer wordmark) to it by selector. Mounted by app/layout.jsx. */
import C from '../content';
export function HeaderHTML() {
return <div data-x-shell="header" style={{ display: 'contents' }} dangerouslySetInnerHTML={{ __html: C.header }} />;
}
export function FooterHTML() {
return <div data-x-shell="footer" style={{ display: 'contents' }} dangerouslySetInnerHTML={{ __html: C.footer }} />;
}