-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve content layout, change bg image
going to start filling in the "content" pages so want a standard way of doing this. extracting strings can leave room for Intl if we want to do that down the road sharing the structured text logic that was roughed in in the Post component with the content pages for use in strings.json
- Loading branch information
1 parent
8ac971c
commit 953a1d6
Showing
15 changed files
with
177 additions
and
166 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
--- | ||
|
||
<div class="content-box"> | ||
<slot /> | ||
</div> | ||
<style> | ||
.content-box { | ||
background-color: rgba(0, 0, 0, 50%); | ||
margin-bottom: 2rem; | ||
border: 1px solid rgba(255, 255, 255, 25%); | ||
padding: 1.5rem; | ||
border-radius: 8px; | ||
box-shadow: 5px 5px 10px rgba(0, 0, 0, 50%); | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
import type { StructuredText } from "../lib/shared/structured-text"; | ||
interface Props { | ||
parts: StructuredText[]; | ||
} | ||
const { parts } = Astro.props; | ||
--- | ||
|
||
<span> | ||
{ | ||
parts.map((part) => | ||
part.type === "url" ? ( | ||
<a href={part.href} title={part.href} target="_blank"> | ||
{part.text} | ||
</a> | ||
) : part.type === "space" ? ( | ||
<span> </span> | ||
) : part.type === "break" ? ( | ||
<span class="linebreak" /> | ||
) : part.type === "para" ? ( | ||
<p>{part.text}</p> | ||
) : ( | ||
part.text | ||
) | ||
) | ||
} | ||
</span> | ||
|
||
<style> | ||
p { | ||
margin: 0; | ||
margin-bottom: 2rem; | ||
} | ||
p:last-of-type { | ||
margin-bottom: 0; | ||
} | ||
.linebreak { | ||
display: block; | ||
margin-bottom: 10px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
import OpacityOverlay from "../components/OpacityOverlay.astro"; | ||
interface Props { | ||
title: string; | ||
clip?: boolean; | ||
} | ||
const { title, clip } = Astro.props; | ||
--- | ||
|
||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<meta name="description" content="Astro description" /> | ||
<meta name="viewport" content="width=device-width" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<title>{title}</title> | ||
</head> | ||
<body class={clip ? "clip" : undefined}> | ||
<OpacityOverlay /> | ||
<main> | ||
<div class="content"> | ||
<h1>{title}</h1> | ||
<slot /> | ||
</div> | ||
</main> | ||
</body> | ||
</html> | ||
<style is:global> | ||
html { | ||
font-family: system-ui, sans-serif; | ||
background: rgb(28, 14, 14); | ||
min-height: 100vh; | ||
background-size: cover; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-image: url("/gaza-drone.jpeg"); | ||
background-attachment: fixed; | ||
} | ||
@font-face { | ||
font-family: "PTSerif"; | ||
src: url("/fonts/PTSerif-Regular.ttf") format("ttf"); | ||
font-weight: normal; | ||
font-style: normal; | ||
font-display: swap; | ||
} | ||
|
||
main { | ||
margin: auto; | ||
padding: 1rem; | ||
width: 800px; | ||
max-width: calc(100% - 2rem); | ||
color: white; | ||
font-size: 20px; | ||
line-height: 1.6; | ||
} | ||
.content { | ||
position: relative; | ||
z-index: 1; | ||
color: rgba(255, 255, 255, 80%); | ||
} | ||
h1 { | ||
font-family: "PTSerif"; | ||
font-size: 3rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
text-align: center; | ||
margin-bottom: 1em; | ||
} | ||
</style> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
--- | ||
|
||
<Layout title="genocide.club"> | ||
<main> | ||
<OpacityOverlay /> | ||
<div class="content"> | ||
<h1>404 : genocide club</h1> | ||
<div class="about-text"> | ||
<p>Page not found.</p> | ||
</div> | ||
<div class="about-text"> | ||
<p> | ||
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. | ||
</p> | ||
<p> | ||
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. | ||
</p> | ||
</div> | ||
</div> | ||
</main> | ||
<Layout title="genocide.club • 404 Not Found"> | ||
<ContentBox> | ||
<p>Sorry, the page you were looking for was not found.</p> | ||
</ContentBox> | ||
</Layout> | ||
|
||
<style> | ||
main { | ||
margin: auto; | ||
padding: 1rem; | ||
width: 800px; | ||
max-width: calc(100% - 2rem); | ||
color: white; | ||
font-size: 20px; | ||
line-height: 1.6; | ||
} | ||
.content { | ||
position: relative; | ||
z-index: 1; | ||
color: rgba(255, 255, 255, 80%); | ||
} | ||
h1 { | ||
font-size: 3rem; | ||
font-weight: 700; | ||
line-height: 1; | ||
text-align: center; | ||
margin-bottom: 1em; | ||
} | ||
.about-text { | ||
margin-bottom: 2rem; | ||
border: 1px solid rgba(255, 255, 255, 25%); | ||
padding: 1.5rem; | ||
border-radius: 8px; | ||
} | ||
.about-text p { | ||
margin: 0; | ||
margin-bottom: 2rem; | ||
} | ||
.about-text p:last-of-type { | ||
margin-bottom: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.