Skip to content

Show the full schedule on a single page #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
17 changes: 17 additions & 0 deletions _includes/full_schedule.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="row">
<div class="col-12">
{% assign daynum = include.day %}
{% assign day = site.data.conf.days[daynum] %}
{% capture dayprop %}day{{daynum}}{% endcapture %}
{% if include.workshops %}
{% assign events = site.posts | where: 'type', 'workshop' %}
{% else %}
{% assign events = site.data.schedule | where:dayprop, true %}
{% endif %}
<h2>
Day {{daynum}}: {{day.weekday}}, {{day.date}}
{% if include.workshops %} (Workshops){% endif %}
</h2>
{% include presentation_timeline.html events=events %}
</div>
</div>
21 changes: 16 additions & 5 deletions _includes/presentation_timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
{% for event in sorted_events %}
<div class="cd-timeline-block">
<div class="cd-timeline-img">
<img src="/assets/img/clockface/{{ event.timeImg }}" alt="">
{% if event.timeImg %}
{% assign timeImg = event.timeImg %}
{% elsif event.time == "am" || event.time == "full" %}
{% assign timeImg = "9.00.png" %}
{% else %}
{% assign timeImg = "1.30.png" %}
{% endif %}
<img src="/assets/img/clockface/{{ timeImg }}" alt="">
</div>

<div class="cd-timeline-content">
Expand Down Expand Up @@ -57,10 +64,14 @@ <h2 class="cd-timeline-content-title">{{ event.title }}</h2>
</div>
<div class="col-sm-5 col-12 text-right">
<h2 class="cd-timeline-content-title">
{% capture eventTime %}{{ event.time | replace: '-', ' ' }}{% endcapture %}
{% capture beginTime %}{{ eventTime | truncatewords: 1, '' }}{% endcapture %}
{% capture endTime %}{{ eventTime | replace: beginTime, '' }}{% endcapture %}
{{ beginTime | date: "%l:%M%p" | strip }} to {{ endTime | date: "%l:%M%p" | strip }}
{% if event.type == "workshop" %}
{{event.startTime}} to {{event.endTime}}
{% else %}
{% assign eventTime = event.time | replace: '-', ' ' %}
{% assign beginTime = eventTime | truncatewords: 1, '' %}
{% assign endTime = eventTime | replace: beginTime, '' %}
{{ beginTime | date: "%l:%M%p" | strip }} to {{ endTime | date: "%l:%M%p" | strip }}
{% endif %}
</h2>
<div class="timezone">{{ site.data.conf.timezone }} Time</div>
</div>
Expand Down
25 changes: 25 additions & 0 deletions schedule/full.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
layout: default
title: Full Schedule
categories: Schedule
---
<div class="container" id="main">
{% if site.data.conf.have-schedule-details %}
<div class="row">
<div class="col-12">
<h1>Full Schedule</h1>
</div>
</div>
{% include full_schedule.html day=1 %}
{% include full_schedule.html day=2 %}
{% include full_schedule.html day=3 %}
{% include full_schedule.html day=4 workshops=true %}

{% else %}
<div class="row">
<div class="col-12">
<p>The schedule for Code4Lib {{site.data.conf.year}} has not been finalized yet.</p>
</div>
</div>
{% endif %}
</div>