From 82bf97491de3086cf0a28d1211a305d440127731 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Wed, 18 Jan 2023 22:56:43 +0100 Subject: [PATCH] Fix whitespace in HTML --- discord_rss_bot/templates/add.html | 2 +- discord_rss_bot/templates/blacklist.html | 6 +++--- discord_rss_bot/templates/custom.html | 9 +++++---- discord_rss_bot/templates/index.html | 2 +- discord_rss_bot/templates/search.html | 4 ++-- discord_rss_bot/templates/webhooks.html | 2 +- discord_rss_bot/templates/whitelist.html | 12 +++++++++--- 7 files changed, 22 insertions(+), 15 deletions(-) diff --git a/discord_rss_bot/templates/add.html b/discord_rss_bot/templates/add.html index 1531fc9..d01665c 100644 --- a/discord_rss_bot/templates/add.html +++ b/discord_rss_bot/templates/add.html @@ -28,7 +28,7 @@ {% for hook in webhooks %} {% endfor %} diff --git a/discord_rss_bot/templates/blacklist.html b/discord_rss_bot/templates/blacklist.html index 349fc44..4e4893e 100644 --- a/discord_rss_bot/templates/blacklist.html +++ b/discord_rss_bot/templates/blacklist.html @@ -36,7 +36,7 @@ class="form-control bg-dark border-dark text-muted" id="blacklist_title" value="{% if blacklist_title %} - {{ blacklist_title }} + {{- blacklist_title -}} {% endif %}"/> diff --git a/discord_rss_bot/templates/custom.html b/discord_rss_bot/templates/custom.html index 91926b0..f5c7517 100644 --- a/discord_rss_bot/templates/custom.html +++ b/discord_rss_bot/templates/custom.html @@ -210,7 +210,7 @@
  • {% raw %} - Hello {{ entry_author }}\n{{ feed_title }}\n{{ entry_read -}} + Hello {{ entry_author }}\n{{ feed_title }}\n{{ entry_read }} {% endraw %}
  • @@ -221,7 +221,7 @@
     Hello {{ entry.author }}
     {{ feed.title }}
    -{{ entry.read -}}
    +{{ entry.read }}
                                 
    @@ -235,8 +235,9 @@ Hello {{ entry.author }} type="text" class="form-control bg-dark border-dark text-muted" id="custom_message" - value="{% if custom_message -%} - {{ custom_message }}{%- endif %}"/> + value="{% if custom_message %} + {{- custom_message -}} + {% endif %}"/> diff --git a/discord_rss_bot/templates/index.html b/discord_rss_bot/templates/index.html index a746d9a..25faccb 100644 --- a/discord_rss_bot/templates/index.html +++ b/discord_rss_bot/templates/index.html @@ -22,7 +22,7 @@ {% else %} - {% endif %} - {{ feed_count.updates_enabled }} enabled + {{- feed_count.updates_enabled -}} enabled - {{ entry_count.total }} entries diff --git a/discord_rss_bot/templates/search.html b/discord_rss_bot/templates/search.html index 0694a55..cc04cae 100644 --- a/discord_rss_bot/templates/search.html +++ b/discord_rss_bot/templates/search.html @@ -4,7 +4,7 @@ {% endblock title %} {% block content %}
    - Your search for "{{ query }}" returned {{ search_amount.total }} results. + Your search for "{{- query -}}" returned {{- search_amount.total -}} results.
    - {{ search_html | safe }} + {{- search_html | safe -}} {% endblock content %} diff --git a/discord_rss_bot/templates/webhooks.html b/discord_rss_bot/templates/webhooks.html index 479e40a..f4f2514 100644 --- a/discord_rss_bot/templates/webhooks.html +++ b/discord_rss_bot/templates/webhooks.html @@ -24,7 +24,7 @@ type="text" class="form-control bg-dark border-dark text-muted" id="webhook_url" - placeholder="https://discord.com/api/webhooks/1011224189471124054/CQMa4hJN4gz..."/> + placeholder="https://discord.com/api/webhooks/1011224189471124054/CQMa4hJN4gz"/> {# Submit button #} diff --git a/discord_rss_bot/templates/whitelist.html b/discord_rss_bot/templates/whitelist.html index f102ee9..7cf52eb 100644 --- a/discord_rss_bot/templates/whitelist.html +++ b/discord_rss_bot/templates/whitelist.html @@ -35,19 +35,25 @@ type="text" class="form-control bg-dark border-dark text-muted" id="whitelist_title" - value="{% if whitelist_title %} {{ whitelist_title }}{% endif %}"/> + value="{% if whitelist_title %} + {{- whitelist_title -}} + {% endif %}"/> + value="{% if whitelist_summary %} + {{- whitelist_summary -}} + {% endif %}"/>