From 92852cd423a1e481251a4add8c67e33de19e9153 Mon Sep 17 00:00:00 2001
From: DokterKaj <54882101+DokterKaj@users.noreply.github.com>
Date: Mon, 14 Oct 2024 14:55:21 +0800
Subject: [PATCH] revert to old if-else structure
---
templates/utils.html | 46 ++++++++++++++++++++++++--------------------
1 file changed, 25 insertions(+), 21 deletions(-)
diff --git a/templates/utils.html b/templates/utils.html
index 61548f8..2355228 100644
--- a/templates/utils.html
+++ b/templates/utils.html
@@ -99,9 +99,8 @@
- {% if post.post_type == "image" || post.post_type == "video" || post.post_type == "gif" %}
+ {% if post.post_type == "image" %}
{% for image in post.gallery -%}
@@ -246,9 +248,8 @@
{{ post.title }}{% if post.flags.nsfw %}
NSFW{% endif %}{% if post.flags.spoiler %}
Spoiler{% endif %}
- {% if (prefs.layout.is_empty() || prefs.layout == "card") && (post.post_type == "image" || post.post_type == "gif" || post.post_type == "video") %}
+ {% if (prefs.layout.is_empty() || prefs.layout == "card") && post.post_type == "image" %}
+ {% else if (prefs.layout.is_empty() || prefs.layout == "card") && (post.post_type == "gif" || post.post_type == "video") %}
+ {% if prefs.use_hls == "on" && !post.media.alt_url.is_empty() %}
+
+
- {% else %}
-
- {% call render_hls_notification(format!("{}%23{}", &self.url[1..].replace("&", "%26").replace("+", "%2B"), post.id)) %}
- {% endif %}
- {% endif %}
+ {% else %}
+
+
+
+ {% call render_hls_notification(format!("{}%23{}", &self.url[1..].replace("&", "%26").replace("+", "%2B"), post.id)) %}
+ {% endif %}
{% else if post.post_type != "self" %}