X-Git-Url: https://git.p6c8.net/pcdenotes.git/blobdiff_plain/ae03458e871011aea691e3d67b577f60362f481d..a6bbbd5f290f16959a74625ea967484025738a41:/notes/templates/note_list.html?ds=sidebyside

diff --git a/notes/templates/note_list.html b/notes/templates/note_list.html
index ffc256a..91131d8 100644
--- a/notes/templates/note_list.html
+++ b/notes/templates/note_list.html
@@ -1,26 +1,23 @@
 {% extends "note_base.html" %}
-{% load markdownify %}
 
 {% block title %}Notes{% endblock %}
 
 {% block content %}
   {% for note in notes_page %}
-  <article class="container mt-5">
-    <h2><a href="{{ note.get_absolute_url }}" class="link-dark">{{ note.title }}</a></h2>
-    <div>{{ note.content|linebreaksbr|markdownify }}</div>
-    <p>Date: {{ note.created_at|date:"Y-m-d H:i" }}</p>
-  </article>
+  {% include "note.html" %}
   {% empty %}
   <p>No notes</p>
   {% endfor %}
 
-  <ul class="pagination">
-    {% for page in pages %}
-      {% ifnotequal page.number page_number %}
-        <li class="page-item"><a href="?page={{ page.number }}" class="page-link">{{ page.number }}</a></li>
-      {% else %}
-        <li class="page-item active"><span class="page-link">{{ page.number }}</span></li>
-      {% endifnotequal %}
-    {% endfor %}
-  </ul>
+  {% if page_count > 1 %}
+    <ul class="pagination flex-wrap mt-5">
+      {% for page in pages %}
+        {% if page.number != page_number %}
+          <li class="page-item"><a href="?page={{ page.number }}" class="page-link">{{ page.number }}</a></li>
+        {% else %}
+          <li class="page-item active"><span class="page-link">{{ page.number }}</span></li>
+        {% endif %}
+      {% endfor %}
+    </ul>
+  {% endif %}
 {% endblock %}
\ No newline at end of file