From 9dfb7c0fcbd6668f3a189fb50d3caaed7ed26939 Mon Sep 17 00:00:00 2001 From: Jesper Dramsch Date: Mon, 8 Jan 2024 00:34:34 +0100 Subject: [PATCH] Add extensions --- _data/conferences.yml | 1 + _includes/calendar.js | 13 +++++++++---- _layouts/calendar.ics | 6 +++--- _layouts/conference.html | 16 +++++++++++----- _pages/archive.html | 13 ++++++++++--- feed.xml | 6 +++++- index.html | 11 ++++++++--- 7 files changed, 47 insertions(+), 19 deletions(-) diff --git a/_data/conferences.yml b/_data/conferences.yml index 0c70fa8cba2..f2c8e66191d 100644 --- a/_data/conferences.yml +++ b/_data/conferences.yml @@ -138,6 +138,7 @@ link: https://pycon.de/ cfp_link: https://pretalx.com/pyconde-pydata-2024/cfp cfp: '2023-12-22 23:59:59' + cfp_extensions: '2024-01-07 23:59:59' timezone: Europe/Berlin place: Berlin, Germany date: April 22 - 24, 2024 diff --git a/_includes/calendar.js b/_includes/calendar.js index 548c269dd83..e0da1cf0a7f 100644 --- a/_includes/calendar.js +++ b/_includes/calendar.js @@ -82,6 +82,11 @@ function load_conference_list() { // Gather data var conf_list_all = []; {% for conf in site.data.conferences + site.data.archive %} + {% if conf.cfp_extension %} + var cfp_string = "{{conf.cfp_extension}}"; + {% else %} + var cfp_string = "{{conf.cfp}}"; + {% endif %} // add deadlines in red conf_list_all.push({ id: "{{conf.title | slugify}}-{{conf.year}}-deadline", @@ -91,8 +96,8 @@ function load_conference_list() { location: "{{conf.place}}", date: "{{conf.date}}", subject: "{{conf.sub}}", - startDate: Date.parse("{{conf.cfp}}"), - endDate: Date.parse("{{conf.cfp}}"), + startDate: Date.parse(cfp_string), + endDate: Date.parse(cfp_string), }); {% if conf.workshop_deadline %} conf_list_all.push({ @@ -116,8 +121,8 @@ function load_conference_list() { location: "{{conf.place}}", date: "{{conf.date}}", subject: "{{conf.sub}}", - startDate: Date.parse("{{conf.cfp}}"), - endDate: Date.parse("{{conf.cfp}}"), + startDate: Date.parse(cfp_string), + endDate: Date.parse(cfp_string), }); {% endif %} diff --git a/_layouts/calendar.ics b/_layouts/calendar.ics index cd15fb2744e..d946427933e 100644 --- a/_layouts/calendar.ics +++ b/_layouts/calendar.ics @@ -29,15 +29,15 @@ DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }} DTSTART;TZID={{ conf.timezone }}:{{ conf.tutorial_deadline | date: "%Y%m%dT%H%M%S" }} {% endif %}END:VEVENT{% endif %} {% if conf.cfp != "TBA" %}BEGIN:VEVENT -SUMMARY:{{ conf.title }} {{ conf.year }} Deadline +SUMMARY:{{ conf.title }} {{ conf.year }} Deadline{% if conf.cfp_extension %} (Extended){% endif %} UID:{{ conf.id }} {% if conf.timezone contains "UTC" %} {% assign tz = conf.timezone | split: "UTC" %} {% if tz[1] contains "-" %} {% assign tz = tz[1] | replace: "-", "+" %} {% else if tz[1] contains "+" %} {% assign tz = tz[1] | replace: "+", "-" %} {% else assign tz = tz[1] %} {% endif %} ORGANIZER:pythondeadlin.es DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }} -DTSTART;TZID=Etc/GMT{{ tz }}:{{ conf.cfp | date: "%Y%m%dT%H%M%S" }} +DTSTART;TZID=Etc/GMT{{ tz }}:{% if conf.cfp_extension %}{{ conf.cfp_extension | date: "%Y%m%dT%H%M%S" }}{% else %}{{ conf.cfp | date: "%Y%m%dT%H%M%S" }}{% endif %} {% else %} ORGANIZER:pythondeadlin.es DTSTAMP:{{ site.time | date: "%Y%m%dT%H%M%SZ" }} -DTSTART;TZID={{ conf.timezone }}:{{ conf.cfp | date: "%Y%m%dT%H%M%S" }} +DTSTART;TZID={{ conf.timezone }}:{% if conf.cfp_extension %}{{ conf.cfp_extension | date: "%Y%m%dT%H%M%S" }}{% else %}{{ conf.cfp | date: "%Y%m%dT%H%M%S" }}{% endif %} {% endif %}END:VEVENT {% endif %} {%- endfor -%}END:VCALENDAR diff --git a/_layouts/conference.html b/_layouts/conference.html index 8379974a240..24d2e2353f2 100644 --- a/_layouts/conference.html +++ b/_layouts/conference.html @@ -43,7 +43,7 @@ #twitter-widget { width: 100%; } - + .twitter-timeline { width: 100% !important; } @@ -203,20 +203,26 @@

$('.deadline-local-time').html("TBA"); {% else %} + {% if page.cfp_extension %} + var cfp_string = "{{conf.cfp_extension}}"; + {% else %} + var cfp_string = "{{conf.cfp}}"; + {% endif %} + // Use specified timezone for deadlines if available else use AoE timezone {% if page.timezone %} - var confDeadline = DateTime.fromSQL("{{page.cfp}}", { zone: "{{page.timezone}}" }); + var confDeadline = DateTime.fromSQL(cfp_string, { zone: "{{page.timezone}}" }); {% else %} - var confDeadline = DateTime.fromSQL("{{page.cfp}}", { zone: "UTC-12" }); + var confDeadline = DateTime.fromSQL(cfp_string, { zone: "UTC-12" }); {% endif %} // check if timezone is valid otherwise replace by system timezone if (confDeadline.invalid) { - var confDeadline = DateTime.fromSQL("{{page.cfp}}"); + var confDeadline = DateTime.fromSQL(cfp_string); console.log("Invalid timezone. Using system timezone instead."); } - // add calendar + // add calendar var conferenceDeadlineCalendar = createCalendarFromObject({ id: '{{conf.title | slugify}}-{{conf.year}}', title: '{{page.title}} {{page.year}} deadline', diff --git a/_pages/archive.html b/_pages/archive.html index df6b12fda28..df9ed005b03 100644 --- a/_pages/archive.html +++ b/_pages/archive.html @@ -186,18 +186,25 @@

Past Events

$('#{{conf.title | slugify}}-{{conf.year}}').attr("cfpDiff", Infinity); {% else %} + + {% if page.cfp_extension %} + var cfp_string = "{{conf.cfp_extension}}"; + {% else %} + var cfp_string = "{{conf.cfp}}"; + {% endif %} + // Use specified timezone for deadlines if available else use AoE timezone {% if conf.timezone %} - var cfpDate = DateTime.fromSQL("{{conf.cfp}}", {zone: "{{conf.timezone}}"}); + var cfpDate = DateTime.fromSQL(cfp_string, {zone: "{{conf.timezone}}"}); var confDate = DateTime.fromSQL("{{conf.start}}", {zone: "{{conf.timezone}}"}); {% else %} - var cfpDate = DateTime.fromSQL("{{conf.cfp}}", {zone: "UTC-12"}); + var cfpDate = DateTime.fromSQL(cfp_string, {zone: "UTC-12"}); var confDate = DateTime.fromSQL("{{conf.start}}", {zone: "UTC-12"}); {% endif %} // check if timezone is valid otherwise replace by system timezone if (cfpDate.invalid || confDate.invalid) { - var cfpDate = DateTime.fromSQL("{{conf.cfp}}"); + var cfpDate = DateTime.fromSQL(cfp_string); var confDate = DateTime.fromSQL("{{conf.start}}"); console.log("Invalid timezone in {{conf.title | slugify}}-{{conf.year}}. Using system timezone instead."); } diff --git a/feed.xml b/feed.xml index 7ff2e1ccb3d..6bc9b22b369 100644 --- a/feed.xml +++ b/feed.xml @@ -17,7 +17,11 @@ {{ conf.title | xml_escape }} {{ conf.year }} Conference Deadline Conference in {{conf.place | xml_escape }} on {{conf.date | xml_escape }}. CfP: {{ conf.cfp | xml_escape }} {% if conf.zimezone %}{{ conf.timezone | xml_escape }}{% else%}AoE{% endif %}.{% if conf.twitter %}<br />Find them here: @{{ conf.twitter}}{% endif %} + {% if conf.cfp_extension %} + {{ conf.cfp_extension | date: "%Y-%m-%d %H:%M:%S" | date_to_rfc822 }} + {% else %} {{ conf.cfp | date: "%Y-%m-%d %H:%M:%S" | date_to_rfc822 }} + {% endif %} https://{{ site.domain }}/conference/{{conf.title | slugify}}-{{conf.year}}/ {{ conf.id }} {{ conf.sub }} @@ -25,4 +29,4 @@ {% endif %} {% endfor %} - \ No newline at end of file + diff --git a/index.html b/index.html index ba3475c7b92..8f5d81991c8 100644 --- a/index.html +++ b/index.html @@ -201,17 +201,22 @@

Visit the Archive

{% else %} // Use specified timezone for deadlines if available else use AoE timezone + {% if conf.cfp_extension %} + var cfp_string = "{{conf.cfp_extension}}"; + {% else %} + var cfp_string = "{{conf.cfp}}"; + {% endif %} {% if conf.timezone %} - var cfpDate = DateTime.fromSQL("{{conf.cfp}}", {zone: "{{conf.timezone}}"}); + var cfpDate = DateTime.fromSQL(cfp_string, {zone: "{{conf.timezone}}"}); var confDate = DateTime.fromSQL("{{conf.start}}", {zone: "{{conf.timezone}}"}); {% else %} - var cfpDate = DateTime.fromSQL("{{conf.cfp}}", {zone: "UTC-12"}); + var cfpDate = DateTime.fromSQL(cfp_string, {zone: "UTC-12"}); var confDate = DateTime.fromSQL("{{conf.start}}", {zone: "UTC-12"}); {% endif %} // check if timezone is valid otherwise replace by system timezone if (cfpDate.invalid || confDate.invalid) { - var cfpDate = DateTime.fromSQL("{{conf.cfp}}"); + var cfpDate = DateTime.fromSQL(cfp_string); var confDate = DateTime.fromSQL("{{conf.start}}"); console.log("Invalid timezone in {{conf.title | slugify}}-{{conf.year}}. Using system timezone instead."); }