Skip to content

Commit bfe1032

Browse files
committed
Add sponsor display images.
1 parent 53b0aa1 commit bfe1032

Some content is hidden

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

66 files changed

+934
-361
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,10 @@
4747
"@types/js-yaml": "^4.0.9",
4848
"prettier": "^3.5.3",
4949
"prettier-plugin-astro": "^0.14.1",
50-
"tsx": "^4.19.4",
5150
"puppeteer": "^24.7.2",
51+
"puppeteer-extra": "^3.3.6",
52+
"puppeteer-extra-plugin-adblocker": "^2.13.6",
53+
"tsx": "^4.19.4",
5254
"typescript": "^5.8.3"
5355
},
5456
"prettier": {

pnpm-lock.yaml

Lines changed: 342 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/BaseHead.astro

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,9 @@ const { title, description, image = "/social-card.png" } = Astro.props;
5757
is:inline
5858
data-domain="ep2025.europython.eu"
5959
src="https://plausible.io/js/script.js"></script>
60+
61+
<script
62+
defer
63+
is:inline
64+
data-domain="ep2025.europython.eu"
65+
src="https://plausible.io/js/script.outbound-links.js"></script>

src/components/CardContent.astro

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
3+
import { marked } from 'marked';
4+
const { entry } = Astro.props;
5+
const html = entry && entry.body ? marked.parse(entry.body) : "";
6+
7+
8+
---
9+
10+
<div class="mb-2 prose prose-li:m-0 prose-ul:m-0 prose-ul:mb-2 prose-a:underline prose-h1:text-text prose-headings:font-title prose-headings:text-text prose-a:text-text hover:prose-a:text-primary-hover prose-strong:text-text prose-strong:font-bold prose-li:marker:text-text pb-2">
11+
<article set:html={html} />
12+
</div>

src/components/JobCard.astro

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
---
2+
import CardContent from "@components/CardContent.astro";
23
const { job } = Astro.props;
34
const { title, sponsor, location, type, level, salary, tags, description, responsibilities, requirements, benefits, apply_link } = job.data;
45
---
@@ -8,24 +9,35 @@ const { title, sponsor, location, type, level, salary, tags, description, respon
89
<a href={`/sponsor/${job.id}`}>
910
<h2 class="text-3xl font-bold mb-2">{title}</h2>
1011
</a>
11-
<p class="text-gray-600 mb-2">{level}{type}{location}</p>
12+
{ level && type && location &&
13+
<p class="text-gray-600 mb-2">{level}{type}{location}</p>
14+
}
1215
<p class="text-gray-700 mb-4">{salary}</p>
1316
<p class="mb-6">{description}</p>
1417

15-
<h3 class="text-xl font-semibold mb-2">Responsibilities</h3>
16-
<ul class="list-disc list-inside mb-4">
17-
{responsibilities && responsibilities.map(item => <li>{item}</li>)}
18-
</ul>
18+
{ responsibilities &&
19+
<h3 class="text-xl font-semibold mb-2">Responsibilities</h3>
20+
<ul class="list-disc list-inside mb-4">
21+
{responsibilities.map(item => <li>{item}</li>)}
22+
</ul>
23+
}
1924

25+
{ requirements &&
2026
<h3 class="text-xl font-semibold mb-2">Requirements</h3>
2127
<ul class="list-disc list-inside mb-4">
22-
{requirements && requirements.map(item => <li>{item}</li>)}
28+
{requirements.map(item => <li>{item}</li>)}
2329
</ul>
30+
}
2431

32+
{ benefits &&
2533
<h3 class="text-xl font-semibold mb-2">Benefits</h3>
2634
<ul class="list-disc list-inside mb-6">
27-
{benefits && benefits.map(item => <li>{item}</li>)}
35+
{benefits.map(item => <li>{item}</li>)}
2836
</ul>
37+
}
38+
39+
40+
<CardContent entry={job} />
2941

3042
<a
3143
href={apply_link}

src/components/SponsorCard.astro

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,11 @@ const socialLinks = [
255255
}
256256

257257
.website-btn:hover , .website-btn-outline:hover {
258-
/*box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);*/
259-
/*transform: translateY(-2px);*/
258+
text-decoration: underline;
260259
}
261260

262261
.social-links {
263262
border: 0 solid rgba(33,33,33,0.2);
264263
border-width: 1px 0 0 0;
265264
}
266-
267-
a:hover {
268-
text-decoration: underline;
269-
}
270-
271265
</style>

src/components/SponsorCardBody.astro

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
---
22
import { Image } from "astro:assets";
33
const { sponsor } = Astro.props;
4+
5+
import { sponsorDisplay } from "@data/sponsorDisplay";
6+
const image = sponsorDisplay[sponsor.id]
47
---
58

9+
{ image &&
610
<section class="space-y-12 pb-6 md:p-6 overflow-hidden">
711
<Image
8-
src={sponsor.image
9-
? sponsor.image
10-
: "https://placehold.co/1100x360/19233C/white"}
12+
src={image}
1113
alt="Image"
1214
height="360"
1315
width="1100"
14-
class="max-w-[1100px] max-h-[360px]"
16+
class="max-w-[1108px] max-h-[368px] object-scale-down border-4 border-white rounded-lg shadow-lg"
1517
/>
1618
</section>
19+
}

src/content/config.ts

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -210,14 +210,18 @@ const sponsors = defineCollection({
210210
schema: z.object({
211211
name: z.string(),
212212
url: z.string().url(),
213-
tier: z.string().optional(),
213+
tier: z.string().nullable(),
214214
location: z.string().optional(),
215215
industry: z.string().optional(),
216216
description: z.string().optional(),
217217
socials: z
218218
.object({
219-
linkedin: z.string().url().optional(),
220-
twitter: z.string().url().optional(),
219+
linkedin: z.string().url().optional().nullable(),
220+
twitter: z.string().url().optional().nullable(),
221+
github: z.string().url().optional().nullable(),
222+
discord: z.string().url().optional().nullable(),
223+
mastodon: z.string().url().optional().nullable(),
224+
bluesky: z.string().url().optional().nullable(),
221225
})
222226
.optional(),
223227
jobs: z.array(z.string()).optional(),
@@ -229,16 +233,16 @@ const jobs = defineCollection({
229233
loader: glob({ pattern: "*/!(index).md", base: "./src/content/sponsors" }),
230234
schema: z.object({
231235
title: z.string(),
232-
location: z.string(),
233-
type: z.string(), // e.g., Full-Time
234-
level: z.string(), // e.g., Senior
235-
salary: z.string().optional(),
236-
tags: z.array(z.string()).optional(),
237-
description: z.string(),
238-
responsibilities: z.array(z.string()).optional(),
239-
requirements: z.array(z.string()).optional(),
240-
benefits: z.array(z.string()).optional(),
241-
apply_link: z.string().url(),
236+
location: z.string().nullable(),
237+
type: z.string().nullable(), // e.g., Full-Time
238+
level: z.string().nullable(), // e.g., Senior
239+
salary: z.string().nullable(),
240+
tags: z.array(z.string()).nullable(),
241+
description: z.string().nullable(),
242+
responsibilities: z.array(z.string()).nullable(),
243+
requirements: z.array(z.string()).nullable(),
244+
benefits: z.array(z.string()).nullable(),
245+
apply_link: z.string().url().optional(),
242246
}),
243247
});
244248

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Error: Could not load style

0 commit comments

Comments
 (0)