Skip to content

Commit cc0860c

Browse files
committed
Add sessions and speakers with preloaded images.
1 parent 5fe48a6 commit cc0860c

27 files changed

+443
-141
lines changed

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ dmypy.json
128128
.pyre/
129129

130130
.vscode/
131+
.idea/
131132
out/
132133
.next/
133134
.DS_Store
@@ -138,3 +139,12 @@ storybook-static/
138139
# Sentry Auth Token
139140
.sentryclirc
140141
.astro
142+
143+
# EuroPython website
144+
src/content/speakers
145+
src/content/sessions
146+
src/content/days
147+
src/data/speakers.json
148+
src/data/sessions.json
149+
src/data/schedule.json
150+
public/cache/

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
1919
# Replace "/" and other non-alphanumeric characters with "-"
2020
SAFE_BRANCH := $(shell echo "$(BRANCH)" | sed 's/[^A-Za-z0-9-]/-/g')
2121
FORCE_DEPLOY ?= false
22+
SITE_URL ?= "https://$(SAFE_BRANCH).ep-preview.click"
2223

2324
.PHONY: build deploy dev clean install
2425

25-
2626
safe_branch:
2727
@echo $(SAFE_BRANCH)
2828

@@ -47,6 +47,7 @@ build:
4747
preview: RELEASES_DIR = $(VPS_PREVIEW_PATH)/$(SAFE_BRANCH)/releases
4848
preview: TARGET = $(RELEASES_DIR)/$(TIMESTAMP)
4949
preview:
50+
@echo "Preview site URL: $(SITE_URL)" # Output preview URL
5051
echo $(TARGET)
5152
@echo "\n\n**** Deploying preview of a branch '$(BRANCH)' (safe: $(SAFE_BRANCH)) to $(TARGET)...\n\n"
5253
$(REMOTE_CMD) "mkdir -p $(TARGET)"

astro.config.mjs

+6-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import rehypeAutolinkHeadings from "rehype-autolink-headings";
1010
import metaTags from "astro-meta-tags";
1111
import pagefind from "astro-pagefind";
1212
import deleteUnusedImages from "astro-delete-unused-images";
13+
import preload from "astro-preload";
1314

1415
// https://astro.build/config
1516
export default defineConfig({
@@ -59,9 +60,9 @@ export default defineConfig({
5960
"/sponsor/": "/sponsorship/sponsor/",
6061
"/voting/": "/programme/voting/",
6162
"/wasm-summit/": "/programme/wasm-summit/",
62-
"/sessions/": "/programme/sessions/",
6363
},
6464
integrations: [
65+
preload(),
6566
mdx(),
6667
sitemap(),
6768
react(),
@@ -76,6 +77,10 @@ export default defineConfig({
7677
build: {
7778
minify: true,
7879
},
80+
image: {
81+
remotePatterns: [{ protocol: "https" }],
82+
domains: ["programme.europython.eu", "placehold.co"],
83+
},
7984
experimental: {
8085
svg: true,
8186
},

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
"astro-delete-unused-images": "^1.0.3",
2626
"astro-meta-tags": "^0.3.1",
2727
"astro-pagefind": "^1.8.1",
28+
"astro-preload": "^1.1.2",
2829
"clsx": "^2.1.1",
2930
"date-fns": "^4.1.0",
3031
"date-fns-tz": "^3.2.0",
3132
"hastscript": "^9.0.0",
33+
"js-yaml": "^4.1.0",
34+
"marked": "^15.0.7",
3235
"pagefind": "^1.3.0",
3336
"react": "^19.1.0",
3437
"react-dom": "^19.1.0",
@@ -40,6 +43,7 @@
4043
"typescript": "^5.8.3"
4144
},
4245
"devDependencies": {
46+
"@types/js-yaml": "^4.0.9",
4347
"prettier": "^3.4.2",
4448
"prettier-plugin-astro": "^0.14.1"
4549
},

pnpm-lock.yaml

+29
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

public/favicon.ico

56.6 KB
Binary file not shown.

public/placeholder.png

5.35 KB
Loading

scripts/download-data.py

-79
This file was deleted.

src/assets/placeholder.png

5.35 KB
Loading

src/assets/placeholder.svg

+1
Loading

src/components/header/header-actions.astro

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
---
2-
import ButtonLink from "../button-link/button-link.astro";
32
import Button from "@ui/Button.astro";
43
import HeaderButton from "./header-button.astro";
54
import Search from "astro-pagefind/components/Search";

src/components/keynoters/keynoter.astro

-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,9 @@ export interface Props {
1919
2020
const {
2121
name,
22-
slug,
2322
tagline,
2423
image,
2524
placeholder,
26-
order,
2725
class: className,
2826
} = Astro.props;
2927

src/components/schedule/speakers.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const speakers = Astro.props.speakers
2020

2121
{
2222
speakers.map((speaker, index) => (
23-
<a href={`/speaker/${speaker.slug}`} class="inline">
23+
<a href={`/speaker/${speaker.id}`} class="inline">
2424
{speaker.data.name}
2525
{index < speakers.length - 1 ? ", " : ""}
2626
</a>

src/components/sections/prague.astro

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
import Button from "@ui/Button.astro";
3-
import { Title } from "@components/typography/title";
43
import { Image } from "astro:assets";
54
import pragueImage from "@assets/prague2.jpg";
65
import Logo from "@assets/prague.svg";

src/components/sections/updates.astro

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
33
import { CardContainer } from "@components/card/card-container";
4-
import { Title } from "@components/typography/title";
54
import DeadlineCard from "@components/deadline-card.astro";
65
import Headline from "@ui/Headline.astro"
76
import { getCollection } from "astro:content";

src/components/session-speakers.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const speakers = await getEntries(
2121
{
2222
speakers.map((speaker, index) => (
2323
<span class="inline">
24-
<a href={`/speaker/${speaker.slug}`} class="underline">
24+
<a href={`/speaker/${speaker.id}`} class="underline">
2525
{speaker.data.name}
2626
</a>
2727
{index < speakers.length - 1 ? ", " : ""}

src/components/ui/Headline.astro

+27-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,37 @@ const isAnchor = !!id;
66
const isLink = !!href;
77
---
88

9-
<Tag id={isAnchor ? id : undefined} class={`m-5 py-2 text-center font-bold text-6xl`}>
9+
<Tag id={isAnchor ? id : undefined} class={`m-5 py-2 font-bold max-w-[90vw]`}>
1010
{isAnchor && (
1111
<a href={`#${id}`} aria-label={`Jump to ${id}`}>
1212
{Title}
1313
</a>
1414
)}
1515
{isLink && <a aria-label="Read more about {Title}" href={href} class="hover:underline">{Title}</a> }
1616
</Tag>
17+
18+
<style>
19+
h1 {
20+
font-size: calc(1.9rem + 1.5vw + 0.8vh);
21+
}
22+
23+
h2 {
24+
font-size: calc(1.75rem + 1.5vw + 0.8vh);
25+
}
26+
27+
h3 {
28+
font-size: calc(1.5rem + 1.2vw + 0.6vh);
29+
}
30+
31+
h4 {
32+
font-size: calc(1.25rem + 1vw + 0.4vh);
33+
}
34+
35+
h5 {
36+
font-size: calc(1rem + 0.8vw + 0.3vh);
37+
}
38+
39+
h6 {
40+
font-size: calc(0.875rem + 0.6vw + 0.2vh);
41+
}
42+
</style>

src/components/ui/Markdown.astro

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
import { marked } from 'marked';
3+
4+
interface Props {
5+
content: string;
6+
}
7+
8+
const { content } = Astro.props;
9+
const html = marked.parse(content);
10+
---
11+
12+
<div class="prose prose-xl max-w-none" >
13+
<article set:html={html} />
14+
</div>

0 commit comments

Comments
 (0)