Skip to content
Snippets Groups Projects
Commit 9fcc8670 authored by Kevin Lin's avatar Kevin Lin :sparkles:
Browse files

Revert "Simplify schedule data format"

This reverts commit 8aa5702d.
parent 84e51d60
No related branches found
No related tags found
No related merge requests found
......@@ -9,24 +9,20 @@
<ul class="schedule-group">
{% for day in page.schedule %}
<li class="schedule-day">
{% assign day_name = day | first %}
<h2 class="schedule-header">{{ day_name }}</h2>
{% assign events = day | last %}
{% if events %}
<h2 class="schedule-header">{{ day.name }}</h2>
{% if day.events %}
<ul class="schedule-events" style="height: {{ page.timeline | size | times: 40 }}px">
{% for event in events %}
{% assign event_name = event | first %}
{% assign event_data = event | last %}
{% capture start %}{% include minutes.liquid time=event_data.start %}{% endcapture %}
{% capture end %}{% include minutes.liquid time=event_data.end %}{% endcapture %}
{% for event in day.events %}
{% capture start %}{% include minutes.liquid time=event.start %}{% endcapture %}
{% capture end %}{% include minutes.liquid time=event.end %}{% endcapture %}
{% assign top = start | minus: offset | times: 40 | divided_by: 30 %}
{% assign height = end | minus: start | times: 40 | divided_by: 30 %}
<li class="schedule-event {% if event_data.class %}{{ event_data.class }}{% else %}{{ event_name | slugify }}{% endif %}"
<li class="schedule-event {% if event.class %}{{ event.class }}{% else %}{{ event.name | slugify }}{% endif %}"
style="top: {{ top }}px; height: {{ height }}px;">
<div class="name">{{ event_name }}</div>
<div class="time">{{ event_data.start }}–{{ event_data.end }}</div>
{% if event_data.location %}
<div class="location">{{ event_data.location }}</div>
<div class="name">{{ event.name }}</div>
<div class="time">{{ event.start }}–{{ event.end }}</div>
{% if event.location %}
<div class="location">{{ event.location }}</div>
{% endif %}
</li>
{% endfor %}
......
......@@ -19,45 +19,48 @@ timeline:
- '5:00 PM'
- '5:30 PM'
schedule:
Monday:
Lecture:
start: 9:30 AM
end: 10:30 AM
location: 150 Wheeler
Section:
start: 11:30 AM
end: 12:30 PM
location: 310 Soda
Office Hours:
start: 12:30 PM
end: 2:00 PM
location: 271 Soda
Tuesday:
Wednesday:
Lecture:
start: 9:30 AM
end: 10:30 AM
location: 150 Wheeler
Section:
start: 11:30 AM
end: 12:30 PM
location: 310 Soda
Office Hours:
start: 12:30 PM
end: 2:00 PM
location: 271 Soda
Thursday:
Friday:
Lecture:
start: 9:30 AM
end: 10:30 AM
location: 150 Wheeler
Section:
start: 11:30 AM
end: 12:30 PM
location: 310 Soda
Office Hours:
start: 12:30 PM
end: 2:00 PM
location: 271 Soda
- name: Monday
events:
- name: Lecture
start: 9:30 AM
end: 10:30 AM
location: 150 Wheeler
- name: Section
start: 11:30 AM
end: 12:30 PM
location: 310 Soda
- name: Office Hours
start: 12:30 PM
end: 2:00 PM
location: 271 Soda
- name: Tuesday
- name: Wednesday
events:
- name: Lecture
start: 9:30 AM
end: 10:30 AM
location: 150 Wheeler
- name: Section
start: 11:30 AM
end: 12:30 PM
location: 310 Soda
- name: Office Hours
start: 12:30 PM
end: 2:00 PM
location: 271 Soda
- name: Thursday
- name: Friday
events:
- name: Lecture
start: 9:30 AM
end: 10:30 AM
location: 150 Wheeler
- name: Section
start: 11:30 AM
end: 12:30 PM
location: 310 Soda
- name: Office Hours
start: 12:30 PM
end: 2:00 PM
location: 271 Soda
---
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment