Skip to content

Commit 083b16c

Browse files
committed
feat: deadline passed
1 parent a508fed commit 083b16c

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

static/js/lazy-load.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@
6868
} else {
6969
// Prepare for lazy loading
7070
conf.classList.add('lazy-load');
71-
conf.style.minHeight = '150px'; // Maintain layout
7271
conf.setAttribute('data-lazy-index', index);
7372

7473
// Create placeholder content
@@ -120,6 +119,9 @@
120119
element.classList.remove('lazy-load');
121120
element.classList.add('lazy-loaded');
122121

122+
// Remove the min-height that was set for lazy loading
123+
element.style.minHeight = '';
124+
123125
// Fade in
124126
requestAnimationFrame(() => {
125127
element.style.transition = 'opacity 0.3s ease-in-out';
@@ -159,12 +161,20 @@
159161
// Initialize countdown timers with the stored date
160162
if (timer) {
161163
$(timer).countdown(conf.cfpDate, function(event) {
162-
$(this).html(event.strftime('%D days %Hh %Mm %Ss'));
164+
if (event.elapsed) {
165+
$(this).html('Deadline passed');
166+
} else {
167+
$(this).html(event.strftime('%D days %Hh %Mm %Ss'));
168+
}
163169
});
164170
}
165171
if (timerSmall) {
166172
$(timerSmall).countdown(conf.cfpDate, function(event) {
167-
$(this).html(event.strftime('%Dd %H:%M:%S'));
173+
if (event.elapsed) {
174+
$(this).html('Passed');
175+
} else {
176+
$(this).html(event.strftime('%Dd %H:%M:%S'));
177+
}
168178
});
169179
}
170180
}
@@ -270,7 +280,6 @@
270280
style.textContent = `
271281
.ConfItem.lazy-load {
272282
position: relative;
273-
min-height: 150px;
274283
}
275284
276285
.lazy-placeholder {

0 commit comments

Comments
 (0)