X-Git-Url: https://git.p6c8.net/pcdenotes.git/blobdiff_plain/0f4e8b8769f4e9d58350b5d81cf931f61f03a33a..5603ef1d534888f3e85b93c98fb2623d4154fead:/notes/templates/note_list.html?page=%7B%7B%20page.number%20%7D%7D

diff --git a/notes/templates/note_list.html b/notes/templates/note_list.html
index bf278e1..f1f5ee5 100644
--- a/notes/templates/note_list.html
+++ b/notes/templates/note_list.html
@@ -1,30 +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>{{ note.title }}</h2>
-    <p>ID: {{ note.id }}</p>
-    <div>{{ note.content|linebreaksbr|markdownify }}</div>
-    <p>Link: <a href="{{ note.get_absolute_url }}">View</a></p>
-    <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>
-
-  <p>Number of notes: {{ notes_count }}</p>
+  {% if page_count > 1 %}
+    <ul class="pagination mt-5">
+      {% 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>
+  {% endif %}
 {% endblock %}
\ No newline at end of file