Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
61 changes: 61 additions & 0 deletions PyBay/assets/js/countdown-timer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// assets/js/countdown-timer.js

class CountdownTimer extends HTMLElement {
constructor() {
super();
}

connectedCallback() {
const dateAttr = this.getAttribute('date');
this.targetDate = dateAttr ? new Date(dateAttr) : null;

this.innerHTML = `
<div class="countdown">
<div class="unit"><div class="number" id="days">--</div><div class="label">Days</div></div>
<div class="unit"><div class="number" id="hours">--</div><div class="label">Hours</div></div>
<div class="unit"><div class="number" id="minutes">--</div><div class="label">Minutes</div></div>
<div class="unit"><div class="number" id="seconds">--</div><div class="label">Seconds</div></div>
</div>
`;

if (!this.targetDate || isNaN(this.targetDate)) {
this.querySelector('.countdown').innerHTML = "<h3>⚠️ Invalid date</h3>";
return;
}

this.updateTimer();
this.timer = setInterval(() => this.updateTimer(), 1000);
}

disconnectedCallback() {
clearInterval(this.timer);
}

updateTimer() {
const now = new Date().getTime();
const diff = this.targetDate.getTime() - now;

if (diff <= 0) {
this.querySelector('.countdown').innerHTML = `<h1>🎉 It's here!</h1>`;
clearInterval(this.timer);
return;
}

const sec = 1000, min = sec * 60, hr = min * 60, day = hr * 24;
const days = Math.floor(diff / day),
hours = Math.floor((diff % day) / hr),
minutes = Math.floor((diff % hr) / min),
seconds = Math.floor((diff % min) / sec);

this.querySelector("#days").innerText = days;
this.querySelector("#hours").innerText = hours.toString().padStart(2, '0');
this.querySelector("#minutes").innerText = minutes.toString().padStart(2, '0');
this.querySelector("#seconds").innerText = seconds.toString().padStart(2, '0');
}
}

customElements.define('countdown-timer', CountdownTimer);


// Optional: export for test or bundling purposes
export default CountdownTimer;
17 changes: 13 additions & 4 deletions PyBay/content/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@ height: 300
contents:
----
center_image:
#### countdown-timer ####
countdown_date: 2025-06-30 23:59:59
----
countdown_text: Early Bird Tickets On Sale Now Through
#### text-block ####
text:

# PyBay
# is
# 18 October 2025 in San Francisco, CA


<br>


<br>

Expand Down Expand Up @@ -67,8 +73,8 @@ text:
</div>
<div class="card-body">
<b>speaking</b>
<p class="card-text">Call for Proposals!</p>
<a href="https://sessionize.com/pybay2025" class="btn btn-primary">Submit!</a>
<p class="card-text">Every year we have top speakers.</p>
<a href="./speaking/current-speakers" class="btn btn-primary">Check out our speakers!</a>
</div>
</div>
</div>
Expand All @@ -77,4 +83,7 @@ class: default
---
_slug:
---
short: Home
short:

Home

13 changes: 13 additions & 0 deletions PyBay/content/speaking/current-speakers/contents.lr
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ title: 2025 Speakers
body:

Speakers List will be published in late June 2025.
In the meantime - checkout <a href="../past-speakers">last years speakers</a> and watch <a href="https://pyvideo.org/events/pybay-2024.html">last year's talks.<a>

Then go ahead and get your early bird tickets!

<div class="text-center">

<h4>Early Bird Tickets On Sale Through June 30, 2025 Midnight PST</h2>
<countdown-timer date="2025-06-30T00:00:00-08:00"></countdown-timer>

<br>
<a class="btn btn-secondary btn-lg" target="_blank" href="https://pretix.eu/bapya/pybay-2025/">Buy Tickets!</a>
</div>

<!-- <script type="text/javascript" src="https://sessionize.com/api/v2/3jihguik/view/SpeakerWall"></script>-->
---
short: Current Speakers
11 changes: 11 additions & 0 deletions PyBay/flowblocks/countdown-timer.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[block]
name = Countdown Block
button_label = [[clock]]

[fields.countdown_date]
label = Countdown To Date
type = datetime

[fields.countdown_text]
label = Countdown text
type = string
3 changes: 2 additions & 1 deletion PyBay/models/poster.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = Poster
label = {{ this.title }}


[fields.title]
label = Title
type = string
Expand All @@ -14,4 +15,4 @@ type = string
[fields.body]
label = Body
type = flow
flow_blocks = text-block, banner, video-banner, photo-gallery
flow_blocks = text-block, banner, video-banner, photo-gallery, countdown-timer
1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/envinfo

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/flat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/import-local-fixture

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/node-which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/resolve

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/terser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/update-browserslist-db

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/webpack

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions PyBay/node_modules/.bin/webpack-cli

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading