Skip to content

Commit d8a901a

Browse files
authored
Merge branch 'ep2025' into ep2025-overview
2 parents 1788bfa + ef07105 commit d8a901a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+369
-84
lines changed

src/components/SocialLinks.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const socialMap = {
2121
};
2222
---
2323

24-
<div class=`social-links flex justify-center space-x-4 ${className}`>
24+
<div class=`social-links flex justify-center space-x-4 ${className} h-[36px]`>
2525
{
2626
Object.entries(socialMap)
2727
.filter(([key]) => socials?.[key])

src/components/SponsorCard.astro

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const logo = sponsorLogos[sponsor.id];
6666
{
6767
description && (
6868
<div class="flex-1">
69-
<h2 class="text-2xl font-bold mb-2 ">
69+
<h2 id=`sponsor-${sponsorId}` class="sponsor text-2xl font-bold mb-2 ">
7070
{ !isSponsorPage && tier !== 'Partners' ?
7171
<a href={`/sponsor/${sponsor.id}`}>
7272
{title}
@@ -95,10 +95,15 @@ const logo = sponsorLogos[sponsor.id];
9595
)}
9696

9797

98+
</div>
99+
)
100+
}
101+
<div>
102+
98103
{(tier !== "Partners") && website && (
99104
<div class="website-btn-container flex flex-col sm:flex-row justify-center gap-2 mt-4">
100105

101-
{ !isSponsorPage && sponsor.body &&
106+
{ !isSponsorPage && sponsor.body && tier && ["Gold", "Platinum"].includes(tier) &&
102107
<a href={`/sponsor/${sponsor.id}`} class="website-btn-outline">
103108
About {title}
104109
</a>
@@ -114,9 +119,7 @@ const logo = sponsorLogos[sponsor.id];
114119
{ (tier !== "Partners") &&
115120
<SocialLinks socials={socials} />
116121
}
117-
</div>
118-
)
119-
}
122+
</div>
120123
</div>
121124

122125
<style>

src/components/SponsorDisplay.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { sponsorDisplay } from "@data/sponsorDisplay";
1515
const image = sponsorDisplay[sponsor.id]
1616
---
1717

18-
{ image &&
18+
{ sponsor.data.tier == "Platinum" && image &&
1919
<section class="space-y-12 pb-6 overflow-hidden">
2020
<Image
2121
src={image}

src/components/SponsorLogo.astro

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,29 @@ if (!sponsor) {
1515
const {
1616
name: title,
1717
url: website,
18+
tier,
1819
logo_padding = false,
1920
} = sponsor.data;
2021
2122
const logo = sponsorLogos[sponsor.id];
23+
const slug = tier==="Partners"? `/community-partners#sponsor-${sponsorId}`: tier==="Platinum" ? `/sponsor/${sponsorId}` : tier==="Media Partners" ? `/media-partners#sponsor-${sponsorId}` : tier==="Startups" ? `/startups#sponsor-${sponsorId}` : ""
24+
2225
---
2326

2427
<div
2528
class="lg:max-w-[400px] flex flex-col p-6 bg-white"
2629
>
2730
<div class="w-full flex justify-center items-center md:items-center">
2831
{
29-
website ? (
32+
website && slug ? (
3033

31-
<a href={website} target="_blank" aria-label={`Link to ${title}`}
34+
<a href={slug} aria-label={`Link to ${title}`}
3235
>
3336
<Image
3437
src={logo}
3538
alt={`${title} Logo`}
3639
style={{
37-
minWidth: "250px",
40+
minWidth: "170px",
3841
maxHeight: "120px",
3942
objectFit: "contain",
4043
padding: logo_padding ? logo_padding : undefined,
@@ -46,7 +49,7 @@ const logo = sponsorLogos[sponsor.id];
4649
src={logo}
4750
alt={`${title} Logo`}
4851
style={{
49-
minWidth: "250px",
52+
minWidth: "170px",
5053
maxHeight: "120px",
5154
objectFit: "contain",
5255
padding: logo_padding ? logo_padding : undefined,

src/components/sponsors/sponsor-tier.astro renamed to src/components/sections/sponsors/sponsor-tier.astro

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ export interface Props {
1010
sponsors: Sponsor[];
1111
};
1212
13-
top?: boolean;
13+
level: number;
1414
}
1515
16-
const { tier, top } = Astro.props;
16+
const { tier, level = 2} = Astro.props;
1717
---
1818

1919
<div class="relative">
@@ -27,9 +27,12 @@ const { tier, top } = Astro.props;
2727
<div
2828
class:list={[
2929
"grid ml-12 items-center justify-items-center",
30+
`level-${level}`,
3031
{
31-
"grid-cols-1 md:grid-cols-2 lg:grid-cols-3": !top,
32-
"grid-cols-1 md:grid-cols-2": top,
32+
"grid-cols-1 md:grid-cols-2 m-20 [&>*]:scale-110": level===0,
33+
"grid-cols-1 md:grid-cols-2 lg:grid-cols-3 [&>*]:scale-90": level > 0 && level << 6,
34+
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-90" : level===6,
35+
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-85" : level>6,
3336
},
3437
]}
3538
>

src/components/sponsors/sponsors.astro renamed to src/components/sections/sponsors/sponsors.astro

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ const tiers = [
1414
"Platinum X",
1515
"Gold",
1616
"Silver",
17+
"Startups",
1718
"Bronze",
1819
"Patron",
1920
"Financial Aid",
2021
"Supporters",
21-
"Partners"
22+
"Partners",
23+
"Media Partners"
2224
] as const;
2325
2426
const sponsors = await getCollection("sponsors");
@@ -67,20 +69,15 @@ const topTier = sponsorTiers.find((tier) => tier.name === "Keystone");
6769
<div class="mt-4 text-center">
6870
<Button url="/sponsor">Become a sponsor</Button>
6971
</div>
70-
{
71-
topTier && topTier.sponsors.length > 0 && (
72-
<SponsorTier tier={topTier} top={true} />
73-
)
74-
}
7572
</div>
7673

7774
{sponsorTiers.length > 0 && <hr />}
7875

79-
<div class="">
76+
<div >
8077
{
8178
sponsorTiers.map((tier, index) => (
8279
<Fragment>
83-
<SponsorTier tier={tier} top={tier.name === "Platinum"} />
80+
<SponsorTier tier={tier} level={index} />
8481
{index !== sponsorTiers.length - 1 && <hr />}
8582
</Fragment>
8683
))
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
import { getEntry } from "astro:content";
3+
import Card from "./card.astro";
4+
5+
export interface Props {
6+
id: string;
7+
}
8+
9+
const { id } = Astro.props;
10+
11+
const deadline = await getEntry("week", id);
12+
13+
if (!deadline) {
14+
throw new Error(`No deadline found with id ${id}`);
15+
}
16+
17+
const { Content } = await deadline.render();
18+
---
19+
20+
<Card
21+
image={deadline.data.image}
22+
title={deadline.data.title}
23+
url={deadline.data.url}
24+
subtitle={deadline.data.subtitle}
25+
>
26+
<Content />
27+
</Card>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
import DeadlineCard from "./week-card.astro";
3+
import Headline from "@ui/Headline.astro";
4+
import { getCollection } from "astro:content";
5+
import Section from "@ui/Section.astro";
6+
7+
let deadlines = await getCollection("week");
8+
deadlines = deadlines
9+
.sort((a, b) => a.slug.localeCompare(b.slug))
10+
.reverse()
11+
.slice(0, 3);
12+
---
13+
14+
<Section>
15+
<Headline id="the_week" title="A Week of All Things Python" center="true" />
16+
<section class="justify-center gap-6 flex flex-wrap px-6">
17+
{deadlines.map((deadline) => <DeadlineCard id={deadline.slug} />)}
18+
</section>
19+
</Section>

src/content/config.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,17 @@ const deadlines = defineCollection({
2525
}),
2626
});
2727

28+
const week = defineCollection({
29+
type: "content",
30+
schema: ({ image }) =>
31+
z.object({
32+
title: z.string(),
33+
subtitle: z.string(),
34+
url: z.string(),
35+
image: image(),
36+
}),
37+
});
38+
2839
const keynoters = defineCollection({
2940
type: "content",
3041
schema: ({ image }) =>
@@ -198,7 +209,7 @@ const sponsors = defineCollection({
198209
schema: z.object({
199210
name: z.string(),
200211
url: z.string().url(),
201-
tier: z.string().nullable(),
212+
tier: z.string(),
202213
location: z.string().optional(),
203214
industry: z.string().optional(),
204215
description: z.string().optional(),
@@ -244,6 +255,7 @@ export const collections = {
244255
days,
245256
pages,
246257
deadlines,
258+
week,
247259
sessions,
248260
speakers,
249261
keynoters,
30.6 KB
Loading

0 commit comments

Comments
 (0)