Browse Source

use vars better, and put a previous post link at the bottom...

main
John-Mark Gurney 3 years ago
parent
commit
3373b2db44
1 changed files with 17 additions and 1 deletions
  1. +17
    -1
      layout/frontpage.j2

+ 17
- 1
layout/frontpage.j2 View File

@@ -5,11 +5,27 @@
{% block page_title %}<h1 class="title">{{ resource.meta.title }}</h1>{% endblock %}
-->

{% for res in resource.node.walk_resources_sorted_by_time()[0:3] %}
{% set posts = resource.node.walk_resources_sorted_by_time() %}
{% for res in posts[0:3] %}

{% refer to res.relative_path as post %}
{{ post.post }}

{% endfor %}

<section>

{% set nextpost = posts[3] %}
<p class='prevnext'>
<span class="small">
<a class="prev{{' disabled' if not nextpost }}"
title="{{ nextpost.meta.title }}"
{% if nextpost %}
href="{{ content_url(nextpost.url) }}"{% endif %}>
Previous Post
</a>
</span>
</div>
</section>

{% endblock %}

Loading…
Cancel
Save