diff --git a/templates/trip_page.html b/templates/trip_page.html
index a9bf8a8..001ba6e 100644
--- a/templates/trip_page.html
+++ b/templates/trip_page.html
@@ -6,6 +6,17 @@
 
 {% set row = { "flight": flight_row, "train": train_row } %}
 
+{% macro next_and_previous() %}
+  <p>
+    {% if prev_trip %}
+      previous: {{ trip_link(prev_trip) }} ({{ (trip.start - prev_trip.end).days }} days)
+    {% endif %}
+    {% if next_trip %}
+      next: {{ trip_link(next_trip) }} ({{ (next_trip.start - trip.end).days }} days)
+    {% endif %}
+  </p>
+{% endmacro %}
+
 {% block style %}
 
 {% if coordinates %}
@@ -55,6 +66,7 @@
 {% block content %}
 <div class="row">
   <div class="col m-3">
+    {{ next_and_previous() }}
     <h1>{{ trip.title }}</h1>
     <p class="lead">
     {% if end %}
@@ -167,14 +179,7 @@
     {% endif %}
     </div>
 
-    <p>
-      {% if prev_trip %}
-        previous: {{ trip_link(prev_trip) }} ({{ (trip.start - prev_trip.end).days }} days)
-      {% endif %}
-      {% if next_trip %}
-        next: {{ trip_link(next_trip) }} ({{ (next_trip.start - trip.end).days }} days)
-      {% endif %}
-    </p>
+    {{ next_and_previous() }}
 
     </div>
   <div class="col">