2 Find previous and next episodes (if any).
4 {% for episode in site.episodes %}
5 {% if episode.url == page.url %}
6 {% unless forloop.first %}
7 {% assign prev_episode = prev %}
9 {% unless forloop.last %}
10 {% assign next_episode = site.episodes[forloop.index] %}
13 {% assign prev = episode %}
17 Display title and prev/next links.
20 <div class="col-md-1">
23 <a href="{{ site.github.url }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>
24 {% elsif site.github.url %}
25 <a href="{{ site.github.url }}"><span class="glyphicon glyphicon-menu-up"></span></a>
27 <a href="/"><span class="glyphicon glyphicon-menu-up"></span></a>
31 <div class="col-md-10">
32 <h3 class="maintitle"><a href="{{ site.github.url }}/">{{ site.title }}</a></h3>
33 <h1 class="maintitle">{{ page.title }}</h1>
35 <div class="col-md-1">
38 <a href="{{ site.github.url }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>
39 {% elsif site.github.url %}
40 <a href="{{ site.github.url }}"><span class="glyphicon glyphicon-menu-up"></span></a>
42 <a href="/"><span class="glyphicon glyphicon-menu-up"></span></a>