From 083b6653f96bcbbea1328090e4775b055ab01c03 Mon Sep 17 00:00:00 2001 From: Patrick Canterino Date: Sun, 23 Jan 2022 21:24:31 +0100 Subject: [PATCH] Modified templates --- notes/templates/note.html | 6 ++++++ notes/templates/note_base.html | 20 ++++++++++++++++++++ notes/templates/note_detail.html | 6 +----- notes/templates/note_list.html | 9 ++------- 4 files changed, 29 insertions(+), 12 deletions(-) create mode 100644 notes/templates/note.html diff --git a/notes/templates/note.html b/notes/templates/note.html new file mode 100644 index 0000000..0dbba54 --- /dev/null +++ b/notes/templates/note.html @@ -0,0 +1,6 @@ +{% load markdownify %} +
+

{{ note.title }}

+
{{ note.content|linebreaksbr|markdownify }}
+

Published on {{ note.created_at|date:"Y-m-d, H:i" }}

+
\ No newline at end of file diff --git a/notes/templates/note_base.html b/notes/templates/note_base.html index ca4eaaf..58cf3dd 100644 --- a/notes/templates/note_base.html +++ b/notes/templates/note_base.html @@ -18,5 +18,25 @@
{% block content %}{% endblock %}
+ +
+
+
+
    +
  • Row 1
  • +
+
+
+
    +
  • Row 2
  • +
+
+
+
    +
  • Row 3
  • +
+
+
+
\ No newline at end of file diff --git a/notes/templates/note_detail.html b/notes/templates/note_detail.html index 22ea0e0..b097c55 100644 --- a/notes/templates/note_detail.html +++ b/notes/templates/note_detail.html @@ -4,9 +4,5 @@ {% block title %}Notes - {{ note.title }}{% endblock %} {% block content %} -
-

{{ note.title }}

- {{ note.content|linebreaksbr|markdownify }} -

Date: {{ note.created_at|date:"Y-m-d H:i" }}

-
+{% include "note.html" %} {% endblock %} \ No newline at end of file diff --git a/notes/templates/note_list.html b/notes/templates/note_list.html index ffc256a..e77bce0 100644 --- a/notes/templates/note_list.html +++ b/notes/templates/note_list.html @@ -1,20 +1,15 @@ {% extends "note_base.html" %} -{% load markdownify %} {% block title %}Notes{% endblock %} {% block content %} {% for note in notes_page %} -
-

{{ note.title }}

-
{{ note.content|linebreaksbr|markdownify }}
-

Date: {{ note.created_at|date:"Y-m-d H:i" }}

-
+ {% include "note.html" %} {% empty %}

No notes

{% endfor %} -