Skip to content

Commit

Permalink
Add partners
Browse files Browse the repository at this point in the history
  • Loading branch information
evadecker committed May 30, 2024
1 parent ede5ba2 commit dea3416
Show file tree
Hide file tree
Showing 10 changed files with 97 additions and 2 deletions.
11 changes: 11 additions & 0 deletions src/content/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,15 @@ export const collections = {
image: z.string().optional(),
}),
}),

partners: defineCollection({
type: "data",
schema: ({ image }) =>
z.object({
name: z.string(),
logo: image(),
url: z.string(),
height: z.number(),
}),
}),
};
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/partners/_images/malgbtcc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/partners/_images/name-coalition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/content/partners/_images/nglcc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/content/partners/justice-tech.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: Justice Tech Association
logo: ./_images/justice-tech-association.png
url: https://justicetechassociation.org/
height: 46
4 changes: 4 additions & 0 deletions src/content/partners/malgbtcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: Massachusetts LGBT Chamber of Commerce
logo: ./_images/malgbtcc.png
url: https://malgbtcc.org/
height: 44
4 changes: 4 additions & 0 deletions src/content/partners/name-coalition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: NAME Coalition
logo: ./_images/name-coalition.png
url: https://namecoalition.org/
height: 60
4 changes: 4 additions & 0 deletions src/content/partners/nglcc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
name: National LGBT Chamber of Commerce
logo: ./_images/nglcc.png
url: https://nglcc.org/
height: 50
72 changes: 70 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ import BaseLayout from "../layouts/BaseLayout.astro";
import { RiArrowRightLine } from "react-icons/ri";
import illustration from "./_images/namesake-form.png";
import formIllustration from "./_images/form-snail.png";
import { getCollection } from "astro:content";
const partners = await getCollection("partners");
---

<BaseLayout
Expand Down Expand Up @@ -62,6 +65,29 @@ import formIllustration from "./_images/form-snail.png";
</div>
</form>
</div>
<div class="partners">
<h2>In partnership with</h2>
<ul>
{
partners.map((partner) => (
<li>
<a
href={partner.data.url}
target="_blank"
rel="noopener noreferrer"
aria-label={`Visit ${partner.data.name}`}
>
<Image
src={partner.data.logo}
alt={partner.data.name}
height={partner.data.height}
/>
</a>
</li>
))
}
</ul>
</div>
</div>
</BaseLayout>

Expand Down Expand Up @@ -95,23 +121,65 @@ import formIllustration from "./_images/form-snail.png";
.home {
display: grid;
grid-template-columns: minmax(460px, 1fr) minmax(0, 1fr);
grid-template-rows: 1fr auto;
grid-template-areas:
"content illustration"
"partners partners";
gap: var(--space-2xl);

@media (width < 800px) {
display: block;
grid-template-columns: 1fr;
grid-template-areas:
"content"
"partners";

.illustration {
display: none;
}
}
}

img {
.illustration {
grid-area: illustration;
width: 600px;
max-width: 100%;
order: 1;
}

.content {
grid-area: content;
}

.partners {
grid-area: partners;
display: flex;
align-items: center;
flex-direction: column;
padding-block-start: var(--space-l);
margin-inline: calc(var(--space-l) * -1);
min-width: 0;

h2 {
font-size: var(--step-1);
}

ul {
list-style-type: none;
margin: 0;
padding: 0;
display: flex;
overflow-x: scroll;
max-width: 100%;
align-items: center;
padding: var(--space-l);
gap: var(--space-xl) var(--space-2xl);
}

img {
max-width: 300px;
}
}

h1 {
margin-block-end: var(--space-xl);
margin-inline-start: -0.03em;
Expand Down

0 comments on commit dea3416

Please sign in to comment.