From a168506cffc69c3f8459beba90523f241953fbc7 Mon Sep 17 00:00:00 2001 From: Wilson Gaturu Date: Fri, 22 Sep 2023 09:33:20 +0300 Subject: [PATCH] adds recent article list --- .../templates/peachjam/_article_list.html | 8 ++--- .../peachjam/_recent_article_list.html | 33 +++++++++++++++++++ .../templates/peachjam/article_detail.html | 2 +- 3 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 peachjam/templates/peachjam/_recent_article_list.html diff --git a/peachjam/templates/peachjam/_article_list.html b/peachjam/templates/peachjam/_article_list.html index 2deb37d4c..0cc2539e3 100644 --- a/peachjam/templates/peachjam/_article_list.html +++ b/peachjam/templates/peachjam/_article_list.html @@ -1,8 +1,8 @@ {% load i18n peachjam %} {% for article in articles %} -
-
-
+
+
+
{% if article.image %} {% endif %}
-
+
{{ article.title }}
diff --git a/peachjam/templates/peachjam/_recent_article_list.html b/peachjam/templates/peachjam/_recent_article_list.html new file mode 100644 index 000000000..2deb37d4c --- /dev/null +++ b/peachjam/templates/peachjam/_recent_article_list.html @@ -0,0 +1,33 @@ +{% load i18n peachjam %} +{% for article in articles %} +
+
+
+ {% if article.image %} + + {{ article.title }} + + {% endif %} +
+
+
+ {{ article.title }} +
+ + {% if article.summary %}

{{ article.summary }}

{% endif %} +
+
+
+{% endfor %} diff --git a/peachjam/templates/peachjam/article_detail.html b/peachjam/templates/peachjam/article_detail.html index cf3773870..f97e17291 100644 --- a/peachjam/templates/peachjam/article_detail.html +++ b/peachjam/templates/peachjam/article_detail.html @@ -84,7 +84,7 @@
{% if more_articles %} {% user_name article.author as username %}

{% blocktrans trimmed %}Recent articles by {{ username }}{% endblocktrans %}

- {% include 'peachjam/_article_list.html' with articles=more_articles %} + {% include 'peachjam/_recent_article_list.html' with articles=more_articles %} {% endif %}