Skip to content

Commit 05e46df

Browse files
committed
Include a page of past events
Resolves UofTCoders/council#216
1 parent c9df2ae commit 05e46df

File tree

4 files changed

+45
-1
lines changed

4 files changed

+45
-1
lines changed

_config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#Setup ~~~
22
#Follow these 2 steps to set up your site.
3+
exclude: [".Rproj.user"]
34

45
#Step 1: give your study group a name and a short description:
56
title: University of Toronto Coders

_includes/events.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
<h2 class="section-heading">Events</h2>
77
<h3 class="section-subheading text-muted">
88
Unless otherwise stated, all our events are held in MADLab at <a href="https://www.google.ca/maps/place/Gerstein+Science+Information+Centre/@43.662195,-79.3961537,17z/data=!3m1!4b1!4m5!3m4!1s0x882b34b854ad5761:0xd4cee6c2ece27846!8m2!3d43.662195!4d-79.393965?dcr=0">
9-
Gerstein Science Information Centre</a>, which is room B112 at the south end of the first lower level.
9+
Gerstein Science Information Centre</a>, which is room B112 at the south end of the first lower level.
1010
Go through the main entrance of Gerstein, take a right turn down a corridor (across from the admin desk or just past the reading room), then take the stairs down and follow the signs to MADLab, the door should be open 10-15 minutes before each session.
11+
A list of all previous events and sessions can be found on the <a href="{{ site.github.url | replace:'http:','https:' }}/past-events/">"Past Events" page</a>.
1112
</h3>
1213
</div>
1314
</div>

_includes/past-events.html

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!-- Events Grid Section -->
2+
<section id="events" class="bg-light-gray">
3+
<div class="container">
4+
<div class="row">
5+
<div class="col-lg-12 text-center">
6+
<h2 class="section-heading">Past events</h2>
7+
<h3 class="section-subheading text-muted">
8+
This is a list of past UofTCoders events or sessions.
9+
</h3>
10+
</div>
11+
</div>
12+
<div class="col-lg-12">
13+
<ul class='events'>
14+
{% assign isEvent = 0 %}
15+
{% for post in site.posts %}
16+
{% capture nowyear %}{{'now' | date: '%Y'}}{% endcapture %}
17+
{% capture postyear %}{{post.date | date: '%Y'}}{% endcapture %}
18+
{% capture nowday %}{{'now' | date: '%j'}}{% endcapture %}
19+
{% capture postday %}{{post.date | date: '%j'}}{% endcapture %}
20+
{% assign postday = postday | plus: 0 %}
21+
{% assign nowday = nowday | minus: 2 %}
22+
{% if postyear < nowyear or postday <= nowday and postyear <= nowyear %}
23+
{% assign isEvent = 1 %}
24+
<li>
25+
<a class='eventTitle' href="{{ post.link }}">{{ post.title }} </a>
26+
<div class='eventSub'><strong>{{ post.date | date: "%-d %B %Y"}}, {{ post.startTime | date:"%I:%M %p" }}, {{ post.location }}</strong><br>{{ post.text }}</div>
27+
</li>
28+
{% endif %}
29+
{% endfor %}
30+
{% if isEvent == 0 %}
31+
<a class='eventTitle' href="{{ site.github.issues_url }}">Nothing yet! Propose an event here.</a>
32+
{% endif %}
33+
</ul>
34+
</div>
35+
</div>
36+
</section>

past-events.html

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
layout: page
3+
title: "Past events and sessions"
4+
---
5+
6+
{% include past-events.html %}

0 commit comments

Comments
 (0)