// Themed page frame for pages that aren't part of a study project (Home, Import): // slim top bar with a title, optional back button, and actions on the right. import { useApp } from '../../context/AppContext.js'; import { themeVars, READER_THEMES } from '../reader/readerThemes.js'; import { ChevronLeft } from '../reader/icons.jsx'; import AuthStatus from '../AuthStatus.jsx'; const THEME_ORDER = ['paper', 'sepia', 'dark']; export default function PageShell({ title, onBack, actions, maxWidth = 'max-w-6xl', children }) { const { readerTheme, setReaderTheme } = useApp(); const cycle = () => setReaderTheme(THEME_ORDER[(THEME_ORDER.indexOf(readerTheme) + 1) % THEME_ORDER.length]); return (
{onBack && ( )}

{title}

{actions}
{children}
); }