diff --git a/src/assets/speakers/ayse-bilge-ince.jpeg b/src/assets/speakers/ayse-bilge-ince.jpeg new file mode 100644 index 0000000..fb0e420 Binary files /dev/null and b/src/assets/speakers/ayse-bilge-ince.jpeg differ diff --git a/src/assets/speakers/lysandros-nikolaou.webp b/src/assets/speakers/lysandros-nikolaou.webp new file mode 100644 index 0000000..f1dec36 Binary files /dev/null and b/src/assets/speakers/lysandros-nikolaou.webp differ diff --git a/src/content.config.ts b/src/content.config.ts index 0c1fac2..a020db8 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -11,11 +11,19 @@ const linkSchema = z.object({ const speakers = defineCollection({ loader: glob({ pattern: "**/*.md", base: "./src/content/speakers" }), schema: ({ image }) => - z.object({ - name: z.string(), - image: image().optional(), - links: z.array(linkSchema).optional(), - }), + z + .object({ + name: z.string(), + tagline: z.string().optional(), + image: image().optional(), + keynote: z.boolean().optional(), + order: z.number().default(Number.MAX_SAFE_INTEGER), + links: z.array(linkSchema).optional(), + }) + .refine((s) => !s.keynote || s.image, { + message: "keynote speakers need an image", + path: ["image"], + }), }); const organizers = defineCollection({ diff --git a/src/content/speakers/ayse-bilge-ince.md b/src/content/speakers/ayse-bilge-ince.md new file mode 100644 index 0000000..4f53b6e --- /dev/null +++ b/src/content/speakers/ayse-bilge-ince.md @@ -0,0 +1,7 @@ +--- +name: Ayşe Bilge İnce +tagline: Staff Machine Learning Engineer at EDB +image: ../../assets/speakers/ayse-bilge-ince.jpeg +keynote: true +order: 2 +--- diff --git a/src/content/speakers/lysandros-nikolaou.md b/src/content/speakers/lysandros-nikolaou.md new file mode 100644 index 0000000..a253c3d --- /dev/null +++ b/src/content/speakers/lysandros-nikolaou.md @@ -0,0 +1,7 @@ +--- +name: Lysandros Nikolaou +tagline: CPython Core Team Member & PyCon Greece Organizer +image: ../../assets/speakers/lysandros-nikolaou.webp +keynote: true +order: 1 +--- diff --git a/src/content/speakers/speaker.md.example b/src/content/speakers/speaker.md.example index b81f62d..bc01bf8 100644 --- a/src/content/speakers/speaker.md.example +++ b/src/content/speakers/speaker.md.example @@ -1,6 +1,9 @@ --- name: Example Speaker +tagline: One line about the speaker # optional, shown for keynotes image: ../../assets/speakers/example.jpg +keynote: true # optional, shows the speaker in the homepage Keynote Speakers section +order: 1 # optional, keynotes sort ascending, unset goes last links: - url: https://example.com icon: /socials/website.svg diff --git a/src/data/event.ts b/src/data/event.ts index c694290..0578f7d 100644 --- a/src/data/event.ts +++ b/src/data/event.ts @@ -35,6 +35,13 @@ export const event = { }, // shown together in the hero; ctas with floating: true also get a floating button once scrolled past ctas: [ + { + id: "keynotes", + label: "Meet our keynoters 🎙️", + href: "#keynotes", + variant: "inverted" as const, + floating: false, + }, { id: "tickets", label: "Get your ticket! 🎟️", diff --git a/src/data/navigation.ts b/src/data/navigation.ts index 9e1c215..8727c6a 100644 --- a/src/data/navigation.ts +++ b/src/data/navigation.ts @@ -1,5 +1,6 @@ export const menuItems = [ { href: "/#about", label: "About 🍕" }, + { href: "/#keynotes", label: "Keynotes 🎙️" }, { href: "/#venue", label: "Venue 🏰" }, { href: "/#sponsors", label: "Sponsors 💛" }, { href: "/#cfp", label: "CFP 🙋🏻‍♀️" }, diff --git a/src/pages/index.astro b/src/pages/index.astro index aae97a7..9783191 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -11,6 +11,7 @@ import Sponsors from "@sections/Sponsors.astro"; // import Schedule from "@sections/Schedule.astro"; import Organizers from "@sections/Organizers.astro"; import Venue from "@sections/Venue.astro"; +import Keynotes from "@sections/Keynotes.astro"; import AboutContent from "@prose/about.mdx"; import CfpContent from "@prose/cfp.mdx"; import CocContent from "@prose/coc.mdx"; @@ -50,6 +51,7 @@ const twitter = socials.find((s) => s.handle);
+
diff --git a/src/sections/Keynotes.astro b/src/sections/Keynotes.astro new file mode 100644 index 0000000..760dbb1 --- /dev/null +++ b/src/sections/Keynotes.astro @@ -0,0 +1,115 @@ +--- +import { getCollection } from "astro:content"; +import { Image } from "astro:assets"; +import Section from "@components/Section.astro"; +import { event } from "@data/event"; + +const keynotes = ( + await getCollection("speakers", ({ data }) => data.keynote) +).sort((a, b) => a.data.order - b.data.order); +--- + +
+
+ {keynotes.map((speaker) => ( +
+
+
+ {`Photo +
+
Keynote
+

{speaker.data.name}

+ {speaker.data.tagline && ( +

{speaker.data.tagline}

+ )} + +
+
+ + +
+
+ ))} +
+
+ + diff --git a/src/styles/global.css b/src/styles/global.css index 3e7a78b..07ed528 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -37,7 +37,7 @@ html { scroll-behavior: smooth; /* header is fixed; keep anchor jumps clear of the floating pill */ - scroll-padding-top: 6rem; + scroll-padding-top: 3rem; } body {