diff --git a/public/draft2.png b/public/draft2.png new file mode 100644 index 000000000..aa9ce2df7 Binary files /dev/null and b/public/draft2.png differ diff --git a/src/components/SprintCard.astro b/src/components/SprintCard.astro new file mode 100644 index 000000000..e47197945 --- /dev/null +++ b/src/components/SprintCard.astro @@ -0,0 +1,77 @@ +--- +import { getEntry } from 'astro:content'; +import Markdown from "@ui/Markdown.astro"; + +const { slug } = Astro.props; + + +const sprint = await getEntry("sprints", slug); + +if (!sprint) { + throw new Error(`Sprint entry "${slug}" not found`); +} + +const { data, body } = sprint; + +// +--- + +
+
+

+ {data.title} +

+
+ + 👥 + {data.numberOfPeople} + + + 🐍 + {data.pythonLevel} + +
+
+ +
+
+ Contact: + {data.contactPerson.name} + {data.contactPerson.email && ( + + {' '}({data.contactPerson.email}) + + )} + {data.contactPerson.github && ( + + {' '}(@{data.contactPerson.github}) + + )} + {data.contactPerson.twitter && ( + + {' '}(@{data.contactPerson.twitter}) + + )} +
+ + {(data.links) && ( +
+ Links: + +
+ )} + + + {body && + + } + +
+ +
diff --git a/src/components/ui/MarkdownContent.astro b/src/components/ui/MarkdownContent.astro new file mode 100644 index 000000000..379430589 --- /dev/null +++ b/src/components/ui/MarkdownContent.astro @@ -0,0 +1,8 @@ +--- +import Markdown from "@ui/Markdown.astro"; + +const content = await Astro.slots.render('default') + +--- + + diff --git a/src/content/config.ts b/src/content/config.ts index 35621b6c0..392d753a9 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -256,6 +256,31 @@ const jobs = defineCollection({ }), }); +const sprints = defineCollection({ + type: "content", + schema: z.object({ + title: z.string(), + slug: z.string().optional(), // Auto-generated from filename if not provided + numberOfPeople: z.string().or(z.number()), + pythonLevel: z.enum(["Any", "Beginner", "Intermediate", "Advanced"]), + contactPerson: z.object({ + name: z.string(), + email: z.string().email().optional().nullable(), + github: z.string().optional().nullable(), + twitter: z.string().optional().nullable(), + }), + links: z + .array( + z.object({ + title: z.string(), + url: z.string().url(), + }) + ) + .optional(), + draft: z.boolean().optional().default(false), + }), +}); + export const collections = { days, pages, @@ -263,6 +288,7 @@ export const collections = { week, sessions, speakers, + sprints, keynoters, sponsors, jobs, diff --git a/src/content/pages/sprints.md b/src/content/pages/sprints_info.md similarity index 88% rename from src/content/pages/sprints.md rename to src/content/pages/sprints_info.md index 4c73fd8b9..27ea5139f 100644 --- a/src/content/pages/sprints.md +++ b/src/content/pages/sprints_info.md @@ -31,7 +31,13 @@ together. ## Open-Source Projects -More info soon! +Anyone can submit a project for the sprints, although sprints are typically +submitted by project maintainers or frequet contributors. + +To submit a project for the sprints, head to +[the EuroPython website repository](https://github.com/EuroPython/website) and +add your project as a markdown file in the folder `src/content/sprints`. Use the +file `_sprints_template.md` as the template for your project file.