diff --git a/site/public/fonts/PTSerif-Regular.ttf b/site/public/fonts/PTSerif-Regular.ttf new file mode 100644 index 0000000..f87c0f1 Binary files /dev/null and b/site/public/fonts/PTSerif-Regular.ttf differ diff --git a/site/public/gaza-drone.jpeg b/site/public/gaza-drone.jpeg new file mode 100644 index 0000000..0911479 Binary files /dev/null and b/site/public/gaza-drone.jpeg differ diff --git a/site/public/gaza_wapo.jpeg b/site/public/gaza_wapo.jpeg deleted file mode 100644 index f7b68bf..0000000 Binary files a/site/public/gaza_wapo.jpeg and /dev/null differ diff --git a/site/src/components/ContentBox.astro b/site/src/components/ContentBox.astro new file mode 100644 index 0000000..1a33890 --- /dev/null +++ b/site/src/components/ContentBox.astro @@ -0,0 +1,17 @@ +--- + +--- + +
+ +
+ diff --git a/site/src/components/Post.astro b/site/src/components/Post.astro index a299468..5c6a599 100644 --- a/site/src/components/Post.astro +++ b/site/src/components/Post.astro @@ -1,5 +1,6 @@ --- import PostTypeIcon from "../components/PostTypeIcon.astro"; +import StructuredText from "./StructuredText.astro"; import type { getEnhancedPosts } from "../lib/server/posts"; interface Props { @@ -28,19 +29,7 @@ const { post, postDelayLookup, enablerImageUrl } = Astro.props; { post.structuredText.length > 0 && (
- {post.structuredText.map((part) => - part.type === "url" ? ( - - {part.text} - - ) : part.type === "space" ? ( -   - ) : part.type === "break" ? ( -
- ) : ( - part.text - ) - )} +
) } @@ -59,19 +48,7 @@ const { post, postDelayLookup, enablerImageUrl } = Astro.props;
{post.structuredQuoteText.length > 0 && (
- {post.structuredQuoteText.map((part) => - part.type === "url" ? ( - - {part.text} - - ) : part.type === "space" ? ( -   - ) : part.type === "break" ? ( -
- ) : ( - part.text - ) - )} +
)}
@@ -189,11 +166,6 @@ const { post, postDelayLookup, enablerImageUrl } = Astro.props; overflow: hidden; } - .post-linebreak { - display: block; - margin-bottom: 10px; - } - .post-image img, .post-quoted-image img { max-width: 100%; diff --git a/site/src/components/StructuredText.astro b/site/src/components/StructuredText.astro new file mode 100644 index 0000000..717155b --- /dev/null +++ b/site/src/components/StructuredText.astro @@ -0,0 +1,43 @@ +--- +import type { StructuredText } from "../lib/shared/structured-text"; + +interface Props { + parts: StructuredText[]; +} + +const { parts } = Astro.props; +--- + + + { + parts.map((part) => + part.type === "url" ? ( + + {part.text} + + ) : part.type === "space" ? ( +   + ) : part.type === "break" ? ( + + ) : part.type === "para" ? ( +

{part.text}

+ ) : ( + part.text + ) + ) + } +
+ + diff --git a/site/src/layouts/ContentPageLayout.astro b/site/src/layouts/ContentPageLayout.astro new file mode 100644 index 0000000..d948ba9 --- /dev/null +++ b/site/src/layouts/ContentPageLayout.astro @@ -0,0 +1,72 @@ +--- +import OpacityOverlay from "../components/OpacityOverlay.astro"; + +interface Props { + title: string; + clip?: boolean; +} + +const { title, clip } = Astro.props; +--- + + + + + + + + + {title} + + + +
+
+

{title}

+ +
+
+ + + diff --git a/site/src/layouts/Layout.astro b/site/src/layouts/PlayerLayout.astro similarity index 100% rename from site/src/layouts/Layout.astro rename to site/src/layouts/PlayerLayout.astro diff --git a/site/src/lib/constants/strings.json b/site/src/lib/constants/strings.json new file mode 100644 index 0000000..9b0fadb --- /dev/null +++ b/site/src/lib/constants/strings.json @@ -0,0 +1,6 @@ +{ + "mission_statement": { + "type": "text", + "text": "This website seeks to collect public statements from those supporting Israel's strategy of mass displacement, starvation, and murder of Palestinian people, and to contrast those statements with the human toll of that inhumane campaign." + } +} diff --git a/site/src/lib/constants/strings.ts b/site/src/lib/constants/strings.ts new file mode 100644 index 0000000..9ec60f0 --- /dev/null +++ b/site/src/lib/constants/strings.ts @@ -0,0 +1,9 @@ +import type { StructuredText } from "../shared/structured-text"; +import strings from "./strings.json"; + +export const getString = (key: keyof typeof strings) => { + if (!strings[key]) { + throw new Error(`No match for string lookup by key: ${key}`); + } + return strings[key] as StructuredText; +}; diff --git a/site/src/lib/server/posts.ts b/site/src/lib/server/posts.ts index 47885fe..2402c5c 100644 --- a/site/src/lib/server/posts.ts +++ b/site/src/lib/server/posts.ts @@ -1,6 +1,7 @@ import { parseISO, format } from "date-fns"; import readingTime from "reading-time"; import type { EnablerPost } from "../../schemas/enabler"; +import type { StructuredText } from "../shared/structured-text"; const orderEarliestToLatest = (posts: EnablerPost[]) => { return posts.slice(0).sort((a, b) => { @@ -8,12 +9,6 @@ const orderEarliestToLatest = (posts: EnablerPost[]) => { }); }; -type StructuredText = - | { type: "text"; text: string } - | { type: "url"; text: string; href: string } - | { type: "space" } - | { type: "break" }; - const naiveSingleUrlMatcher = /\s+(http[^\s]+)\s+/; const formatDisplayUrl = (url: string) => { diff --git a/site/src/lib/shared/structured-text.ts b/site/src/lib/shared/structured-text.ts new file mode 100644 index 0000000..11cb5e2 --- /dev/null +++ b/site/src/lib/shared/structured-text.ts @@ -0,0 +1,6 @@ +export type StructuredText = + | { type: "text"; text: string } + | { type: "para"; text: string } + | { type: "url"; text: string; href: string } + | { type: "space" } + | { type: "break" }; diff --git a/site/src/pages/404.astro b/site/src/pages/404.astro index 2cbc5f4..390bb6e 100644 --- a/site/src/pages/404.astro +++ b/site/src/pages/404.astro @@ -1,68 +1,10 @@ --- -import Layout from "../layouts/Layout.astro"; -import OpacityOverlay from "../components/OpacityOverlay.astro"; +import Layout from "../layouts/ContentPageLayout.astro"; +import ContentBox from "../components/ContentBox.astro"; --- - -
- -
-

404 : genocide club

-
-

Page not found.

-
-
-

- This website seeks to collect public statements from those supporting - Israel's strategy of mass displacement, starvation, and murder of the - Palestinian people, and to contrast those statements with the human - toll of that horrific campaign. -

-

- An individual or group does not have to explicitly call for these - specific brutal acts to be a member of the Genocide Club. Simple - indifference to the plight of Palestinians while unquestioningly - supporting Israel's campaign is enough to implicitly condone those - actions and the resulting effects. -

-
-
-
+ + +

Sorry, the page you were looking for was not found.

+
- - diff --git a/site/src/pages/[...enabler].astro b/site/src/pages/[...enabler].astro index 67c546a..46e366a 100644 --- a/site/src/pages/[...enabler].astro +++ b/site/src/pages/[...enabler].astro @@ -2,7 +2,7 @@ import type { Enabler } from "../schemas/enabler"; import { getCollection } from "astro:content"; import Post from "../components/Post.astro"; -import Layout from "../layouts/Layout.astro"; +import PlayerLayout from "../layouts/PlayerLayout.astro"; import KilledGraph from "../generated/killed.astro"; import OpacityOverlay from "../components/OpacityOverlay.astro"; import PlayerControls from "../components/PlayerControls.astro"; @@ -37,7 +37,7 @@ const { } = getTimeline({ svgDomain, posts }); --- - +
@@ -236,7 +236,7 @@ const {
-
+ +