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

feat: add Howl at the Moon as hangout venue #123

Merged
merged 1 commit into from
Sep 23, 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 cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"fosstodon",
"griffing",
"Harborside",
"hor'dourves",
"igalia",
"inngest",
"Instabase",
Expand Down
Binary file added src/assets/venues/howlAtTheMoonDark.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/assets/venues/howlAtTheMoonLight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions src/components/AdImage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ import { Image } from "astro:assets";
interface Props {
src: ImageMetadata;
}

const className =
Astro.props.src.height > Astro.props.src.width
? "ad-image-tall"
: "ad-image-wide";
---

<Image alt="" class="ad-image" src={Astro.props.src} />
<Image alt="" class:list={["ad-image", className]} src={Astro.props.src} />

<style>
.ad-image {
height: 100%;
.ad-image-tall {
max-height: 15rem;
}

.ad-image-wide {
max-width: 70vw;
width: 100%;
}
</style>
9 changes: 7 additions & 2 deletions src/data/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,15 @@ export const days: ScheduleDay[] = [
title: "Closing Announcements",
},
{
at: "7:30pm",
description: [
"We'll set up a casual space for folks to mingle after the conference. Location and time TBA.",
"Subscribe to our [newsletter](/#newsletter) to be the first to hear about it.",
"After dinner, bring your badge for entry and hang out with the organizers, speakers, and fellow attendees in our mixer.",
"Expect locally prepared hor'dourves and a craft lemonade stand.",
],
location: {
href: "https://www.howlatthemoon.com/boston",
text: "Howl at the Moon Boston",
},
title: "Post-Conference Hangout",
},
],
Expand Down
13 changes: 13 additions & 0 deletions src/data/venues.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import howlAtTheMoonDark from "../assets/venues/howlAtTheMoonDark.png";
import howlAtTheMoonLight from "../assets/venues/howlAtTheMoonLight.png";

export const venuesBySlug = {
howlAtTheMoon: {
href: "https://howlatthemoon.com?utm_source=squiggleconf",
logos: {
dark: howlAtTheMoonLight,
light: howlAtTheMoonDark,
},
title: "Howl at the Moon",
},
};
20 changes: 15 additions & 5 deletions src/pages/ad/[type]/[slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import DeepBlueSea from "~/components/DeepBlueSea.astro";
import Head from "~/components/Head.astro";
import { partnersBySlug } from "~/data/partners";
import { sponsorsBySlug } from "~/data/sponsors";
import { venuesBySlug } from "~/data/venues";

export function getStaticPaths() {
return [
Expand All @@ -21,15 +22,24 @@ export function getStaticPaths() {
...Object.keys(sponsorsBySlug).map((slug) => ({
params: { type: "sponsor", slug: slug as keyof typeof sponsorsBySlug },
})),
...Object.keys(venuesBySlug).map((slug) => ({
params: { type: "venue", slug: slug as keyof typeof venuesBySlug },
})),
];
}

const { type, slug } = Astro.params;
const entityMaps = {
sponsor: sponsorsBySlug,
venue: venuesBySlug,
partner: partnersBySlug,
} as const;

const type = Astro.params.type as keyof typeof entityMaps;
const slug = Astro.params.slug;

const entityMap = entityMaps[type as "partner"];

const entity =
type === "sponsor"
? sponsorsBySlug[slug as keyof typeof sponsorsBySlug]
: partnersBySlug[slug as keyof typeof partnersBySlug];
const entity = entityMap[slug as keyof typeof entityMap];
---

<html lang="en">
Expand Down
Loading