forked from swcarpentry/sql-novice-survey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
episode_title.html
42 lines (41 loc) · 1.26 KB
/
episode_title.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{% comment %}
Find previous and next episodes (if any).
{% endcomment %}
{% for episode in site.episodes %}
{% if episode.url == page.url %}
{% unless forloop.first %}
{% assign prev_episode = prev %}
{% endunless %}
{% unless forloop.last %}
{% assign next_episode = site.episodes[forloop.index] %}
{% endunless %}
{% endif %}
{% assign prev = episode %}
{% endfor %}
{% comment %}
Display title and prev/next links.
{% endcomment %}
<div class="row">
<div class="col-md-1">
<h3>
{% if prev_episode %}
<a href="{{ page.root }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>
{% else %}
<a href="{{ page.root }}"><span class="glyphicon glyphicon-menu-up"></span></a>
{% endif %}
</h3>
</div>
<div class="col-md-10">
<h3 class="maintitle"><a href="{{ page.root }}/">{{ site.title }}</a></h3>
<h1 class="maintitle">{{ page.title }}</h1>
</div>
<div class="col-md-1">
<h3>
{% if next_episode %}
<a href="{{ page.root }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>
{% else %}
<a href="{{ page.root }}"><span class="glyphicon glyphicon-menu-up"></span></a>
{% endif %}
</h3>
</div>
</div>