From d086df4beef6fcafb6c9d80f0965c2f54d88cea2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= <tlovinator@gmail.com>
Date: Sat, 10 Dec 2022 22:53:25 +0100
Subject: [PATCH] Improve feed page

---
 discord_rss_bot/templates/feed.html | 39 +++++++++++------------------
 1 file changed, 14 insertions(+), 25 deletions(-)

diff --git a/discord_rss_bot/templates/feed.html b/discord_rss_bot/templates/feed.html
index 186aeda..05ec466 100644
--- a/discord_rss_bot/templates/feed.html
+++ b/discord_rss_bot/templates/feed.html
@@ -1,14 +1,16 @@
 {% extends "base.html" %}
 {% block title %} | {{ feed.title }}{% endblock %}
 {% block content %}
-    <a class="text-muted text-decoration-none" href="{{ feed.link }}">
-        <h2>{{ feed.title }}
+    <h2>
+        <a class="text-muted text-decoration-none" href="{{ feed.link }}">
+            {{ feed.title }}
             {% if not feed.updates_enabled %}
                 - <span style="color: red">disabled</span>
             {% endif %}
-        </h2>
+        </a>
+    </h2>
+
 
-    </a>
     {% if feed.subtitle %}
         <small class="text-muted text-decoration-none">{{ feed.subtitle }}</small>
     {% endif %}
@@ -53,34 +55,21 @@
                 @ {{ entry.published.strftime('%Y-%m-%d, %T') }}
             {% endif %}
 
-
-            <p>
-                {# Add a button to get the summary #}
-                {% if entry.summary %}
-                    <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapse_summary_{{ loop.index }}"
-                       role="button">Summary</a>
-                {% endif %}
-
-                {# Add a button to get the content #}
-                {% if entry.content %}
-                    <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapse_content_{{ loop.index }}"
-                       role="button">Content</a>
-                {% endif %}
-            </p>
-
             {% if entry.summary %}
-                <div class="collapse" id="collapse_summary_{{ loop.index }}">
-                    <div class="card card-body text-muted border border-dark" style="background: #111111;">
+                <details>
+                    <summary>Summary</summary>
+                    <div class="text-muted text-wrap" style="max-height:450px; overflow-y: auto;">
                         {{ entry.summary | safe }}
                     </div>
-                </div>
+                </details>
             {% endif %}
             {% if entry.content %}
-                <div class="collapse" id="collapse_content_{{ loop.index }}">
-                    <div class="card card-body text-muted border border-dark" style="background: #111111;">
+                <details>
+                    <summary>Content</summary>
+                    <div class="text-muted" style="max-height:450px; overflow-y: auto;">
                         {{ entry.content[0].value | safe }}
                     </div>
-                </div>
+                </details>
             {% endif %}
         {% endfor %}
     </div>