From 3bc5d1c24ec854aa22d599eac4c279e8fe143d0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= <tlovinator@gmail.com>
Date: Sat, 14 Jan 2023 13:21:06 +0100
Subject: [PATCH] Update feed page

Only show summary, content if not available
Only show author if not None
---
 discord_rss_bot/templates/feed.html | 35 ++++++++++++++---------------
 1 file changed, 17 insertions(+), 18 deletions(-)

diff --git a/discord_rss_bot/templates/feed.html b/discord_rss_bot/templates/feed.html
index 4312b59..f2940b0 100644
--- a/discord_rss_bot/templates/feed.html
+++ b/discord_rss_bot/templates/feed.html
@@ -43,28 +43,27 @@
                     {{ entry.title }}
                 </a>
             </h2>
-            By {{ entry.author }}
+            {% if entry.author %}
+                By {{ entry.author }} @ 
+            {% endif %}
             {% if entry.published %}
-                @ {{ entry.published.strftime('%Y-%m-%d, %T') }}
+                {{ entry.published.strftime('%Y-%m-%d, %T') }}
             {% endif %}
 
-            {# TODO: Only show one if both are the same #}
-            {% if entry.summary %}
-                <details>
-                    <summary>Summary</summary>
-                    <div class="text-muted text-wrap summary">
-                        {{ entry.summary | discord_markdown }}
-                    </div>
-                </details>
-            {% endif %}
-            {% if entry.content %}
-                <details>
-                    <summary>Content</summary>
-                    <div class="text-muted summary">
-                        {{ entry.content[0].value | discord_markdown }}
-                    </div>
-                </details>
+            {% if entry.summary%}
+                <div class="text-muted">
+                    {{ entry.summary | discord_markdown }}
+                </div>
+            {% elif entry.content[0].value %}
+                <div class="text-muted">
+                    {{ entry.content[0].value | discord_markdown }}
+                </div>
+            {% else %}
+                <div class="text-muted">
+                    No content available.
+                </div>
             {% endif %}
+
         </div>
     {% endfor %}
 {% endblock %}