From 129dfdd7c85b7f84b1e4824d3018d06a8dc41f9e Mon Sep 17 00:00:00 2001 From: c0de Date: Fri, 29 Dec 2023 18:34:55 -0600 Subject: [PATCH] format the html --- templates/card.html | 121 +++++++++++++++++++------------------------- 1 file changed, 52 insertions(+), 69 deletions(-) diff --git a/templates/card.html b/templates/card.html index 5b60734..0d4f792 100644 --- a/templates/card.html +++ b/templates/card.html @@ -1,75 +1,58 @@ -
-
- {% if this.title and this.title|length >= 1 and not this.headline %} -
- {{ this.title }} - - - -
- {% endif %} +
- {{ this.alt_text if this.alt_text else this.title }} +{% if this.headline and this.headline|length >= 1 and not this.title %} +
- {% if this.description and this.description|length >= 1 %} -
- {% if this.headline and this.headline|length >= 1 %} -
{{ this.headline }}
- - - - {% endif %} -

{{ this.description }}

-
- {% endif %} + {{ this.headline }} - {% if this.reactions and gallery.max_reactions_per_card|int >= 1 %} - - {% endif %} + {% if gallery.reactions_enabled|default(False) %} + + + + {% endif %}
+{% endif %} + + {{ this.alt_text if this.alt_text else this.title }} + +{% if this.description and this.description|length >= 1 %} +
+ + {% if this.title and this.title|length >= 1 %} +
{{ this.title }}
+ + {% if this.subtitle and this.subtitle|length >= 1 %} +
{{ this.subtitle }}
+ {% endif %} + + {% if gallery.reactions_enabled|default(False) %} + + + + {% endif %} + {% endif %} + +

{{ this.description }}

+ + {% if this.subtext and this.subtext|length >= 1 %} +

+ + {{ this.subtext }} + +

+ {% endif %} + +
+{% endif %} + +{# Don't render reaction section if disabled or max reactions are zero (or less) #} +{% if gallery.reactions_enabled|default(False) or gallery.max_reactions_per_card|int <= 0 %} + {% include 'card_reaction_section.html' %} +{% endif %} +