diff --git a/articles/templates/articles/article_detail.html b/articles/templates/articles/article_detail.html new file mode 100644 index 0000000..a885c41 --- /dev/null +++ b/articles/templates/articles/article_detail.html @@ -0,0 +1,33 @@ +{% extends 'base.html' %} + +{% block content %} +
+

{{ article.title }}

+ {% if article.subtitle %} +
{{ article.subtitle }}
+ {% endif %} +

Added on the {{ article.created|date:'jS \o\f F, Y' }} + {% if article.created.date != article.updated.date %} + and updated on the {{ article.updated|date:'jS \o\f F, Y' }} + {% endif %} +

+
+ {% if article.introduction %} +

{{ article.introduction|linebreaksbr }}

+
+ {% endif %} +
+ {{ article.body_as_markdown|safe }} +
+
+
+ Posted in the {{ article.category }} category + + {% for tag in article.tags.all %} + {{ tag }}{% if tag != article.tags.last %},{% endif %} + {% endfor %} + +
+
+{% endblock %} \ No newline at end of file diff --git a/articles/templates/articles/article_list.html b/articles/templates/articles/article_list.html new file mode 100644 index 0000000..01727cb --- /dev/null +++ b/articles/templates/articles/article_list.html @@ -0,0 +1,58 @@ +{% extends 'base.html' %} + +{% block content %} +
+ {% if object_list %} + {% if category %} +

{{ category }} Articles

+ {% if category.introduction %} +
+

{{ category.introduction }}

+
+ {% endif %} + {% elif tag %} +

Articles for tag: {{ tag }}

+ {% else %} +

Recent Articles

+ {% endif %} +
+
+ {% for article in object_list %} +
+ {{ article.title }} + {% if article.subtitle %} +
{{ article.subtitle }}
+ {% endif %} + {% if article.introduction %} +
+

{{ article.introduction|linebreaksbr }}

+ {% endif %} +
+
+ + {{ article.category }} + • {{ article.created|date:'jS \o\f F, Y' }} + + + {% for tag in article.tags.all %} + {{ tag }}{% if tag != article.tags.last %}, + {% endif %} + {% endfor %} + +
+
+ {% endfor %} +
+ {% else %} +
+

Oops!

+
It looks like there are no articles for that {% if category %}category{% elif tag %} tag{% endif %} + yet.
+

(sorry not sorry)

+
+ {% endif %} + {% if page_obj.has_previous or page_obj.has_next %} + {% include 'pagination.html' %} + {% endif %} +
+{% endblock %} \ No newline at end of file diff --git a/articles/templates/articles/category_list.html b/articles/templates/articles/category_list.html new file mode 100644 index 0000000..5df0b7e --- /dev/null +++ b/articles/templates/articles/category_list.html @@ -0,0 +1,21 @@ +{% extends 'base.html' %} + +{% block content %} +
+ {% if object_list %} +

Category List

+
+ + {% endif %} +
+{% endblock %} \ No newline at end of file diff --git a/articles/templates/articles/tag_list.html b/articles/templates/articles/tag_list.html new file mode 100644 index 0000000..8f75d8a --- /dev/null +++ b/articles/templates/articles/tag_list.html @@ -0,0 +1,17 @@ +{% extends 'base.html' %} + +{% block content %} +
+ {% if object_list %} +

List of Tags

+
+ + {% endif %} +
+{% endblock %} \ No newline at end of file