Skip to content

Commit 258cc05

Browse files
committed
some more improvements
1 parent 5a4b546 commit 258cc05

9 files changed

Lines changed: 54 additions & 44 deletions

File tree

‎astro.config.mjs‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,15 @@ export default defineConfig({
1414
build: {
1515
format: "directory",
1616
},
17-
integrations: [mdx(), sitemap(), deleteUnusedImages(), compress()],
17+
integrations: [
18+
mdx(),
19+
sitemap(),
20+
deleteUnusedImages(),
21+
compress({
22+
// csso is disabled because it breaks some new tailwind features
23+
CSS: { csso: false, lightningcss: {} },
24+
}),
25+
],
1826
vite: {
1927
plugins: [tailwindcss()],
2028
},

‎src/components/CtaButton.astro‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ interface Props {
33
href: string;
44
variant?: "solid" | "outline";
55
class?: string;
6+
id?: string;
67
}
78
8-
const { href, variant = "solid", class: cls } = Astro.props;
9+
const { href, variant = "solid", class: cls, id } = Astro.props;
910
const external = href.startsWith("http");
1011
---
1112

1213
<a
14+
id={id}
1315
href={href}
1416
target={external ? "_blank" : undefined}
1517
rel={external ? "noopener noreferrer" : undefined}

‎src/components/Header.astro‎

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { getImage } from "astro:assets";
33
import Logo from "@components/Logo.astro";
44
import cityBg from "@assets/city.png";
55
6-
const optimizedCityBg = await getImage({ src: cityBg, format: "avif", width: 1200 });
6+
const optimizedCityBg = await getImage({
7+
src: cityBg,
8+
format: "avif",
9+
width: 1200,
10+
});
711
812
const menuItems = [
913
{ href: "/#about", label: "About 🍕" },
@@ -24,7 +28,6 @@ const menuItems = [
2428
<div class="glass-pill relative z-40 mx-auto flex w-fit max-w-full items-center gap-3 lg:gap-4 py-3 pl-4 pr-4">
2529
<Logo class="shrink-0 size-14" />
2630

27-
<!-- Hamburger button (mobile/tablet) -->
2831
<button
2932
id="menu-toggle"
3033
type="button"
@@ -39,7 +42,6 @@ const menuItems = [
3942
</span>
4043
</button>
4144

42-
<!-- Desktop nav -->
4345
<nav class="hidden lg:flex items-center gap-1">
4446
{menuItems.map(({ href, label }) => (
4547
<a href={href} class="nav-link text-center whitespace-nowrap">
@@ -49,14 +51,12 @@ const menuItems = [
4951
</nav>
5052
</div>
5153

52-
<!-- Mobile menu overlay -->
5354
<nav
5455
id="mobile-menu"
5556
aria-hidden="true"
5657
class="lg:hidden fixed inset-0 z-30 flex flex-col items-center justify-start overflow-y-auto px-8 pt-28 pb-10 text-white opacity-0 pointer-events-none -translate-y-2 transition-[opacity,transform] duration-200 ease-in-out bg-center bg-cover"
5758
style={`background-image: url(${optimizedCityBg.src})`}
5859
>
59-
<!-- Overlay tint -->
6060
<div class="absolute inset-0 bg-primary opacity-80 pointer-events-none"></div>
6161

6262
<div class="relative z-10 mb-8">
@@ -79,7 +79,6 @@ const menuItems = [
7979
</header>
8080

8181
<style>
82-
/* Hamburger → X, driven purely by the button's aria-expanded state */
8382
#menu-toggle[aria-expanded="true"] #menu-icon {
8483
background-color: transparent;
8584
}
@@ -118,12 +117,10 @@ const menuItems = [
118117
if (e.key === "Escape" && open) setOpen(false);
119118
});
120119

121-
// Close on nav link click
122120
menu.querySelectorAll(".mobile-nav-link").forEach((link) => {
123121
link.addEventListener("click", () => setOpen(false));
124122
});
125123

126-
// Close when viewport goes desktop
127124
const mq = window.matchMedia("(min-width: 64rem)");
128125
mq.addEventListener("change", (e) => { if (e.matches) setOpen(false); });
129126
</script>

‎src/data/site.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const ticketsUrl = "https://pretix.eu/europython/warsaw-python-pizza/";
22

3-
// ponytail: singleton config — no collection needed
43
export const site = {
54
pageTitle: "Warsaw Python Pizza",
65
socialDescription: "Warsaw Python Pizza, join us in Warsaw on May 9, 2026",
@@ -9,8 +8,8 @@ export const site = {
98
whenDatetime: "2026/05/09 10:00 AM UTC+2",
109
whenFormat: "do MMMM y",
1110
ticketsUrl,
12-
// Whatever's most important right now (tickets, CFP, sold out) — change this one line.
13-
cta: { label: "Buy tickets 🎫", href: ticketsUrl },
1411
contactEmail: "warsawpythonpizza@gmail.com",
1512
socialImageUrl: "https://warsaw.python.pizza/social-image.jpg",
13+
// whatever is most important right now
14+
cta: { label: "Buy tickets 🎫", href: ticketsUrl },
1615
};

‎src/pages/compact-agenda.astro‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const speakerNames = (e: (typeof events)[number]) =>
1818
description="Compact day-of agenda for Warsaw Python Pizza on May 9, 2026."
1919
>
2020
<div id="page" class="min-h-screen">
21-
<!-- Sticky header -->
2221
<header class="sticky top-0 z-10 grid grid-cols-[2.5rem_1fr_2.5rem] items-center gap-2 border-b backdrop-blur-md px-4 md:px-8 py-3">
2322
<h1 class="m-0 font-mono text-lg md:text-2xl leading-tight text-center col-start-2">
2423
Agenda for Warsaw Python Pizza, May 9 2026
@@ -29,14 +28,11 @@ const speakerNames = (e: (typeof events)[number]) =>
2928
aria-label="Switch to dark mode"
3029
class="inline-flex items-center justify-center w-10 h-10 p-0 border border-primary rounded-full text-primary cursor-pointer col-start-3"
3130
>
32-
<!-- sun icon (shown in dark mode) -->
3331
<img id="icon-sun" src="/icons/theme-sun.svg" alt="" aria-hidden="true" width="18" height="18" />
34-
<!-- moon icon (shown in light mode) -->
3532
<img id="icon-moon" src="/icons/theme-moon.svg" alt="" aria-hidden="true" width="18" height="18" />
3633
</button>
3734
</header>
3835

39-
<!-- Agenda list -->
4036
<div class="max-w-4xl mx-auto px-4 md:px-8 pt-5 pb-24">
4137
<ol id="agenda-list" class="list-none grid gap-2 m-0 p-0">
4238
{events.map((event, i) => {
@@ -72,7 +68,6 @@ const speakerNames = (e: (typeof events)[number]) =>
7268
</ol>
7369
</div>
7470

75-
<!-- Back to home button -->
7671
<a
7772
id="home-button"
7873
href="/"
@@ -176,7 +171,6 @@ const speakerNames = (e: (typeof events)[number]) =>
176171
const toggleBtn = document.getElementById("theme-toggle")!;
177172
const STORAGE_KEY = "compact-agenda-color-mode";
178173

179-
// --- Dark mode ---
180174
type Mode = "light" | "dark";
181175

182176
function getInitialMode(): Mode {
@@ -200,8 +194,6 @@ const speakerNames = (e: (typeof events)[number]) =>
200194
applyMode(mode);
201195
});
202196

203-
// --- Time highlighting ---
204-
205197
// Parse highlightTime param once; fall back to real clock per tick
206198
const fixedTime: number | null = (() => {
207199
const param = new URLSearchParams(window.location.search).get("highlightTime");
@@ -251,7 +243,6 @@ const speakerNames = (e: (typeof events)[number]) =>
251243
}
252244
});
253245

254-
// Auto-scroll once
255246
if (!window.__agendaScrolled) {
256247
const idx = currentIdx ?? nextIdx;
257248
if (idx !== null) {
@@ -263,7 +254,6 @@ const speakerNames = (e: (typeof events)[number]) =>
263254
}
264255
}
265256

266-
// Declare global on window for the scroll flag
267257
declare global {
268258
interface Window { __agendaScrolled?: boolean; }
269259
}

‎src/pages/index.astro‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,9 @@ const eventDate = format(new Date(site.whenDatetime), "yyyy-MM-dd");
6868

6969
<Header />
7070
<CtaButton
71+
id="floating-cta"
7172
href={site.cta.href}
72-
class="fixed right-4 bottom-4 md:right-8 md:bottom-8 z-20 min-w-40 md:min-w-44 shadow-lg"
73+
class="cta-hidden fixed right-4 bottom-4 md:right-8 md:bottom-8 z-20 min-w-40 md:min-w-44 shadow-lg"
7374
>
7475
{site.cta.label}
7576
</CtaButton>
@@ -90,4 +91,18 @@ const eventDate = format(new Date(site.whenDatetime), "yyyy-MM-dd");
9091
</Section>
9192
</main>
9293
<Footer />
94+
95+
<script>
96+
// floating cta button appears when the hero cta button is scrolled out of view
97+
const heroCta = document.getElementById("hero-cta");
98+
const floatingCta = document.getElementById("floating-cta");
99+
100+
if (heroCta && floatingCta) {
101+
const observer = new IntersectionObserver(
102+
([entry]) => floatingCta.classList.toggle("cta-hidden", entry.isIntersecting),
103+
{ threshold: 0.4 },
104+
);
105+
observer.observe(heroCta);
106+
}
107+
</script>
93108
</Base>

‎src/sections/Hero.astro‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,17 @@ import { site } from "@data/site";
77
import cityBg from "@assets/city.png";
88
99
const dateStr = format(new Date(site.whenDatetime), site.whenFormat);
10-
const optimizedCityBg = await getImage({ src: cityBg, format: "avif", width: 1920 });
10+
const optimizedCityBg = await getImage({
11+
src: cityBg,
12+
format: "avif",
13+
width: 1920,
14+
});
1115
---
1216

1317
<section
1418
class="relative flex flex-col items-center justify-center bg-center bg-cover min-h-screen pt-28 md:pt-40"
1519
style={`background-image: url(${optimizedCityBg.src})`}
1620
>
17-
<!-- Red overlay -->
1821
<div class="hero-overlay absolute inset-0 bg-primary"></div>
1922

2023
<div class="relative z-10 m-auto p-8 text-center">
@@ -23,7 +26,12 @@ const optimizedCityBg = await getImage({ src: cityBg, format: "avif", width: 192
2326
</h1>
2427
<p class="hero-subtext md:text-[2.2rem]">{site.subHeading}</p>
2528
<p class="hero-subtext md:text-[2.2rem]">{dateStr}</p>
26-
<CtaButton href={site.cta.href} variant="outline" class="mt-12 px-10 py-4 text-lg md:text-xl">
29+
<CtaButton
30+
id="hero-cta"
31+
href={site.cta.href}
32+
variant="outline"
33+
class="mt-12 px-10 py-4 text-lg md:text-xl"
34+
>
2735
{site.cta.label}
2836
</CtaButton>
2937
</div>

‎src/sections/Organizers.astro‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ const organizers = (await getCollection("organizers")).sort(
1919
<p>By the community for the community.</p>
2020
</Prose>
2121

22-
<div class="grid grid-cols-2 sm:grid-cols-3 place-items-center gap-x-4 gap-y-10 md:flex md:flex-wrap md:justify-center md:gap-16 mt-12">
22+
<div class="grid grid-cols-2 place-items-center gap-x-4 gap-y-10 sm:flex sm:flex-wrap sm:justify-center sm:gap-16 mt-12">
2323
{organizers.map((org) => (
2424
<div class="flex flex-col items-center gap-3">
2525
<Image
2626
src={org.data.image}
2727
alt={org.data.name}
2828
width={400}
2929
format="avif"
30-
class="w-28 h-28 md:w-44 md:h-44 rounded-full object-cover avatar-shadow"
30+
class="w-28 h-28 sm:w-44 sm:h-44 rounded-full object-cover avatar-shadow"
3131
/>
3232
<h3 class="m-0 flex items-center justify-center gap-1 flex-wrap text-base font-medium leading-snug">
3333
<span>{org.data.name}</span>

‎src/styles/global.css‎

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
font-weight: 300;
4747
}
4848

49-
/* ponytail: in @layer base so Tailwind utility classes (text-primary, text-white, etc.) properly override on <a> elements */
5049
a {
5150
color: inherit;
5251
text-decoration: none;
@@ -69,17 +68,14 @@
6968
}
7069

7170
@layer components {
72-
/* Narrow content column used by most sections and legal pages */
7371
.section-sm {
7472
@apply max-w-3xl mx-auto px-8 py-8 md:py-12;
7573
}
7674

77-
/* Wide content column for sponsor grids etc. */
7875
.section-lg {
7976
@apply max-w-240 mx-auto px-8 py-8 md:py-12;
8077
}
8178

82-
/* Prose body: MDX/markdown content areas */
8379
.prose-content {
8480
@apply text-lg md:text-xl leading-normal;
8581
}
@@ -119,7 +115,6 @@
119115
margin-bottom: 1rem;
120116
}
121117

122-
/* Prose MDX structural primitives */
123118
.prose-section {
124119
@apply border-t border-primary py-6;
125120
}
@@ -135,33 +130,27 @@
135130
@apply font-mono text-primary text-4xl font-medium leading-tight text-center my-8;
136131
}
137132

138-
/* Hero section subtitle / date line */
139133
.hero-subtext {
140134
@apply text-white text-xl font-mono font-medium text-center m-0 leading-snug;
141135
}
142136

143-
/* Speaker/organizer avatar photo shadow */
144137
.avatar-shadow {
145138
@apply shadow-[2px_8px_32px_-8px_#ed4337];
146139
}
147140

148-
/* Small inline icon link (social profile icons, speaker links) */
149141
.social-link {
150142
@apply inline-flex items-center leading-none;
151143
}
152144
.social-link img {
153145
filter: brightness(0);
154146
}
155147

156-
/* Desktop nav link inside the floating pill: soft highlight on hover */
157148
.nav-link {
158149
@apply rounded-full px-4 py-2 text-lg text-white/90 transition-colors duration-100 hover:bg-white/15 hover:text-white;
159150
}
160151

161-
/* Floating glass navbar pill */
162152
.glass-pill {
163153
@apply rounded-full border border-white/20 bg-[#2a1614]/60 text-white shadow-lg backdrop-blur-md;
164-
/* promote to its own compositor layer so the scroll-linked scale below stays smooth */
165154
will-change: transform;
166155
}
167156
@supports (animation-timeline: scroll()) {
@@ -178,12 +167,10 @@
178167
}
179168
}
180169

181-
/* Lift affordance for pill/CTA buttons */
182170
.btn-lift {
183-
@apply hover:-translate-y-0.5 transition-transform;
171+
@apply hover:-translate-y-0.5 transition-transform duration-300;
184172
}
185173

186-
/* Generalized CTA pill button */
187174
.btn {
188175
@apply inline-flex items-center justify-center gap-2 rounded-full px-6 py-3 font-mono font-medium text-sm md:text-base text-center transition-all duration-300 hover:-translate-y-0.5;
189176
}
@@ -194,7 +181,11 @@
194181
@apply border-2 border-white bg-white/15 text-white backdrop-blur-sm hover:bg-white hover:text-primary;
195182
}
196183

197-
/* Diagonal striped animated background for the schedule's info/label cards */
184+
.cta-hidden {
185+
opacity: 0;
186+
pointer-events: none;
187+
}
188+
198189
.stripe-badge {
199190
background-image: linear-gradient(
200191
45deg,

0 commit comments

Comments
 (0)