Add constitution and code of conduct pages shapes backgrounds
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
d71f942d9c
commit
5bceff26fd
|
@ -8,6 +8,12 @@ import {
|
||||||
OrganizedContent,
|
OrganizedContent,
|
||||||
} from "@/components/OrganizedContent";
|
} from "@/components/OrganizedContent";
|
||||||
|
|
||||||
|
import {
|
||||||
|
mobileShapesConfig,
|
||||||
|
aboutShapesConfig,
|
||||||
|
GetShapesConfig,
|
||||||
|
} from "../ShapesBackground";
|
||||||
|
|
||||||
import { Header } from "./Header";
|
import { Header } from "./Header";
|
||||||
|
|
||||||
export interface SerializedSection {
|
export interface SerializedSection {
|
||||||
|
@ -32,7 +38,7 @@ export interface Options {
|
||||||
export function createReadAllPage({ title, image, pagePath, link }: Options) {
|
export function createReadAllPage({ title, image, pagePath, link }: Options) {
|
||||||
const Link = link ?? createLink(pagePath);
|
const Link = link ?? createLink(pagePath);
|
||||||
|
|
||||||
return function Page({ sections }: Props) {
|
function Page({ sections }: Props) {
|
||||||
const readAllSection = createReadAllSection(
|
const readAllSection = createReadAllSection(
|
||||||
sections.map(({ section, content }) => ({
|
sections.map(({ section, content }) => ({
|
||||||
section,
|
section,
|
||||||
|
@ -57,5 +63,12 @@ export function createReadAllPage({ title, image, pagePath, link }: Options) {
|
||||||
</OrganizedContent>
|
</OrganizedContent>
|
||||||
</Header>
|
</Header>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
// TODO: differentiate between About pages and Resources pages
|
||||||
|
Page.getShapesConfig = (() => {
|
||||||
|
return window.innerWidth <= 768 ? mobileShapesConfig : aboutShapesConfig;
|
||||||
|
}) as GetShapesConfig;
|
||||||
|
|
||||||
|
return Page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,12 @@ import {
|
||||||
OrganizedContent,
|
OrganizedContent,
|
||||||
} from "@/components/OrganizedContent";
|
} from "@/components/OrganizedContent";
|
||||||
|
|
||||||
|
import {
|
||||||
|
mobileShapesConfig,
|
||||||
|
aboutShapesConfig,
|
||||||
|
GetShapesConfig,
|
||||||
|
} from "../ShapesBackground";
|
||||||
|
|
||||||
import { Header } from "./Header";
|
import { Header } from "./Header";
|
||||||
|
|
||||||
interface Section {
|
interface Section {
|
||||||
|
@ -30,7 +36,7 @@ export interface Options {
|
||||||
export function createSectionPage({ title, image, pagePath, link }: Options) {
|
export function createSectionPage({ title, image, pagePath, link }: Options) {
|
||||||
const Link = link ?? createLink(pagePath);
|
const Link = link ?? createLink(pagePath);
|
||||||
|
|
||||||
return function Page(this: void, { content, sections, current }: Props) {
|
function Page(this: void, { content, sections, current }: Props) {
|
||||||
return (
|
return (
|
||||||
<Header title={title} image={image}>
|
<Header title={title} image={image}>
|
||||||
<OrganizedContent
|
<OrganizedContent
|
||||||
|
@ -42,5 +48,12 @@ export function createSectionPage({ title, image, pagePath, link }: Options) {
|
||||||
</OrganizedContent>
|
</OrganizedContent>
|
||||||
</Header>
|
</Header>
|
||||||
);
|
);
|
||||||
};
|
}
|
||||||
|
|
||||||
|
// TODO: differentiate between About pages and Resources pages
|
||||||
|
Page.getShapesConfig = (() => {
|
||||||
|
return window.innerWidth <= 768 ? mobileShapesConfig : aboutShapesConfig;
|
||||||
|
}) as GetShapesConfig;
|
||||||
|
|
||||||
|
return Page;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,8 +26,5 @@ export default function OurSupporters() {
|
||||||
}
|
}
|
||||||
|
|
||||||
OurSupporters.getShapesConfig = (() => {
|
OurSupporters.getShapesConfig = (() => {
|
||||||
if (window.innerWidth <= 768) {
|
return window.innerWidth <= 768 ? mobileShapesConfig : aboutShapesConfig;
|
||||||
return mobileShapesConfig;
|
|
||||||
}
|
|
||||||
return aboutShapesConfig;
|
|
||||||
}) as GetShapesConfig;
|
}) as GetShapesConfig;
|
||||||
|
|
Loading…
Reference in New Issue