Skip to content

Commit

Permalink
Fix iCal and quick links for the program
Browse files Browse the repository at this point in the history
  • Loading branch information
mporcheron authored Aug 28, 2024
1 parent e79b480 commit a5502ef
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
14 changes: 7 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,16 @@ sass:
# Page generation from data
page_gen-dirs: true # uncomment, if you prefer to generate named folders
page_gen:
# - data: prg_sessions
# template: programme-ical
# name: id
# extension: ics
# dir: '/programme/ics'
# index_files: false
- data: prg_sessions
template: programme-ical
name: id
extension: ics
dir: '/program/ics/'
index_files: false
- data: prg_sessions
template: programme-redirect
name: id
dir: '/programme/link/'
dir: '/program/link/'
index_files: false

# Pagination
Expand Down
6 changes: 3 additions & 3 deletions _layouts/programme-ical.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTAMP:{{ "now" | date: "%Y%m%dT%H%M00" }}Z
UID:{{ session.start_time | date: "%Y%m%dT%H%M00" }}Z@2021.conversationaluserinterfaces.org
UID:{{ session.start_time | date: "%Y%m%dT%H%M00" }}Z@2024.symposium.tas.ac.uk
DTSTART:{{ session.start_time | date: "%Y%m%dT%H%M00" }}Z
DTEND:{{ session.end_time | date: "%Y%m%dT%H%M00" }}Z
SUMMARY:CUI {{ site.conference.year }}: {{ session.title | escape }}
DESCRIPTION:{% if session.description != nil -%}{{ session.description | strip_html }}\n\n{% endif %}{% if session.presenters != nil -%}{{ session.presenters | replace: "<br>", "\n" | replace: "<em>", "*" | replace: "</em>", "*" | strip_html }}\n\n{% endif %}{% if session.chairs != nil -%}Chaired by{{ session.chairs }}\n\n{% endif %}Please see {{ site.url }}{{ site.baseurl }}/programme/link/{{ session_id }} for more detailed session information.\n\nJoining details are emailed to all registered attendees prior to the conference.
SUMMARY:TAS {{ site.conference.year }}: {{ session.title | escape }}
DESCRIPTION:{% if session.description != nil -%}{{ session.description | strip_html }}\n\n{% endif %}{% if session.presenters != nil -%}{{ session.presenters | replace: "<br>", "\n" | replace: "<em>", "*" | replace: "</em>", "*" | strip_html }}\n\n{% endif %}{% if session.chairs != nil -%}Chaired by{{ session.chairs }}\n\n{% endif %}Please see {{ site.url }}{{ site.baseurl }}/program/link/{{ session_id }} for more detailed session information.
LOCATION:{{ session.location }}
TRANSP:OPAQUE
X-MICROSOFT-CDO-BUSYSTATUS:BUSY
Expand Down
2 changes: 1 addition & 1 deletion _layouts/programme-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
{%- assign session_id = page.name | replace: ".html", "" -%}
{%- for session in site.data.prg_sessions %}
{%- if session_id != session.id %}{%- continue -%}{% endif -%}
<meta http-equiv="refresh" content="0; URL='{{ site.url }}{{ site.baseurl }}/programme/#session-{{ session_id }}'" />
<meta http-equiv="refresh" content="0; URL='{{ site.url }}{{ site.baseurl }}/program/#session-{{ session_id }}'" />
{% endfor %}
28 changes: 14 additions & 14 deletions program/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
title: Program
redirect_from:
- /programme/
description: The online programme for TAS '24 symposium.
description: The online program for TAS '24 symposium.

splash_title: TAS '24 program

Expand Down Expand Up @@ -94,15 +94,15 @@
{%- assign suffix = "th" -%}
{%- endif -%}
{% assign rest = day | slice: 2, 100 | truncatewords: 1, '' %}
<button class="programme-dates small nav-link me-md-2 me-1 px-md-3 p-2" id="programmeDay{{ forloop.index0 }}" data-date="{{ day | date: "%F" }}" data-bs-toggle="pill" data-bs-target="#programme{{ forloop.index0 }}" type="button" role="tab" aria-controls="programme{{ forloop.index0 }}" aria-selected="{% if forloop.index0 == 0 %}true{% else %}false{% endif %}">{{ rest }} {{ date }}</button>
<button class="program-dates small nav-link me-md-2 me-1 px-md-3 p-2" id="programDay{{ forloop.index0 }}" data-date="{{ day | date: "%F" }}" data-bs-toggle="pill" data-bs-target="#program{{ forloop.index0 }}" type="button" role="tab" aria-controls="program{{ forloop.index0 }}" aria-selected="{% if forloop.index0 == 0 %}true{% else %}false{% endif %}">{{ rest }} {{ date }}</button>
</li>
{% endfor %}
</ul>

<div id="programmeSchedule" class="tab-content">
<div id="programSchedule" class="tab-content">
{% for day in days %}
{%- assign day_index = forloop.index0 -%}
<div class="card tab-pane fade show" role="tabpanel" aria-labelledby="programmeDay{{ forloop.index0 }}" id="programme{{ forloop.index0 }}">
<div class="card tab-pane fade show" role="tabpanel" aria-labelledby="programDay{{ forloop.index0 }}" id="program{{ forloop.index0 }}">
<ul class="list-unstyled prg-day mb-0 border-0 rounded-0">
{%- for session in site.data.prg_sessions %}
{% if summer_time %}
Expand All @@ -119,7 +119,7 @@
{% endif %}

{% if session.type == "EOD" %}
<li class="d-flex p-3 bg-lightest border-bottom rounded-0" id="session-{{ session.id }}" data-tab="programmeDay{{ day_index }}">
<li class="d-flex p-3 bg-lightest border-bottom rounded-0" id="session-{{ session.id }}" data-tab="programDay{{ day_index }}">
<div class="flex-grow-1 ms-3 text-center text-muted">
{% if session.description %}
{{ session.description }}
Expand All @@ -129,7 +129,7 @@
{% elsif session.type == "Innerevent" %}
{% elsif session.type == "Innerbreak" %}
{% elsif session.type == "Break" %}
<li class="d-flex p-3 bg-lightest border-bottom rounded-0" id="session-{{ session.id }}" data-tab="programmeDay{{ day_index }}">
<li class="d-flex p-3 bg-lightest border-bottom rounded-0" id="session-{{ session.id }}" data-tab="programDay{{ day_index }}">
<div class="flex-grow-1 ms-3 text-center text-muted">
{% if session.description %}
{% assign time_str = start_time | date: "%H:%M" %}
Expand All @@ -141,11 +141,11 @@
</div>
</li>
{% else %}
<li class="d-flex prg-row p-3 rounded bg-light border-bottom rounded-0 flex-md-row flex-column" id="session-{{ session.id }}" data-tab="programmeDay{{ day_index }}">
<li class="d-flex prg-row p-3 rounded bg-light border-bottom rounded-0 flex-md-row flex-column" id="session-{{ session.id }}" data-tab="programDay{{ day_index }}">
<div class="prg-left flex-shrink-0 flex-grow-0 me-md-3 mb-md-0 mb-3 d-flex flex-md-column flex-row">
<div class="text-capitalize mb-md-2 me-3"><span class="badge bg-primary">{{ session.type }}</span></div>
<div class="mb-md-1 me-md-0 me-3 small">
<span alt="A clock" class="d-inline-block prg-icon-timing prg-icon-start me-2"></span><span class="d-inline-block prg-text-timing">Starts <span class="d-md-inline d-none">at</span> <span class="prg-timing" data-timestamp="{{ start_time | date: "%FT%T.000Z" }}" data-programme-scheduled="{{ start_time | date: "%d" }}" data-day-alert="different-day-{{ forloop.index0 }}"><span></span>{{ start_time | date: "%H:%M" }}</span>
<span alt="A clock" class="d-inline-block prg-icon-timing prg-icon-start me-2"></span><span class="d-inline-block prg-text-timing">Starts <span class="d-md-inline d-none">at</span> <span class="prg-timing" data-timestamp="{{ start_time | date: "%FT%T.000Z" }}" data-program-scheduled="{{ start_time | date: "%d" }}" data-day-alert="different-day-{{ forloop.index0 }}"><span></span>{{ start_time | date: "%H:%M" }}</span>
</div>
<div class="mt-md-1 small">
<span alt="A stopwatch" class="d-inline-block prg-icon-timing prg-icon-end me-2"></span><span class="d-inline-block prg-text-timing">Ends <span class="d-md-inline d-none">at</span> <span class="prg-timing" data-timestamp="{{ end_time | date: "%FT%T.000Z" }}"><span></span>{{ end_time | date: "%H:%M" }}</span>
Expand All @@ -170,12 +170,12 @@
</a>
{% endunless %}
{% endif %}
<!--{% capture calendar_url %}/programme/ics/{{ session.id }}.ics{% endcapture %}
<a href="{{ calendar_url | relative_url }}" title="Download an iCal (ICS) file for this session in the programme" class="d-block prg-icon-cal me-2">
{% capture calendar_url %}/program/ics/{{ session.id }}.ics{% endcapture %}
<a href="{{ calendar_url | relative_url }}" title="Download an iCal (ICS) file for this session in the program" class="d-block prg-icon-cal me-2">
<span class="visually-hidden">iCalendar (ICS) file for this session</span>
</a>-->
{% capture session_url %}/programme/link/{{ session.id }}{% endcapture %}
<a href="{{ session_url | relative_url }}" title="Get the permanent link to this session in the programme" class="d-block prg-icon-link">
</a>
{% capture session_url %}/program/link/{{ session.id }}{% endcapture %}
<a href="{{ session_url | relative_url }}" title="Get the permanent link to this session in the program" class="d-block prg-icon-link">
<span class="visually-hidden">Permalink to this session</span>
</a>
</div>
Expand Down Expand Up @@ -330,7 +330,7 @@ <h5 class="text-center mt-3">

<script>
window.addEventListener('load', () => {
const dates = document.querySelectorAll('.programme-dates');
const dates = document.querySelectorAll('.program-dates');
var shownDate = false;

if(window.location.hash && window.location.hash.startsWith("#session-")) {
Expand Down

0 comments on commit a5502ef

Please sign in to comment.