Set up the basic layout of the site and greybox its content based on statically generated pages. Content pages uses general base layouts defined centrally to avoid duplicating code.
47 lines
987 B
TypeScript
47 lines
987 B
TypeScript
import { BasePage } from "./bases.js";
|
|
import type { Page } from "./types.js";
|
|
|
|
export const projects: Page[] = [
|
|
{
|
|
title: "Buddhabrot renderer",
|
|
ref: "projects/buddhabrot.html",
|
|
},
|
|
{
|
|
title: "Wooden Drawing Board",
|
|
ref: "projects/drafting-board.html",
|
|
},
|
|
{
|
|
title: "Flying Hornwitser Paper Craft",
|
|
ref: "projects/paper-hornwitser.html",
|
|
},
|
|
{
|
|
title: "Prototype Soren Plush",
|
|
ref: "projects/plush-soren.html",
|
|
},
|
|
{
|
|
title: "Blender to CSS export script",
|
|
ref: "projects/blender-css.html",
|
|
},
|
|
].map(page => ({
|
|
title: page.title,
|
|
ref: page.ref,
|
|
content: <BasePage title={page.title}>
|
|
<h1>{page.title}</h1>
|
|
<p>Placeholder content</p>
|
|
</BasePage>
|
|
}));
|
|
|
|
|
|
const title = "Hornwitser's Projects";
|
|
export const projectsIndex: Page = {
|
|
title,
|
|
ref: "projects.html",
|
|
content: <BasePage title={title}>
|
|
<main>
|
|
<h1>{title}</h1>
|
|
<ul>
|
|
{ projects.map(project => <li><a href={"./" + project.ref}>{project.title}</a></li>)}
|
|
</ul>
|
|
</main>
|
|
</BasePage>
|
|
}
|