diff default/input/navigation.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
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/default/input/navigation.html	Tue Jan 30 07:47:21 2018 +0100
@@ -0,0 +1,22 @@
+{% macro prev_next(prev_label=_("newer"), next_label=_("older")) %}
+    <nav class="prev_next_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">
+                        {{prev_label}}
+                    </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">
+                        {{next_label}}
+                    </a>
+                </li>
+            {% endif %}
+        </ul>
+    </nav>
+{% endmacro %}