diff default/blog/articles.html @ 115:5d9e2270ceb4

blog/articles, input/navigation: moved navigation template in a dedicated macro
author Goffi <goffi@goffi.org>
date Tue, 30 Jan 2018 07:47:21 +0100
parents 1d0ddeb79903
children c70f405f9b86
line wrap: on
line diff
--- a/default/blog/articles.html	Fri Jan 26 07:52:41 2018 +0100
+++ b/default/blog/articles.html	Tue Jan 30 07:47:21 2018 +0100
@@ -2,6 +2,7 @@
 {% set single = items|length == 1 %}
 {% set dates_format='relative' if single else 'short' %}
 {% import 'blog/macros.html' as blog with context %}
+{% import 'input/navigation.html' as navigation with context %}
 
 {% block title scoped -%}
     {%- if single -%}
@@ -18,24 +19,6 @@
 <div id="blog_items">
     {{ blog.show_items(items, expanded=single) }}
 </div>
-<nav class="bottom_links">
-    <ul>
-        {% if newer_url is defined %}
-            <li class="newer_items">
-                <a href="{{newer_url}}">
-                    <img src="{{media_path}}icons/tango/actions/32/go-previous.png">
-                    {% trans %}newer articles{% endtrans %}
-                </a>
-            </li>
-        {% endif %}
-        {% if older_url is defined %}
-            <li class="older_items">
-                <a href="{{older_url}}">
-                    <img src="{{media_path}}icons/tango/actions/32/go-next.png">
-                    {% trans %}older articles{% endtrans %}
-                </a>
-            </li>
-        {% endif %}
-    </ul>
-</nav>
+
+{{ navigation.prev_next(_("newer articles"), _("older articles")) }}
 {% endblock body %}