Add previous/next navigation to posts
This commit is contained in:
@@ -16,7 +16,7 @@ layout: default
|
||||
<p>{{ content }}</p>
|
||||
<a href="/{{ site.baseurl }}/gallery/{{ page.gallery }}/">[ list ]</a>
|
||||
</section>
|
||||
<ul style="margin-top:0;">
|
||||
<ul style="margin-top: 0;">
|
||||
{% if photo.previous %}
|
||||
<li><a href="/{{ site.baseurl }}/gallery/{{ page.gallery }}/{{ photo.previous }}.html" rel="prev"> ← </a></li>
|
||||
{% else %}
|
||||
|
||||
@@ -12,6 +12,19 @@
|
||||
<a href="{{ page.code }}"><img alt="code" height="49" src="{{ site.static_prefix }}/icon/code.png" width="49" /></a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<ul style="margin-top: 0;">
|
||||
{% if page.previous %}
|
||||
<li><a href="/{{ site.baseurl }}{{ page.previous.url }}" rel="prev"> ← {{ page.previous.title }} </a></li>
|
||||
{% else %}
|
||||
<li><span class="noanchor"> ← </span></li>
|
||||
{% endif %}
|
||||
|
||||
{% if page.next %}
|
||||
<li><a href="/{{ site.baseurl }}{{ page.next.url }}" rel="next"> {{ page.next.title }} → </a></li>
|
||||
{% else %}
|
||||
<li><span class="noanchor"> → </span></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
<h1>
|
||||
<span itemprop="name">{{ page.title }}</span>
|
||||
<small class="print-only" itemprop="datePublished" content="{{ page.date|date:'%F') }}">{{ page.date|date:'%A, %B %d, %Y' }}</small>
|
||||
|
||||
Reference in New Issue
Block a user