Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CSE 390HA
20au
website
Commits
8aa5702d
Commit
8aa5702d
authored
4 years ago
by
Kevin Lin
Browse files
Options
Downloads
Patches
Plain Diff
Simplify schedule data format
parent
0cfdf803
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
_layouts/schedule.html
+13
-9
13 additions, 9 deletions
_layouts/schedule.html
_schedules/weekly.md
+41
-44
41 additions, 44 deletions
_schedules/weekly.md
with
54 additions
and
53 deletions
_layouts/schedule.html
+
13
−
9
View file @
8aa5702d
...
...
@@ -9,19 +9,23 @@
<ul
class=
"schedule-group"
>
{% for day in page.schedule %}
<li
class=
"schedule-day"
>
<h2
class=
"schedule-header"
>
{{ day.name }}
</h2>
{% if day.events %}
{% assign day_name = day | first %}
<h2
class=
"schedule-header"
>
{{ day_name }}
</h2>
{% assign events = day | last %}
{% if events %}
<ul
class=
"schedule-events"
style=
"height: {{ page.timeline | size | times: 40 }}px"
>
{% for event in day.events %}
{% capture start %}{% include minutes.liquid time=event.start %}{% endcapture %}
{% capture end %}{% include minutes.liquid time=event.end %}{% endcapture %}
{% 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 %}
{% 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.class %}{{ event.class }}{% else %}{{ event
.
name | slugify }}{% endif %}"
<li
class=
"schedule-event {% if event
_data
.class %}{{ event
_data
.class }}{% else %}{{ event
_
name | slugify }}{% endif %}"
style=
"top: {{ top }}px; height: {{ height }}px;"
>
<div
class=
"name"
>
{{ event
.
name }}
</div>
<div
class=
"time"
>
{{ event.start }}–{{ event.end }}
</div>
<div
class=
"location"
>
{{ event.location }}
</div>
<div
class=
"name"
>
{{ event
_
name }}
</div>
<div
class=
"time"
>
{{ event
_data
.start }}–{{ event
_data
.end }}
</div>
<div
class=
"location"
>
{{ event
_data
.location }}
</div>
</li>
{% endfor %}
</ul>
...
...
This diff is collapsed.
Click to expand it.
_schedules/weekly.md
+
41
−
44
View file @
8aa5702d
...
...
@@ -19,48 +19,45 @@ timeline:
-
'
5:00
PM'
-
'
5:30
PM'
schedule
:
-
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
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
---
This diff is collapsed.
Click to expand it.
Kevin Lin
@kevinl
mentioned in commit
cse390hb/22sp/website@9fcc8670
·
3 years ago
mentioned in commit
cse390hb/22sp/website@9fcc8670
mentioned in commit cse390hb/22sp/website@9fcc86704c4eb253982bbaefe8eaa601f7ca1bea
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment