Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

content: Add past press #57

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@types/react-dom": "^18.3.0",
"astro": "^4.10.2",
"astro-font": "^0.0.81",
"dayjs": "^1.11.11",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-icons": "^5.2.1",
Expand Down
7 changes: 7 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/content/press/2022-03-mtpc-ida-network.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: MTPC launches IDA Network and partnership with Namesake Collaborative
date: 2022-03-31
url: https://www.masstpc.org/ida-network-namesake-announcement/
outlet: Massachusetts Transgender Political Coalition
4 changes: 4 additions & 0 deletions src/content/press/2023-06-mtpc-launch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title: MTPC and Namesake launch online platform to assist with legal name and gender marker corrections for trans and nonbinary MA residents
date: 2023-06-21
url: https://www.masstpc.org/namesake-press-release/
outlet: Massachusetts Transgender Political Coalition
17 changes: 13 additions & 4 deletions src/pages/press.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
---
import { Image } from "astro:assets";
import BaseLayout from "../layouts/BaseLayout.astro";
import dayjs from "dayjs";

import { getCollection } from "astro:content";

const pressArticles = await getCollection("press");
pressArticles.sort((a, b) => b.data.date.getTime() - a.data.date.getTime());
---

<BaseLayout
Expand All @@ -19,11 +21,11 @@ const pressArticles = await getCollection("press");
pressArticles.map((article) => (
<li class="article">
<time datetime={article.data.date.toISOString()}>
{article.data.date.toDateString()}
{dayjs(article.data.date).format("MMMM YYYY")}
</time>
<strong class="outlet">{article.data.outlet}</strong>
<a href={article.data.url} class="title" target="_blank">
{article.data.title}
<span>{article.data.title}</span>
</a>
{article.data.image && (
<Image
Expand Down Expand Up @@ -54,7 +56,8 @@ const pressArticles = await getCollection("press");
margin: 0;
display: flex;
flex-direction: column;
padding-bottom: var(--space-xl);
gap: var(--space-3xl);
padding-bottom: var(--space-3xl);
}

.article {
Expand All @@ -66,11 +69,17 @@ const pressArticles = await getCollection("press");
font-size: var(--step-3);
font-weight: 600;
text-wrap: balance;

span {
background: var(--bg-purple-overlay);
box-decoration-break: clone;
}
}
}

.image {
align-self: flex-end;
margin-block-start: var(--space-l);
margin-block-start: calc(-1 * var(--space-2xl));
z-index: -1;
}
</style>
1 change: 1 addition & 0 deletions src/styles/theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

/* Colors */
--bg-purple: #CDA5EF;
--bg-purple-overlay: rgb(205 165 239 / 0.8);
--text: #111111;
--text-placeholder: rgba(0, 0, 0, 0.5);
--white: #FFFFFF;
Expand Down