X-Git-Url: https://git.p6c8.net/pcdenotes.git/blobdiff_plain/ee38ff5eec83ee81d518125d2894c631da45c3f9..ac8a9515bf50f6261d749539c18bafefb61e91c8:/notes/templates/note_list.html diff --git a/notes/templates/note_list.html b/notes/templates/note_list.html index e996fb2..f1f5ee5 100644 --- a/notes/templates/note_list.html +++ b/notes/templates/note_list.html @@ -1,20 +1,23 @@ {% extends "note_base.html" %} -{% load markdownify %} {% block title %}Notes{% endblock %} {% block content %} - {% for note in notes %} - <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> + {% for note in notes_page %} + {% include "note.html" %} {% empty %} <p>No notes</p> {% endfor %} - <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