Refactor, update UI, and add notes

This commit is contained in:
2022-10-04 23:41:59 -04:00
parent fde6c7fa69
commit 160f23cb01
31 changed files with 813 additions and 265 deletions
+13 -6
View File
@@ -8,16 +8,23 @@ type LayoutProps = {
title?: string,
ancestors?: Array<{ name: string, path: string }>
children?: ChildrenType,
removeContainer?: boolean,
};
function Layout({ name, title, children, ancestors }: LayoutProps) {
function Container(props: {children?: ChildrenType, ignore?: boolean}) {
if (props.ignore)
return <>{props.children}</>;
return <div className='container'>
{props.children}
</div>;
}
function Layout(props : LayoutProps) {
return (
<>
<Meta name={name} ancestors={ancestors} />
<Title title={title} name={name} ancestors={ancestors} />
<div className='container'>
{children}
</div>
<Meta name={props.name} ancestors={props.ancestors} />
<Title title={props.title} name={props.name} ancestors={props.ancestors} />
<Container ignore={props.removeContainer}>{props.children}</Container>
</>
);
}