diff --git a/src/app.tsx b/src/app.tsx index 32aec174..cf5371d6 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -2,6 +2,7 @@ import { Router } from '@solidjs/router'; import { FileRoutes } from '@solidjs/start/router'; import type { Component } from 'solid-js'; import { onMount, Suspense } from 'solid-js'; +import { DefaultTemplate } from './components/templates/DefaultTemplate.js'; import './app.css'; const App: Component = () => { @@ -10,36 +11,14 @@ const App: Component = () => { initTWE({ Collapse, Ripple, Tooltip }); }); return ( -
- + {props.children}} > -
+ ); }; diff --git a/src/components/templates/DefaultTemplate.tsx b/src/components/templates/DefaultTemplate.tsx new file mode 100644 index 00000000..b066341d --- /dev/null +++ b/src/components/templates/DefaultTemplate.tsx @@ -0,0 +1,23 @@ +import type { Component, ParentProps } from 'solid-js'; +import { Footer } from '../organisms/Footer.js'; +import { Navbar } from '../organisms/Navbar.js'; +import { vccUrl, vpmUrl } from '../../constants.json'; + +/** The URL to add to VCC. */ +const encodedVccUrl = `${vccUrl}${encodeURIComponent(vpmUrl)}`; + +/** + * The default template. + * @param props The component properties. + * @returns The component. + */ +export const DefaultTemplate: Component = (props) => { + const { children } = props; + return ( +
+ +
{children}
+
+
+ ); +}; diff --git a/src/entry-server.tsx b/src/entry-server.tsx index 5ad5e1db..301b84fb 100644 --- a/src/entry-server.tsx +++ b/src/entry-server.tsx @@ -27,6 +27,16 @@ export default createHandler(() => ( /> + +