Add possibility to add url for courses rooms

parent dae5e3f1
Pipeline #408 passed with stage
in 1 minute and 36 seconds
......@@ -10,8 +10,8 @@
<h2 id="{{ edition.date | date: '%Y-%m' }}">{{ include.edition.date | date: "%b %Y" }}</h2>
{% if include.edition.description %}
<div class="container">
<p class="description">{{ include.edition.description | markdownify }}</p>
<div class="container text-align-center">
{{ include.edition.description | markdownify }}
</div>
{% endif %}
......@@ -29,7 +29,11 @@
<div class="room">
{% if session.room %}
<div class="caption">Room</div>
<div>{{ session.room }}</div>
{% if session.room.url %}
<div><a href="{{ session.room.url }}">{{ session.room.room }}</a></div>
{% else %}
<div>{{ session.room.room }}</div>
{% endif %}
{% endif %}
</div>
<div class="topics">
......
......@@ -45,6 +45,8 @@ module Jekyll
editions = site.data["courses"].values
editions = editions.select { |obj| obj["course"] == slug }
editions.sort_by { |obj| obj["date"] }
editions = editions.map { |obj| parse_edition_data(obj) }
editions
end
def make_past_editions_page(site, dir, course, editions)
......@@ -60,6 +62,18 @@ module Jekyll
past_editions_page
end
def parse_edition_data(edition)
edition["schedule"].map { |session|
if session["room"] != nil && !session["room"].is_a?(Hash)
session["room"] = {"room" => session["room"]}
end
session
}
edition
end
end
class BasicPage < Page
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment