X-Git-Url: https://git.p6c8.net/pcdenotes.git/blobdiff_plain/3fb7b9dea69252f64ee82967dfca97baf1b02df7..818b32455bad7a84a693e342be35e2cb22de04ce:/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 fb2da33..91131d8 100644 --- a/notes/templates/note_list.html +++ b/notes/templates/note_list.html @@ -1,26 +1,23 @@ -{% load markdownify %} -<!DOCTYPE html> +{% extends "note_base.html" %} -<html lang="de"> -<head> - <title>Notes</title> - <meta charset="UTF-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1.0" /> -</head> -<body> +{% block title %}Notes{% endblock %} - <h1>Notes</h1> - {% for note in notes %} - <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> - {% empty %} - <p>No notes</p> - {% endfor %} +{% block content %} + {% for note in notes_page %} + {% include "note.html" %} + {% empty %} + <p>No notes</p> + {% endfor %} - <p>Number of notes: {{ notes_count }}</p> - -</body> -</html> + {% 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