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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions src/schedule-ical.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
permalink: /schedule.ics
eleventyExcludeFromCollections: true
---
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//DjangoCon US {{ site.conf_year }}//Schedule//EN
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:DjangoCon US {{ site.conf_year }}
X-WR-TIMEZONE:{{ site.timezone }}
X-WR-CALDESC:DjangoCon US {{ site.conf_year }} Conference Schedule
BEGIN:VTIMEZONE
TZID:{{ site.timezone }}
BEGIN:DAYLIGHT
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
TZNAME:CDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
TZNAME:CST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
{%- for talk in collections.talks %}
BEGIN:VEVENT
DTSTART;TZID={{ site.timezone }}:{{ talk.data.start_datetime | formatDateTime: "yyyyMMdd'T'HHmmss" }}
DTEND;TZID={{ site.timezone }}:{{ talk.data.end_datetime | formatDateTime: "yyyyMMdd'T'HHmmss" }}
DTSTAMP:{{ talk.data.start_datetime | formatDateTime: "yyyyMMdd'T'HHmmss'Z'" }}
UID:{{ talk.fileSlug }}@{{ site.domain }}
SUMMARY:{{ talk.data.title | replace: ",", "\," | replace: ";", "\;" | replace: "\n", " " | replace: "\r", " " }}
{%- if talk.data.room %}
LOCATION:{{ talk.data.room | replace: ",", "\," | replace: ";", "\;" }}
{%- endif %}
{%- if talk.data.presenter_slugs or talk.templateContent %}
DESCRIPTION:
{%- if talk.data.presenter_slugs -%}
{%- for slug in talk.data.presenter_slugs -%}
{%- assign presenter = collections.presenters | find: slug -%}
{%- if presenter %}Presenter: {{ presenter.data.name }}\n{% endif -%}
{%- endfor -%}
{%- if talk.templateContent %}\n{% endif -%}
{%- endif -%}
{%- if talk.templateContent -%}
{{ talk.templateContent | strip_html | replace: "\n", "\n " | replace: ",", "\," | replace: ";", "\;" | truncate: 1000 }}
{%- endif %}
{%- endif %}
{%- if talk.data.permalink %}
URL:{{ site.domain }}{{ talk.data.permalink }}
{%- endif %}
STATUS:CONFIRMED
END:VEVENT
{%- endfor %}
END:VCALENDAR
6 changes: 6 additions & 0 deletions src/schedule.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ <h1 class="text-center pageheading">{{ title }}</h1>

<div class="pt-6 block-container">
<div class="wrapper">
<div class="max-w-5xl mx-auto mb-8 text-center">
<a href="/schedule.ics" class="inline-flex items-center gap-2 px-6 py-3 text-lg font-medium text-white bg-teal hover:bg-teal-dark rounded-lg transition-colors" download>
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"></path></svg>
Add to Calendar
</a>
</div>
<nav class="max-w-5xl mx-auto mb-12">
<h2 class="mb-1 font-bold uppercase sr-only">Jump to day</h2>
<ul class="flex flex-wrap justify-center gap-6">
Expand Down