diff --git a/_includes/calendar.js b/_includes/calendar.js index b9830a60b09..628400c3839 100644 --- a/_includes/calendar.js +++ b/_includes/calendar.js @@ -38,7 +38,7 @@ content += '
' + '
' + - '' + e.events[i].name + '' + + '' + e.events[i].name + '' + '
' + '
' + location_html + @@ -162,9 +162,10 @@ function update_filtering(data) { calendar_data['dataSource'] = conf_list; // need to update only this calendar = new Calendar("#calendar-page", calendar_data); - if (subs.length == 0) { - window.history.pushState('', '', page_url); - } else { - window.history.pushState('', '', page_url + '/?sub=' + data.subs.join()); - } -} \ No newline at end of file + if (data.subs.length === 0 || data.subs[0] === 'all') { + window.history.pushState('', '', page_url); + } else { + // Join the selected values into a query parameter + window.history.pushState('', '', page_url + '?sub=' + data.subs.join()); + } +} diff --git a/_includes/utils.js b/_includes/utils.js index 293261ca569..6598d66348c 100644 --- a/_includes/utils.js +++ b/_includes/utils.js @@ -1,21 +1,21 @@ function update_filtering(data) { - var page_url = window.location.pathname; - store.set("{{site.domain}}-subs", data.subs); + var page_url = window.location.pathname; + store.set('{{site.domain}}-subs', data.subs); - $(".confItem").hide(); - for (const j in data.all_subs) { - const s = data.all_subs[j]; - const identifier = "." + s + "-conf"; - if (data.subs.includes(s)) { - $(identifier).show(); - } - } + $('.confItem').hide(); - if (subs.length == 0) { - window.history.pushState("", "", page_url); - } else { - window.history.pushState("", "", page_url + "?sub=" + data.subs.join()); - } + // Loop through selected values in data.subs + for (const s of data.subs) { + // Show elements with class .s-conf (where s is the selected value) + $('.' + s + '-conf').show(); + } + + if (data.subs.length === 0 || data.subs[0] === 'all') { + window.history.pushState('', '', page_url); + } else { + // Join the selected values into a query parameter + window.history.pushState('', '', page_url + '?sub=' + data.subs.join()); + } } function createCalendarFromObject(data) { diff --git a/index.html b/index.html index 079964d8ef4..8ab4de2a64c 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@

- {{ site.title }} + {{ site.title }}

@@ -22,7 +22,7 @@


-
This community tool serves as a central repository for deadlines of calls for participitation, proposals, workshops, and tutorials at Python conferences. +
This community tool serves as a central repository for deadlines of calls for participitation, proposals, workshops, and tutorials at Python conferences. The dates are made available as countdowns, in local timezones and even as a Google calendar below!
Deadlines are shown in your local time. To view them in conference website timezones, click on the conference.
@@ -137,7 +137,7 @@

- +
@@ -175,20 +175,20 @@

Visit the Archive

var DateTime = luxon.DateTime; var today = DateTime.now(); - + // Make sure this is >= no. of subs // Currently not used var colors = ['#341f97', '#ee5253', '#2e86de', '#ff9f43', '#10ac84', '#222f3e'] - + {% include load_data.js %} {% include utils.js %} {% include multiselect_handler.js %} // Set time zone to local timezone on web copy $('.local-timezone').text(today.toFormat('z')); - + {% for conf in site.data.conferences %} {% assign subs = conf.sub | split: "," %} {% for sub in subs %} @@ -199,7 +199,7 @@

Visit the Archive

$('#{{conf.title | slugify}}-{{conf.year}} .deadline-time').html("TBA"); $('#{{conf.title | slugify}}-{{conf.year}}').attr("cfpDiff", -Infinity); {% else %} - + // Use specified timezone for deadlines if available else use AoE timezone {% if conf.timezone %} var cfpDate = DateTime.fromSQL("{{conf.cfp}}", {zone: "{{conf.timezone}}"}); @@ -257,7 +257,7 @@

Visit the Archive

$('#{{conf.title | slugify}}-{{conf.year}} .timer-small').replaceWith($('#{{conf.title | slugify}}-{{conf.year}} .deadline')); $('#{{conf.title | slugify}}-{{conf.year}} .calendar').remove(); } - + if (confDiff > 0) { $('#{{conf.title | slugify}}-{{conf.year}}').addClass('pastconf'); $('#{{conf.title | slugify}}-{{conf.year}}').appendTo($("#past_confs"));