Skip to content

Commit 46474a8

Browse files
authored
Merge branch 'ep2025' into ep2025-unconference
2 parents 0458871 + 751624d commit 46474a8

28 files changed

+3979
-710
lines changed

astro.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import rehypeSlug from "rehype-slug";
77
import rehypeAutolinkHeadings from "rehype-autolink-headings";
88
import metaTags from "astro-meta-tags";
99
import deleteUnusedImages from "astro-delete-unused-images";
10+
import serviceWorker from "astrojs-service-worker";
1011
import { execSync } from "node:child_process";
1112
import svelte from "@astrojs/svelte";
1213
import compress from "astro-compress";
@@ -117,6 +118,9 @@ export default defineConfig({
117118
metaTags(),
118119
deleteUnusedImages(),
119120
svelte(),
121+
serviceWorker({
122+
workbox: { inlineWorkboxRuntime: true },
123+
}),
120124
compress({
121125
HTML: false,
122126
CSS: false,
@@ -132,4 +136,8 @@ export default defineConfig({
132136
remotePatterns: [{ protocol: "https" }],
133137
domains: ["programme.europython.eu", "placehold.co"],
134138
},
139+
prefetch: {
140+
prefetchAll: true,
141+
defaultStrategy: "load",
142+
},
135143
});

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,14 @@
2020
"@fortawesome/fontawesome-free": "^6.7.2",
2121
"@nanostores/persistent": "^1.0.0",
2222
"@tailwindcss/typography": "^0.5.16",
23-
"@tailwindcss/vite": "^4.1.7",
23+
"@tailwindcss/vite": "^4.1.8",
2424
"astro": "^5.8.0",
2525
"astro-compress": "^2.3.8",
2626
"astro-delete-unused-images": "^1.0.3",
2727
"astro-meta-tags": "^0.3.2",
2828
"astro-pagefind": "^1.8.3",
2929
"astro-preload": "^1.1.2",
30+
"astrojs-service-worker": "^2.0.0",
3031
"clsx": "^2.1.1",
3132
"date-fns": "^4.1.0",
3233
"date-fns-tz": "^3.2.0",
@@ -39,8 +40,8 @@
3940
"rehype-slug": "^6.0.0",
4041
"remark-toc": "^9.0.0",
4142
"sharp": "^0.34.2",
42-
"svelte": "^5.30.2",
43-
"tailwindcss": "^4.1.7",
43+
"svelte": "^5.33.12",
44+
"tailwindcss": "^4.1.8",
4445
"typescript": "^5.8.3"
4546
},
4647
"devDependencies": {

pnpm-lock.yaml

Lines changed: 3607 additions & 618 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/android-chrome-144x144.png

12.9 KB
Loading

public/android-chrome-192x192.png

18 KB
Loading

public/android-chrome-256x256.png

25 KB
Loading

public/android-chrome-36x36.png

2.78 KB
Loading

public/android-chrome-384x384.png

40.2 KB
Loading

public/android-chrome-48x48.png

3.6 KB
Loading

public/android-chrome-512x512.png

56.2 KB
Loading

public/android-chrome-72x72.png

5.58 KB
Loading

public/android-chrome-96x96.png

7.9 KB
Loading

public/manifest.json

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"name": "EuroPython 2025",
3+
"short_name": "EP2025",
4+
"display": "standalone",
5+
"start_url": "./schedule/?utm_source=pwa",
6+
"lang": "en",
7+
"scope": ".",
8+
"background_color": "#f5e5d6",
9+
"theme_color": "#f5e5d6",
10+
"icons": [
11+
{
12+
"src": "android-chrome-36x36.png",
13+
"sizes": "36x36",
14+
"type": "image/png"
15+
},
16+
{
17+
"src": "android-chrome-48x48.png",
18+
"sizes": "48x48",
19+
"type": "image/png"
20+
},
21+
{
22+
"src": "android-chrome-72x72.png",
23+
"sizes": "72x72",
24+
"type": "image/png"
25+
},
26+
{
27+
"src": "android-chrome-96x96.png",
28+
"sizes": "96x96",
29+
"type": "image/png"
30+
},
31+
{
32+
"src": "android-chrome-144x144.png",
33+
"sizes": "144x144",
34+
"type": "image/png"
35+
},
36+
{
37+
"src": "android-chrome-192x192.png",
38+
"sizes": "192x192",
39+
"type": "image/png"
40+
},
41+
{
42+
"src": "android-chrome-256x256.png",
43+
"sizes": "256x256",
44+
"type": "image/png"
45+
},
46+
{
47+
"src": "android-chrome-384x384.png",
48+
"sizes": "384x384",
49+
"type": "image/png"
50+
},
51+
{
52+
"src": "android-chrome-512x512.png",
53+
"sizes": "512x512",
54+
"type": "image/png"
55+
},
56+
{
57+
"src": "maskable_icon.png",
58+
"sizes": "650x650",
59+
"type": "image/png",
60+
"purpose": "maskable"
61+
}
62+
]
63+
}

public/maskable_icon.png

51.6 KB
Loading

src/components/Header.astro

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import HeaderLogo from "@components/header/header-logo.astro";
55
import Search from "@components/Search.astro";
66
77
import links from "@data/links.json";
8+
89
---
910

1011
<section
@@ -47,6 +48,7 @@ import links from "@data/links.json";
4748
<Search />
4849

4950
<script>
51+
document.addEventListener("DOMContentLoaded", () => {
5052
let prevScrollPos = window.pageYOffset;
5153
const navbar = document.getElementById("navbar") as HTMLElement;
5254

@@ -69,4 +71,5 @@ import links from "@data/links.json";
6971
navbar.style.transform = "translateY(-100%)";
7072
}
7173
});
74+
});
7275
</script>

src/components/InstallPWA.astro

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
3+
---
4+
<div id="install-pwa" class="hidden">
5+
<p>Add website to home screen and get easy access to the schedule!</p>
6+
<button id="install-btn" class="button-link 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 text-white
7+
bg-primary hover:bg-primary-hover border-transparent">Add to home screen</button>
8+
</div>
9+
10+
<style>
11+
#install-pwa {
12+
position: fixed;
13+
bottom: 0;
14+
left: 0;
15+
right: 0;
16+
background: #4caf50;
17+
color: white;
18+
text-align: center;
19+
padding: 1rem;
20+
transition: all 0.3s ease;
21+
z-index: 200;
22+
}
23+
24+
#install-pwa.hidden {
25+
transform: translateY(100%);
26+
opacity: 0;
27+
}
28+
</style>
29+
30+
<script>
31+
function showInstallPrompt() {
32+
const installBanner = document.getElementById('install-pwa');
33+
installBanner.classList.remove('hidden');
34+
}
35+
36+
document.getElementById('install-btn').addEventListener('click', () => {
37+
if (deferredPrompt) {
38+
deferredPrompt.prompt();
39+
deferredPrompt.userChoice.then((choiceResult: any) => {
40+
console.log(choiceResult.outcome);
41+
deferredPrompt = null;
42+
});
43+
}
44+
});
45+
46+
let deferredPrompt: any;
47+
48+
window.addEventListener('beforeinstallprompt', (e) => {
49+
e.preventDefault();
50+
deferredPrompt = e;
51+
52+
showInstallPrompt();
53+
});
54+
</script>

src/components/Offline.astro

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
3+
---
4+
5+
<div id="offline-icon" class="offline-icon">
6+
<i class="fas plug-circle-xmark"></i> Offline
7+
</div>
8+
<script is:inline>
9+
document.addEventListener("DOMContentLoaded", () => {
10+
const offlineIcon = document.getElementById("offline-icon");
11+
12+
function updateOnlineStatus() {
13+
console.log("offline");
14+
offlineIcon.classList.toggle("show", !navigator.onLine);
15+
}
16+
17+
window.addEventListener("online", updateOnlineStatus);
18+
window.addEventListener("offline", updateOnlineStatus);
19+
20+
updateOnlineStatus();
21+
});
22+
</script>
23+
24+
<style>
25+
.offline-icon {
26+
position: fixed;
27+
bottom: 10px;
28+
right: 10px;
29+
z-index: 9999;
30+
background: #ffe0e0;
31+
color: #a00;
32+
padding: 8px 12px;
33+
border-radius: 8px;
34+
border: 1px solid #a00;
35+
font-family: sans-serif;
36+
font-size: 14px;
37+
font-weight: bold;
38+
display: flex;
39+
align-items: center;
40+
gap: 6px;
41+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
42+
opacity: 0;
43+
pointer-events: none;
44+
transition: opacity 0.3s ease;
45+
}
46+
47+
.offline-icon.show {
48+
opacity: 1;
49+
pointer-events: auto;
50+
}
51+
</style>

src/components/header/header-logo.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ interface Props {
44
}
55
---
66

7-
<a href="/" class="block min-w-[44px] min-h-[44px]" aria-label="Go to homepage by clicking the logo">
7+
<a href="/" class="home-link block min-w-[44px] min-h-[44px]" aria-label="Go to homepage by clicking the logo">
88
<img class="md:block block w-[44px] h-[44px]" src="/EuroPython2025_logo.png" alt="EuroPython logo" />
99
</a>

0 commit comments

Comments
 (0)