Skip to content

Commit 998c66a

Browse files
Aleksa-delclaude
andauthored
Webinars: keep registration open until the webinar start time (#272)
Webinar dates were date-only, so Hugo treated them as midnight and any rebuild on the webinar day moved it to "Past" and removed Register. - Give every webinar a full start time with UTC offset. - New partial webinars/start.html; date-only values fall back to end of day. - static/js/webinars.js re-checks the start time in the browser, so cards move to Past and Register disappears exactly at start, without a rebuild. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 046ebc2 commit 998c66a

11 files changed

Lines changed: 121 additions & 26 deletions

File tree

‎assets/scss/_webinars.scss‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,3 +310,11 @@ a.webinar-speaker-name {
310310

311311
&:hover { background: rgba($accent, 0.22); }
312312
}
313+
314+
// Toggled by /js/webinars.js when a webinar's start time passes; these
315+
// elements set their own `display`, which would otherwise beat `hidden`.
316+
.webinar-grid[hidden],
317+
.webinar-empty-state[hidden],
318+
.status-chip[hidden] {
319+
display: none;
320+
}

‎content/community/webinars/autopilot-mysql-kubernetes-operator/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Stop Hand-Tuning MySQL: Teaching a Kubernetes Operator to Do It for You"
33
description: "Most MySQL clusters on Kubernetes run near-default configs. Kate Obiidykhata of Percona introduces Autopilot Mode in the Percona Operator for MySQL, which derives a production-grade configuration from each cluster's actual resources and re-tunes it whenever they change."
4-
date: 2026-11-24
4+
date: 2026-11-24T10:00:00-05:00
55
time_display: "10:00 AM ET · 16:00 CET"
66
registration_url: "https://us06web.zoom.us/webinar/register/WN_wsiPvCBvRn6U2nKd6-V5KA"
77
video_url: "https://youtu.be/P0UzxmCwIyk"

‎content/community/webinars/beyond-the-proxy-proxysql-ecosystem/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "Beyond the Proxy: The Expanding ProxySQL Ecosystem"
33
description: "ProxySQL has grown well beyond a proxy. René and Alkin cover MySQL and PostgreSQL support, the expansion toward DuckDB, deeper cloud integration, and where Orchestrator and dbdeployer fit in — tied together through real operational problems instead of a feature list."
4-
date: 2026-11-03
4+
date: 2026-11-03T10:00:00-05:00
55
time_display: "10:00 AM ET · 16:00 CET"
66
registration_url: "https://us06web.zoom.us/webinar/register/WN_X82k7xu-STmLLTln6NjTHw"
77
# Past-event materials: the recording is embedded from YouTube, and the slides

‎content/community/webinars/fastest-database-hammerdb/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "What Is the Fastest Database? Open-Source Benchmarking with HammerDB"
33
description: "Benchmark numbers are easy to produce and hard to trust. Steve Shaw, creator of HammerDB, shows how an open, standard benchmark suite makes database performance results comparable and reproducible — and what's new in HammerDB v6.0."
4-
date: 2026-12-03
4+
date: 2026-12-03T10:00:00-05:00
55
time_display: "10:00 AM ET · 16:00 CET"
66
registration_url: "https://us06web.zoom.us/webinar/register/WN_vxFUnMo2T8W82JYzm9j8fA"
77
images:

‎content/community/webinars/mysql-query-cache/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "What Happened to the MySQL Query Cache?"
33
description: "The MySQL Query Cache was removed because it couldn't scale on modern multicore systems. Marcelo Altmann of Readyset asks whether query caching itself was the mistake, and how a transparent cache can keep reads fast and correct."
4-
date: 2026-11-18
4+
date: 2026-11-18T10:00:00-05:00
55
time_display: "10:00 AM ET · 16:00 CET"
66
registration_url: "https://us06web.zoom.us/webinar/register/WN_UloQfglkSwuzsfgRGFPXwA"
77
# Past-event materials: the recording is embedded from YouTube, and the slides

‎content/community/webinars/mysql-time-travel-row-level-recovery/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: "MySQL Time Travel: Practical Row-Level Recovery With Open Source Tools"
33
description: "A bad UPDATE hit a handful of rows. Do you really need to restore a full backup and replay binlogs? In a mostly live demo, Daniel shows how to see exactly which rows changed, query any table as it looked at a past moment, and generate the exact statements to undo the damage."
4-
date: 2026-10-15
4+
date: 2026-10-15T10:00:00-04:00
55
time_display: "10:00 AM ET · 16:00 CEST"
66
registration_url: "https://us06web.zoom.us/webinar/register/WN_AYk4qjMBTU2ofrY_hkpXvQ"
77
# Past-event materials: the recording is embedded from YouTube, and the slides
Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
11
{{ define "main" }}
2+
{{/* A webinar stays in "Upcoming" (with registration open) until its start
3+
time — see partials/webinars/start.html. The site is static, so
4+
/js/webinars.js repeats the same check in the visitor's browser and
5+
moves a card to "Past" once its start time passes, without waiting for
6+
the next rebuild. */}}
27
{{ $now := now }}
3-
{{ $upcoming := where .Pages "Date" ">=" $now }}
4-
{{ $past := where .Pages "Date" "<" $now }}
5-
{{ $upcoming = $upcoming.ByDate }}
6-
{{ $past = $past.ByDate.Reverse }}
8+
{{ $upcoming := slice }}
9+
{{ $past := slice }}
10+
{{ range .Pages.ByDate }}
11+
{{ $start := partial "webinars/start.html" . }}
12+
{{ if $start.Before $now }}
13+
{{ $past = $past | append . }}
14+
{{ else }}
15+
{{ $upcoming = $upcoming | append . }}
16+
{{ end }}
17+
{{ end }}
18+
{{ $past = $past.Reverse }}
719

820
<div class="about-page">
921

@@ -20,29 +32,24 @@ <h1>{{ .Title }}</h1>
2032

2133
<div class="about-block">
2234
<span class="resources-category-eyebrow">Upcoming</span>
23-
{{ if $upcoming }}
24-
<div class="webinar-grid">
35+
<div class="webinar-grid" data-webinar-grid="upcoming"{{ if not $upcoming }} hidden{{ end }}>
2536
{{ range $upcoming }}{{ partial "webinars/card.html" . }}{{ end }}
2637
</div>
27-
{{ else }}
28-
<div class="webinar-empty-state">
38+
<div class="webinar-empty-state" data-webinar-empty="upcoming"{{ if $upcoming }} hidden{{ end }}>
2939
<p>No upcoming webinars scheduled right now — check back soon, or follow {{ with $.Site.Params.social.slack }}<a href="{{ . }}" target="_blank" rel="noopener">Slack</a>{{ else }}our Slack{{ end }} for announcements.</p>
3040
</div>
31-
{{ end }}
3241
</div>
3342

3443
<div class="about-block">
3544
<span class="resources-category-eyebrow">Past</span>
36-
{{ if $past }}
37-
<div class="webinar-grid">
45+
<div class="webinar-grid" data-webinar-grid="past"{{ if not $past }} hidden{{ end }}>
3846
{{ range $past }}{{ partial "webinars/card.html" . }}{{ end }}
3947
</div>
40-
{{ else }}
41-
<div class="webinar-empty-state">
48+
<div class="webinar-empty-state" data-webinar-empty="past"{{ if $past }} hidden{{ end }}>
4249
<p>No past webinars yet — this is a new series, and recordings will show up here after each session.</p>
4350
</div>
44-
{{ end }}
4551
</div>
4652

4753
</div>
54+
<script src="/js/webinars.js" defer></script>
4855
{{ end }}

‎layouts/community/webinars/single.html‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
it's kept only as the OG/social-share image (see head.html), since a
44
full-width banner reads as too heavy inline. Speaker photos take its
55
place here instead. */}}
6-
{{ $isPast := and (not .Date.IsZero) (.Date.Before now) }}
6+
{{/* Registration stays open until the start time (partials/webinars/start.html).
7+
/js/webinars.js re-checks it in the browser, since the page is static. */}}
8+
{{ $start := partial "webinars/start.html" . }}
9+
{{ $isPast := and (not .Date.IsZero) ($start.Before now) }}
710

811
{{ $primaryLabel := "" }}
912
{{ $primaryURL := "" }}
@@ -21,7 +24,7 @@
2124
{{ $primaryURL = .Params.registration_url }}
2225
{{ end }}
2326

24-
<article class="webinar-single about-page">
27+
<article class="webinar-single about-page"{{ if not .Date.IsZero }} data-webinar-start="{{ $start.Unix }}"{{ end }}>
2528

2629
<nav class="resources-breadcrumb" aria-label="Breadcrumb">
2730
<a href="/community/">Community</a>
@@ -34,7 +37,7 @@
3437
<header class="webinar-header">
3538
<div class="webinar-meta-row">
3639
<span class="webinar-meta-badge">Webinar</span>
37-
{{ if $isPast }}<span class="status-chip">Past event</span>{{ end }}
40+
<span class="status-chip" data-webinar-past-only{{ if not $isPast }} hidden{{ end }}>Past event</span>
3841
<span class="webinar-meta-date">{{ .Date.Format "January 2, 2006" }}{{ with .Params.time_display }} · {{ . }}{{ end }}</span>
3942
</div>
4043

@@ -67,7 +70,7 @@ <h1>{{ .Title }}</h1>
6770
{{ end }}
6871

6972
<div class="about-cta-row">
70-
{{ with $primaryURL }}<a href="{{ . }}" class="about-btn about-btn--primary"{{ if not (hasPrefix . "#") }} target="_blank" rel="noopener"{{ end }}>{{ $primaryLabel }}</a>{{ end }}
73+
{{ with $primaryURL }}<a href="{{ . }}" class="about-btn about-btn--primary"{{ if eq $primaryLabel "Register" }} data-webinar-register{{ end }}{{ if not (hasPrefix . "#") }} target="_blank" rel="noopener"{{ end }}>{{ $primaryLabel }}</a>{{ end }}
7174
{{ if $slides }}<a href="#slides" class="about-btn about-btn--secondary">View slides</a>{{ end }}
7275
</div>
7376
</header>
@@ -159,4 +162,5 @@ <h2 id="slides-title" class="webinar-media-title">Slides</h2>
159162
</footer>
160163

161164
</article>
165+
<script src="/js/webinars.js" defer></script>
162166
{{ end }}

‎layouts/partials/webinars/card.html‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22
Webinars list page. Every future webinar page renders through this
33
same partial, so the grid stays consistent as more get added. */}}
44
{{ $page := . }}
5-
{{ $isPast := and (not .Date.IsZero) (.Date.Before now) }}
5+
{{ $start := partial "webinars/start.html" . }}
6+
{{ $isPast := and (not .Date.IsZero) ($start.Before now) }}
67
{{ $imgRes := "" }}
78
{{ with .Params.images }}
89
{{ $imgFile := index . 0 }}
910
{{ $imgRes = $page.Resources.Get $imgFile }}
1011
{{ end }}
1112

12-
<a href="{{ .RelPermalink }}" class="webinar-card">
13+
<a href="{{ .RelPermalink }}" class="webinar-card"{{ if not .Date.IsZero }} data-webinar-start="{{ $start.Unix }}"{{ end }}>
1314
{{ with $imgRes }}
1415
{{ $thumb := .Fill "480x252 jpg q80" }}
1516
<div class="webinar-card-image-wrap">
1617
<img src="{{ $thumb.RelPermalink }}" alt="" class="webinar-card-image" loading="lazy" width="{{ $thumb.Width }}" height="{{ $thumb.Height }}">
17-
{{ if $isPast }}<span class="status-chip webinar-card-status">Past</span>{{ end }}
18+
<span class="status-chip webinar-card-status" data-webinar-past-only{{ if not $isPast }} hidden{{ end }}>Past</span>
1819
</div>
1920
{{ end }}
2021
<div class="webinar-card-body">
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{{/* Returns the moment a webinar starts; registration closes at this moment.
2+
3+
Webinar front matter should carry the full start time with its UTC
4+
offset, e.g. `date: 2026-12-03T10:00:00-05:00` for 10:00 AM ET.
5+
6+
Safety net: a bare date (`date: 2026-12-03`) parses as midnight, which
7+
would close registration at the very start of the webinar day. Treat
8+
such a date as running until the end of that day instead, so a
9+
forgotten time never hides the Register button early. */}}
10+
{{ $start := .Date }}
11+
{{ if and (not $start.IsZero) (eq ($start.Format "15:04:05") "00:00:00") }}
12+
{{ $start = $start.Add (time.ParseDuration "23h59m59s") }}
13+
{{ end }}
14+
{{ return $start }}

0 commit comments

Comments
 (0)