/** * Sticky reading header that appears when the article H1 scrolls out of view. * * Shows the article title and current section name in a thin fixed bar * at the top of the viewport. Uses CSS transform for slide-in/out animation. */ interface ReadingHeaderProps { /** Article title */ title: string; /** Currently active section heading (from scroll-spy) */ currentSection: string; /** Whether the header should be visible (H1 is out of viewport) */ visible: boolean; } export default function ReadingHeader({ title, currentSection, visible }: ReadingHeaderProps) { return (
{title} {currentSection && ( <> ยท {currentSection} )}
); }