UNPKG

stackpress

Version:

Incept is a content management framework.

20 lines (19 loc) 1.3 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect } from 'react'; import NotifyContainer from '../notify/NotifyContainer'; import { unload } from '../notify/hooks'; import { useTheme } from '../theme/hooks'; import { useConfig } from '../server/hooks'; import LayoutHead from './components/LayoutHead'; import LayoutMain from './components/LayoutMain'; import LayoutProvider from './LayoutProvider'; export function BlankApp({ head = true, children }) { const config = useConfig(); const { theme, toggle: toggleTheme } = useTheme(); return (_jsxs("div", { className: `${theme} relative px-w-100-0 px-h-100-0 theme-bg-bg0 theme-tx1`, children: [head ? (_jsx(LayoutHead, { theme: theme, brand: config.path('brand.name', 'Stackpress'), base: config.path('view.base', '/'), logo: config.path('brand.icon', 'icon.png'), toggleTheme: toggleTheme })) : null, _jsx(LayoutMain, { head: head, children: children })] })); } export default function LayoutBlank(props) { const { head, data, session, request, response, children } = props; useEffect(unload, []); return (_jsxs(LayoutProvider, { data: data, session: session, request: request, response: response, children: [_jsx(BlankApp, { head: head, children: children }), _jsx(NotifyContainer, {})] })); }