Skip to content

Commit 701c721

Browse files
nikoshellpre-commit-ci[bot]clytaemnestra
authored
Add section "The Week" (#1311)
New section for "the Week" based on updates. Content for the section is in path /src/content/week/ --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Mia <[email protected]> Co-authored-by: Mia Bajić <[email protected]>
1 parent 394e29b commit 701c721

File tree

11 files changed

+92
-2
lines changed

11 files changed

+92
-2
lines changed
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: 12 additions & 0 deletions
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 }) =>
@@ -244,6 +255,7 @@ export const collections = {
244255
days,
245256
pages,
246257
deadlines,
258+
week,
247259
sessions,
248260
speakers,
249261
keynoters,

src/content/week/.gitkeep

Whitespace-only changes.

src/content/week/01_sprints.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Sprints Weekend
3+
subtitle: What are Sprints?
4+
url: /sprints
5+
image: "./sprints.jpg"
6+
---
7+
8+
10+ open-source projects, beginners' workshops and unconference session.
9+
10+
July 19-20 <br /> Saturday-Sunday

src/content/week/02_talks.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: Main Conference
3+
subtitle: See the Schedule
4+
url: /schedule/talks/
5+
image: "talks.jpg"
6+
---
7+
8+
120+ talks, six parallel tracks, open spaces, PyLadies day, social events, and
9+
more!
10+
11+
July 16-18 <br /> Wednesday-Friday

src/content/week/03_tutorials.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Tutorials & Summits
3+
subtitle: Learn More
4+
url: /schedule/tutorials/
5+
image: "./tutorials.jpg"
6+
---
7+
8+
Two days of tutorials, Rust summit, C-API summit, and WASM summit.
9+
10+
July 14-15 <br /> Monday-Tuesday

src/content/week/sprints.jpg

5.76 MB
Loading

src/content/week/talks.jpg

11.3 MB
Loading

src/content/week/tutorials.jpg

7.22 MB
Loading

src/pages/index.astro

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
22
import Layout from "@layouts/Layout.astro";
33
import Hero from "@sections/hero/hero.astro";
4-
import Updates from "@sections/updates/updates.astro";
4+
// import Updates from "@sections/updates/updates.astro";
5+
import Week from "@sections/updates/week.astro";
56
import Keynoters from "@sections/keynoters/keynoters.astro";
67
import Speakers from "@sections/speakers.astro";
78
import Prague from "@sections/prague.astro";
@@ -14,7 +15,7 @@ import Subscribe from "@sections/subscribe.astro";
1415
description="EuroPython is the largest Python conference in Europe. We are looking forward to seeing you in Prague, Czech Republic & Remote from July 14th-20th 2025."
1516
>
1617
<Hero />
17-
<Updates />
18+
<Week />
1819
<Keynoters />
1920
<Speakers />
2021
<Prague />

0 commit comments

Comments
 (0)