|
|
|
@ -7,11 +7,7 @@ import { |
|
|
|
|
OrganizedContent, |
|
|
|
|
} from "@/components/OrganizedContent"; |
|
|
|
|
|
|
|
|
|
import { |
|
|
|
|
mobileShapesConfig, |
|
|
|
|
aboutShapesConfig, |
|
|
|
|
GetShapesConfig, |
|
|
|
|
} from "../ShapesBackground"; |
|
|
|
|
import { GetShapesConfig } from "../ShapesBackground"; |
|
|
|
|
|
|
|
|
|
import { Header } from "./Header"; |
|
|
|
|
|
|
|
|
@ -30,10 +26,17 @@ export interface Options { |
|
|
|
|
title: string; |
|
|
|
|
pagePath: string; |
|
|
|
|
image: string; |
|
|
|
|
getShapesConfig: GetShapesConfig; |
|
|
|
|
link?: ComponentType<LinkProps>; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function createSectionPage({ title, image, pagePath, link }: Options) { |
|
|
|
|
export function createSectionPage({ |
|
|
|
|
title, |
|
|
|
|
image, |
|
|
|
|
pagePath, |
|
|
|
|
getShapesConfig, |
|
|
|
|
link, |
|
|
|
|
}: Options) { |
|
|
|
|
const Link = link ?? createLink(pagePath); |
|
|
|
|
|
|
|
|
|
function Page(this: void, { content, sections, current }: Props) { |
|
|
|
@ -50,10 +53,7 @@ export function createSectionPage({ title, image, pagePath, link }: Options) { |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO: differentiate between About pages and Resources pages
|
|
|
|
|
Page.getShapesConfig = (() => { |
|
|
|
|
return window.innerWidth <= 768 ? mobileShapesConfig : aboutShapesConfig; |
|
|
|
|
}) as GetShapesConfig; |
|
|
|
|
Page.getShapesConfig = getShapesConfig; |
|
|
|
|
|
|
|
|
|
return Page; |
|
|
|
|
} |
|
|
|
|