Skip to content

Commit 434fcea

Browse files
committed
refactor: migrate conference detail pages to countdown-simple.js
- Replace jQuery countdown with modern countdown-simple.js on conference pages - Update conference.html to use data attributes instead of inline JavaScript - Add conference-specific format to countdown-simple.js (X days Yh Zm Ws) - Remove jquery.countdown.min.js dependency (5KB saved) - Delete unused summary.html layout (no pages use it) Benefits: - Single efficient timer instead of multiple jQuery instances - Consistent countdown implementation across entire site - Better mobile battery performance - Simpler maintenance with one countdown codebase
1 parent 4b98801 commit 434fcea

File tree

5 files changed

+10
-417
lines changed

5 files changed

+10
-417
lines changed

_includes/head.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
<script type="text/javascript" src="{{ "/static/js/jquery.min.js" | prepend:site.baseurl_root }}"></script>
6565
<script type="text/javascript" src="{{ "/static/js/popper.min.js" | prepend:site.baseurl_root }}"></script>
6666
<script type="text/javascript" src="{{ "/static/js/bootstrap.min.js" | prepend:site.baseurl_root }}"></script>
67-
<script type="text/javascript" src="{{ "/static/js/jquery.countdown.min.js" | prepend:site.baseurl_root }}"></script>
6867
<script type="text/javascript" src="{{ "/static/js/luxon.js" | prepend:site.baseurl_root }}"></script>
6968
<script type="text/javascript" src="{{ "/static/js/countdown-simple.js" | prepend:site.baseurl_root }}?t={{site.time | date: '%s'}}"></script>
7069
<script type="text/javascript" src="{{ "/static/js/store.min.js" | prepend:site.baseurl_root }}"></script>

_layouts/conference.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,10 @@ <h3 id="conf-subtitle">a.k.a. {{page.alt_name}} {{page.year}}</h3>
9292
</div>
9393
<div id="page-content">
9494
<div id="conf-deadline-timer" class="row">
95-
<div id="cfp-timer" class="col-12 conf-timer">{% if cfp == "TBA" or cfp == "Cancelled" or cfp == "None" %}{{cfp}}{%endif%}
95+
<div id="cfp-timer" class="col-12 conf-timer countdown-display"
96+
data-deadline="{{ page.cfp_ext | default: page.cfp }}"
97+
data-timezone="{{ page.timezone | default: 'UTC-12' }}">
98+
{% if cfp == "TBA" or cfp == "Cancelled" or cfp == "None" %}{{cfp}}{%endif%}
9699
</div>
97100
</div>
98101
<div id="conf-key-facts" class="row">
@@ -243,7 +246,7 @@ <h3 id="conf-subtitle">a.k.a. {{page.alt_name}} {{page.year}}</h3>
243246

244247
// other
245248
{% if cfp == "TBA" or cfp == "Cancelled" or cfp == "None" %}
246-
$('#cfp-timer').html("{{cfp}}");
249+
// Countdown display handled by data attributes now
247250
$('.deadline-time').html("{{cfp}}");
248251
$('.deadline-local-time').html("{{cfp}}");
249252
{% else %}
@@ -290,10 +293,7 @@ <h3 id="conf-subtitle">a.k.a. {{page.alt_name}} {{page.year}}</h3>
290293
calendarContainer.appendChild(conferenceCalendar);
291294
}
292295

293-
// render countdown timer
294-
$('#cfp-timer').countdown(confDeadline.toJSDate(), function (event) {
295-
$(this).html(event.strftime('%D {% t times.normal.days %} %H{% t times.short.hours %} %M{% t times.short.minutes %} %S{% t times.short.seconds %}'));
296-
});
296+
// Countdown timer is now handled by countdown-simple.js automatically
297297

298298
// render deadline conference time
299299
{% if page.timezone %}

0 commit comments

Comments
 (0)