Skip to content

Commit e531d28

Browse files
committed
Merge branch 'ep2025' into ep2025-issue-1302
2 parents 5b15ac1 + 7cf3eb9 commit e531d28

Some content is hidden

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

48 files changed

+279
-83
lines changed

public/images/sprints.png

1.13 MB
Loading

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: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ 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}` : `/sponsors#sponsor-${sponsorId}`
24+
2225
---
2326

2427
<div
@@ -28,13 +31,13 @@ const logo = sponsorLogos[sponsor.id];
2831
{
2932
website ? (
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: 6 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,11 @@ 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-80": level > 0 && level << 6,
34+
"grid-cols-2 md:grid-cols-3 lg:grid-cols-4 [&>*]:scale-80" : level===6,
3335
},
3436
]}
3537
>

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,15 @@ const topTier = sponsorTiers.find((tier) => tier.name === "Keystone");
6868
<div class="mt-4 text-center">
6969
<Button url="/sponsor">Become a sponsor</Button>
7070
</div>
71-
{
72-
topTier && topTier.sponsors.length > 0 && (
73-
<SponsorTier tier={topTier} top={true} />
74-
)
75-
}
7671
</div>
7772

7873
{sponsorTiers.length > 0 && <hr />}
7974

80-
<div class="">
75+
<div >
8176
{
8277
sponsorTiers.map((tier, index) => (
8378
<Fragment>
84-
<SponsorTier tier={tier} top={tier.name === "Platinum"} />
79+
<SponsorTier tier={tier} level={index} />
8580
{index !== sponsorTiers.length - 1 && <hr />}
8681
</Fragment>
8782
))
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,

0 commit comments

Comments
 (0)