diff --git a/astro.config.mjs b/astro.config.mjs index 66381d261..73673847d 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -24,7 +24,13 @@ export default defineConfig({ }, resolve: { alias: { - $: path.resolve(__dirname, "./src"), + "@components": path.resolve("./src/components"), + "@sections": path.resolve("./src/components/sections"), + "@layouts": path.resolve("./src/layouts"), + "@ui": path.resolve("./src/components/ui"), + "@assets": path.resolve("./src/assets"), + "@i18n": path.resolve("./src/i18n"), + "@src": path.resolve("./src"), }, }, }, diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 6d6331be1..372114db3 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -58,3 +58,8 @@ const { title, description, image = "/social-card.png" } = Astro.props; is:inline data-domain="ep2025.europython.eu" src="https://plausible.io/js/script.js"> + + diff --git a/src/components/card/card.astro b/src/components/card/card.astro index bc44f7c31..5312f3ff2 100644 --- a/src/components/card/card.astro +++ b/src/components/card/card.astro @@ -1,7 +1,7 @@ --- import type { ImageMetadata } from "astro"; import { Image } from "astro:assets"; -import ButtonLink from "../button-link/button-link.astro"; +import Button from "@ui/Button.astro"; export interface Props { title: string; @@ -14,31 +14,26 @@ const { title, subtitle, url, image } = Astro.props; ---
-
+
- - {subtitle} - - + +
diff --git a/src/components/header/header-actions.astro b/src/components/header/header-actions.astro index f044c1837..0138c1dfa 100644 --- a/src/components/header/header-actions.astro +++ b/src/components/header/header-actions.astro @@ -1,5 +1,6 @@ --- import ButtonLink from "../button-link/button-link.astro"; +import Button from "@ui/Button.astro"; import HeaderButton from "./header-button.astro"; import Search from "astro-pagefind/components/Search"; @@ -12,7 +13,7 @@ const { mobile = false }: Props = Astro.props; const IS_LIVE = false; --- -
+
- - Register Now! 🎟️ - - {IS_LIVE && ( - - Live - - - )} + + {IS_LIVE && } ) : null } @@ -122,7 +116,8 @@ const IS_LIVE = false; --pagefind-ui-border: #d8d8d8; --pagefind-ui-border-width: 2px; --pagefind-ui-border-radius: 0; - width: 50%; + width:50%; + min-width: 10vw; } .pagefind-ui.yellow { --pagefind-ui-background: #efc302; diff --git a/src/components/header/header.astro b/src/components/header/header.astro index 151a25dda..2f4d0d4a4 100644 --- a/src/components/header/header.astro +++ b/src/components/header/header.astro @@ -7,7 +7,7 @@ import HeaderLogo from "./header-logo.astro"; const links = JSON.parse(await fs.readFile("./src/data/links.json", "utf-8")); --- -
+
-
diff --git a/src/components/hero2/hero.astro b/src/components/hero2/hero.astro index 75f99f5de..fe586638a 100644 --- a/src/components/hero2/hero.astro +++ b/src/components/hero2/hero.astro @@ -1,13 +1,13 @@ --- +import { Logo } from "../logo"; import { Image } from "astro:assets"; import heroImage from "./conference_photo.jpg"; import IconWithLabel from "./icon-label.astro"; -import ButtonLink from "../../components/button-link/button-link.astro"; +import Button from "@ui/Button.astro"; -import HeaderLogo from "../header/header-logo.astro"; -const action1 = "https://ep2025.europython.eu/tickets"; -const action2 = "https://ep2025.europython.eu/sponsorship/sponsor/"; +const action1 = "/tickets"; +const action2 = "/sponsorship/sponsor/"; ---
-
-
-
- +
+
+
+
-

+

EuroPython

-

+

Discover the latest Python trends, learn from 180+ expert speakers, network with fellow developers, enjoy social events, and explore open spaces to spark new ideas. @@ -106,27 +106,12 @@ const action2 = "https://ep2025.europython.eu/sponsorship/sponsor/";

-
+
- - Register Now - +
- - Call for Sponsors - - ↗ - +
diff --git a/src/components/keynoters/keynoter.astro b/src/components/keynoters/keynoter.astro index 800c4352e..0e6b991fb 100644 --- a/src/components/keynoters/keynoter.astro +++ b/src/components/keynoters/keynoter.astro @@ -13,6 +13,7 @@ export interface Props { tagline?: string; image?: ImageMetadata; placeholder?: boolean; + order?: number; class?: string; } @@ -22,6 +23,7 @@ const { tagline, image, placeholder, + order, class: className, } = Astro.props; @@ -29,10 +31,11 @@ const placeholders = [Person1, Person2, Person3, Person4, Person5]; const Placeholder = placeholders[Math.floor(Math.random() * placeholders.length)]; + ---
  • - +
    { image ? ( @@ -43,7 +46,7 @@ const Placeholder = class="object-cover group-hover:scale-105 transition-transform h-full w-full" /> ) : ( -
    +
    ) @@ -51,16 +54,16 @@ const Placeholder =
    { placeholder ? ( -

    More keynoters coming soon

    +

    More keynoters coming soon

    ) : ( <> -

    {name}

    +

    {name}

    {tagline ? ( -

    {tagline}

    +

    {tagline}

    ) : null} ) diff --git a/src/components/keynoters/keynoters.astro b/src/components/keynoters/keynoters.astro index 144224a16..a232aa8b5 100644 --- a/src/components/keynoters/keynoters.astro +++ b/src/components/keynoters/keynoters.astro @@ -1,27 +1,27 @@ --- -import ButtonLink from "../button-link/button-link.astro"; -import { Title } from "../typography/title"; import Keynoter from "./keynoter.astro"; +import Headline from "@ui/Headline.astro"; +import Button from "@ui/Button.astro"; import { getCollection } from "astro:content"; const keynoters = await getCollection("keynoters"); -const placeholders = Math.max(0, 6 - keynoters.length); +const placeholders = Math.max(0, 5 - keynoters.length); --- -
    +
    @@ -79,25 +79,26 @@ const placeholders = Math.max(0, 6 - keynoters.length); - - <a href="/keynoters">Keynote Speakers</a> - + -
      +
        { - keynoters.map((keynoter, index) => ( - - )) + keynoters + .sort((a, b) => a.data.order - b.data.order) + .map((keynoter, index) => ( + + )) } { new Array(placeholders) @@ -114,13 +115,16 @@ const placeholders = Math.max(0, 6 - keynoters.length); }
      -
      +

      # See other sessions

      - List of Sessions +
    + diff --git a/src/components/sections/prague.astro b/src/components/sections/prague.astro new file mode 100644 index 000000000..367ffc2c7 --- /dev/null +++ b/src/components/sections/prague.astro @@ -0,0 +1,9 @@ +--- +import PragueComponent from "@components/hero-section/prague.astro"; +import * as venue from "../../data/home/prague.mdx"; +--- +
    + + + +
    diff --git a/src/components/sections/updates.astro b/src/components/sections/updates.astro new file mode 100644 index 000000000..4d9887f0c --- /dev/null +++ b/src/components/sections/updates.astro @@ -0,0 +1,21 @@ +--- + +import { CardContainer } from "@components/card/card-container"; +import { Title } from "@components/typography/title"; +import DeadlineCard from "@components/deadline-card.astro"; +import Headline from "@ui/Headline.astro" +import { getCollection } from "astro:content"; + +let deadlines = await getCollection("deadlines"); +deadlines = deadlines + .sort((a, b) => a.slug.localeCompare(b.slug)) + .reverse() + .slice(0, 3); + +--- +
    + + + {deadlines.map((deadline) => )} + +
    diff --git a/src/components/sponsors/sponsors.astro b/src/components/sponsors/sponsors.astro index ef3a20ee0..8172015a1 100644 --- a/src/components/sponsors/sponsors.astro +++ b/src/components/sponsors/sponsors.astro @@ -3,9 +3,9 @@ import { getCollection } from "astro:content"; import { Separator } from "../separator/separator"; import { Fragment } from "react"; import { Fullbleed } from "../layout/fullbleed"; +import Headline from "@ui/Headline.astro" -import ButtonLink from "../button-link/button-link.astro"; -import { Title } from "../typography/title"; +import Button from "@ui/Button.astro"; import SponsorTier from "./sponsor-tier.astro"; @@ -48,19 +48,17 @@ const topTier = sponsorTiers.find((tier) => tier.name === "Keystone");
    +
    -
    -
    - Sponsors { hasSponsors ? ( -

    +

    EuroPython wouldn't be such an affordable event without the help of the sponsors. We'd like to thank all of them for their support.

    ) : ( -

    +

    Sponsoring EuroPython guarantees you highly targeted visibility and the opportunity to present yourself and your company to one of the largest and most diverse Python communities in Europe and @@ -69,10 +67,8 @@ const topTier = sponsorTiers.find((tier) => tier.name === "Keystone"); ) } -

    - Become a sponsor -
    -
    +
    +
    { topTier && topTier.sponsors.length > 0 && ( diff --git a/src/components/ui/Button.astro b/src/components/ui/Button.astro new file mode 100644 index 000000000..2300cda31 --- /dev/null +++ b/src/components/ui/Button.astro @@ -0,0 +1,55 @@ +--- +import Icon from "@ui/Icon.astro"; + +const { + url, + class: className = "", + secondary = false, + outline = false, + disabled = false, + isExternal, + icon, + iconSvg = false, + iconRight = true +} = Astro.props; + +const resolvedIsExternal = isExternal ?? url?.startsWith("http"); + +const baseClasses = "font-bold text-lg px-4 py-4 rounded-lg inline-flex items-center justify-center leading-4 transition-colors duration-200 not-prose border hover:text-black"; +const primaryClasses = "bg-button text-text-inverted hover:bg-button-hover border-transparent"; +const secondaryClasses = "bg-primary text-white hover:bg-primary-hover border-transparent"; +const outlineClasses = "border-gray-500 text-gray-700 hover:bg-gray-100 hover:bg-button-hover"; +const disabledClasses = "opacity-50 pointer-events-none"; +const iconClasses = "mx-2 "; + +--- + +{url ? ( +
    + {!iconRight && icon && } + + {iconRight && icon && } + {resolvedIsExternal && } + +) : ( + +)} diff --git a/src/components/ui/Headline.astro b/src/components/ui/Headline.astro new file mode 100644 index 000000000..fae8a6d54 --- /dev/null +++ b/src/components/ui/Headline.astro @@ -0,0 +1,16 @@ +--- +const { as = "h2", id, title, href} = Astro.props; +const Tag = as; +const Title = title; +const isAnchor = !!id; +const isLink = !!href; +--- + + + {isAnchor && ( + + {Title} + + )} + {isLink && {Title} } + diff --git a/src/components/ui/Icon.astro b/src/components/ui/Icon.astro new file mode 100644 index 000000000..d8c1c287a --- /dev/null +++ b/src/components/ui/Icon.astro @@ -0,0 +1,28 @@ +--- +const { + name, + svg = false, + class: className = "", + size = "", // Default size (Tailwind) + label = "", + role = "img" +} = Astro.props; +--- + +{svg ? ( + + + +) : ( + +)} diff --git a/src/content/config.ts b/src/content/config.ts index ddb3b5643..33e828647 100644 --- a/src/content/config.ts +++ b/src/content/config.ts @@ -50,6 +50,7 @@ const keynoters = defineCollection({ name: z.string(), tagline: z.string().optional(), image: image(), + order: z.number(), }), }); diff --git a/src/content/keynoters/brett.jpg b/src/content/keynoters/brett.jpg new file mode 100644 index 000000000..622e9e037 Binary files /dev/null and b/src/content/keynoters/brett.jpg differ diff --git a/src/content/keynoters/brett.mdx b/src/content/keynoters/brett.mdx new file mode 100644 index 000000000..8902ee0f3 --- /dev/null +++ b/src/content/keynoters/brett.mdx @@ -0,0 +1,7 @@ +--- +name: Brett Cannon +image: ./brett.jpg +slug: brett-cannon +tagline: CPython Core Developer & the 5th most prolific PEP (co-)author +order: 1 +--- diff --git a/src/content/keynoters/savannah.mdx b/src/content/keynoters/savannah.mdx new file mode 100644 index 000000000..43eeb45a1 --- /dev/null +++ b/src/content/keynoters/savannah.mdx @@ -0,0 +1,7 @@ +--- +name: Savannah Ostrowski +image: ./savannah.png +slug: savannah-ostrowski +tagline: CPython Core Developer & JIT Maintainer +order: 3 +--- diff --git a/src/content/keynoters/savannah.png b/src/content/keynoters/savannah.png new file mode 100644 index 000000000..30e113ddf Binary files /dev/null and b/src/content/keynoters/savannah.png differ diff --git a/src/content/keynoters/sebastian.jpg b/src/content/keynoters/sebastian.jpg new file mode 100644 index 000000000..853d88bb6 Binary files /dev/null and b/src/content/keynoters/sebastian.jpg differ diff --git a/src/content/keynoters/sebastian.mdx b/src/content/keynoters/sebastian.mdx new file mode 100644 index 000000000..28a92377b --- /dev/null +++ b/src/content/keynoters/sebastian.mdx @@ -0,0 +1,7 @@ +--- +name: Sebastián Ramírez (tiangolo) +image: ./sebastian.jpg +slug: sebastian-ramirez +tagline: Creator of FastAPI, Typer, and other open source tools +order: 2 +--- diff --git a/src/layouts/HomePageLayout.astro b/src/layouts/HomePageLayout.astro index 2c1824518..c11f772ff 100644 --- a/src/layouts/HomePageLayout.astro +++ b/src/layouts/HomePageLayout.astro @@ -1,5 +1,4 @@ --- -import "../styles/global.css"; import Header from "../components/header/header.astro"; import Footer from "../components/footer.astro"; import BaseHead from "../components/BaseHead.astro"; diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 268683885..f2e786a9d 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,5 +1,4 @@ --- -import "../styles/global.css"; import Header from "../components/header/header.astro"; import Footer from "../components/footer.astro"; import BaseHead from "../components/BaseHead.astro"; diff --git a/src/pages/index.astro b/src/pages/index.astro index 5dfc86b4b..15889f58c 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,25 +1,10 @@ --- -import { CardContainer } from "../components/card/card-container"; import Hero from "../components/hero2/hero.astro"; -import HeroWithCTA from "../components/hero-section/hero-with-cta.astro"; -import { Fullbleed } from "../components/layout/fullbleed"; -import Prose from "../components/prose/prose.astro"; -import { Title } from "../components/typography/title"; import Layout from "../layouts/HomePageLayout.astro"; -import DeadlineCard from "../components/deadline-card.astro"; -import { getCollection } from "astro:content"; -import Accent from "../components/accent/accent.astro"; -import Prague from "../components/hero-section/prague.astro"; import Sponsors from "../components/sponsors/sponsors.astro"; - -import * as intro from "../data/home/intro.md"; -import * as venue from "../data/home/prague.mdx"; - -let deadlines = await getCollection("deadlines"); -deadlines = deadlines - .sort((a, b) => a.slug.localeCompare(b.slug)) - .reverse() - .slice(0, 3); +import KeynotersComponent from "../components/keynoters/keynoters.astro"; +import Updates from "@sections/updates.astro"; +import Prague from "@sections/prague.astro"; --- -

    Updates

    - - {deadlines.map((deadline) => )} - + + + + + -
    - - - -
    diff --git a/src/pages/schedule/[day].astro b/src/pages/schedule/[day].astro index 55c891180..c909548e7 100644 --- a/src/pages/schedule/[day].astro +++ b/src/pages/schedule/[day].astro @@ -189,7 +189,7 @@ const slots = Object.entries(sessionsByTime) }; }); -const gridRows = []; +const gridRows: string[] = []; let row = 1; @@ -201,7 +201,7 @@ for (let i = 0; i < slots.length; i++) { const currentTime = timeToNumber(current.startTime); - let nextTime; + let nextTime: number; if (next) { nextTime = timeToNumber(next.startTime); diff --git a/src/pages/test_components.astro b/src/pages/test_components.astro new file mode 100644 index 000000000..b3551752e --- /dev/null +++ b/src/pages/test_components.astro @@ -0,0 +1,48 @@ + +--- +import Layout from "../layouts/HomePageLayout.astro"; +import Button from "@ui/Button.astro"; +import Headline from "@ui/Headline.astro" +import Icon from "@ui/Icon.astro" +--- + + + + + + + + + +
    + +
    + + + + + + +
    +
    + +
    + +
    + + + + + + + + + + + +
    +
    +
    diff --git a/tsconfig.json b/tsconfig.json index 1af506d84..27851a6c8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,8 +6,9 @@ "jsxImportSource": "react", "paths": { "@components/*": ["src/components/*"], - "@layouts/*": ["src/layouts/*"], + "@sections/*": ["src/components/sections/*"], "@ui/*": ["src/components/ui/*"], + "@layouts/*": ["src/layouts/*"], "@assets/*": ["src/assets/*"], "@i18n/*": ["src/i18n/*"], "@src/*": ["src/*"]