From 905ebc627ee59acf2951b749a4a1e8f85d0a7347 Mon Sep 17 00:00:00 2001 From: Niko Date: Sat, 26 Apr 2025 19:01:50 +0200 Subject: [PATCH 01/11] Change layout to wide. --- astro.config.mjs | 9 +- src/components/BaseHead.astro | 4 + src/components/Footer.astro | 15 +- src/components/Header.astro | 2 + src/components/card/card.astro | 2 +- src/components/hero/hero.astro | 14 - src/components/hero/hero.svg | 1988 ---------------------- src/components/hero2/hero.astro | 3 + src/components/keynoters/keynoters.astro | 8 +- src/components/map/map.tsx | 2 +- src/components/prose/prose.astro | 12 +- src/components/schedule/day.astro | 5 - src/components/sections/prague.astro | 8 +- src/components/sections/speakers.astro | 5 +- src/components/sections/subscribe.astro | 7 +- src/components/sections/updates.astro | 11 +- src/components/sponsors/sponsors.astro | 4 +- src/components/ui/Section.astro | 27 + src/content/pages/childcare.mdx | 6 +- src/layouts/BaseLayout.astro | 9 - src/layouts/HomePageLayout.astro | 37 - src/layouts/Layout.astro | 36 +- src/layouts/MarkdownLayout.astro | 8 +- src/layouts/ScheduleLayout.astro | 63 +- src/pages/[...slug].astro | 2 - src/pages/index.astro | 18 +- src/pages/overview.astro | 3 +- src/pages/sessions.astro | 5 +- src/pages/speakers.astro | 5 +- src/pages/test_components.astro | 2 +- src/styles/markdown.css | 4 + 31 files changed, 154 insertions(+), 2170 deletions(-) delete mode 100644 src/components/hero/hero.astro delete mode 100644 src/components/hero/hero.svg create mode 100644 src/components/ui/Section.astro delete mode 100644 src/layouts/BaseLayout.astro delete mode 100644 src/layouts/HomePageLayout.astro diff --git a/astro.config.mjs b/astro.config.mjs index 9b72331dc..8ac660189 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -11,12 +11,19 @@ import metaTags from "astro-meta-tags"; import pagefind from "astro-pagefind"; import deleteUnusedImages from "astro-delete-unused-images"; import preload from "astro-preload"; +import { execSync } from "node:child_process"; // https://astro.build/config export default defineConfig({ vite: { define: { - "process.env.VITE_BUILD_TIME": JSON.stringify(new Date().toISOString()), + "import.meta.env.TIMESTAMP": new Date() + .toISOString() + .replace(/[-:T.Z]/g, "") + .slice(0, 14), + "import.meta.env.GIT_VERSION": new String( + execSync("git rev-parse --short HEAD") + ), }, resolve: { alias: { diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro index 3f667661b..697172ae5 100644 --- a/src/components/BaseHead.astro +++ b/src/components/BaseHead.astro @@ -5,6 +5,8 @@ interface Props { image?: string; } +const buildTimestamp = import.meta.env.TIMESTAMP; +const gitVersion = import.meta.env.GIT_VERSION; const canonicalURL = new URL(Astro.url.pathname, Astro.site); const { title, description, image = "/social-card.png" } = Astro.props; @@ -15,6 +17,8 @@ const { title, description, image = "/social-card.png" } = Astro.props; + + diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 594df4740..f4f581d02 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -8,10 +8,8 @@ const buildTimestamp = import.meta.env.TIMESTAMP; const gitVersion = import.meta.env.GIT_VERSION; --- -
- -
-
@@ -99,12 +97,9 @@ const gitVersion = import.meta.env.GIT_VERSION; twitter.com/europython

-

- version: {gitVersion} @ {buildTimestamp} + version: {gitVersion} @ {buildTimestamp}

-
+
- - diff --git a/src/components/Header.astro b/src/components/Header.astro index de0d13ed0..d01e07e24 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -3,6 +3,7 @@ import { promises as fs } from "fs"; import { NavItems } from "@components/nav-items"; import HeaderActions from "@components/header/header-actions.astro"; import HeaderLogo from "@components/header/header-logo.astro"; +import Search from "@components/Search.astro"; import links from "../data/links.json"; --- @@ -54,4 +55,5 @@ import links from "../data/links.json"; /> + diff --git a/src/components/card/card.astro b/src/components/card/card.astro index 5312f3ff2..a9d6d304e 100644 --- a/src/components/card/card.astro +++ b/src/components/card/card.astro @@ -14,7 +14,7 @@ const { title, subtitle, url, image } = Astro.props; ---
diff --git a/src/components/hero/hero.astro b/src/components/hero/hero.astro deleted file mode 100644 index 29e7c18c6..000000000 --- a/src/components/hero/hero.astro +++ /dev/null @@ -1,14 +0,0 @@ ---- -import { Image } from "astro:assets"; -import heroImage from "./hero.svg"; ---- - -
-
- EuroPython 2025 Hero Image -
-
diff --git a/src/components/hero/hero.svg b/src/components/hero/hero.svg deleted file mode 100644 index 3cae48cfe..000000000 --- a/src/components/hero/hero.svg +++ /dev/null @@ -1,1988 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/components/hero2/hero.astro b/src/components/hero2/hero.astro index 2aa653588..07e9e9072 100644 --- a/src/components/hero2/hero.astro +++ b/src/components/hero2/hero.astro @@ -4,11 +4,13 @@ import heroImage from "./conference_photo.jpg"; import IconWithLabel from "./icon-label.astro"; import Button from "@ui/Button.astro"; +import Section from "@ui/Section.astro"; const action1 = "/tickets"; const action2 = "/sponsorship/sponsor/"; --- +
+ diff --git a/src/components/map/map.tsx b/src/components/map/map.tsx index 3e57a6005..f41cd6c02 100644 --- a/src/components/map/map.tsx +++ b/src/components/map/map.tsx @@ -2,7 +2,7 @@ export const Map = () => (