diff --git a/files/classes/submission.py b/files/classes/submission.py index 8704d471f..9bc798b5d 100755 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -230,11 +230,11 @@ class Submission(Base): @property @lazy def thumb_url(self): - if self.over_18: return f"https://{site}/assets/images/nsfw.webp" - elif not self.url: return f"https://{site}/assets/images/{site_name}/default_thumb_text.webp" + if self.over_18: return f"https://{site}/assets/images/nsfw.gif" + elif not self.url: return f"https://{site}/assets/images/{site_name}/default_thumb_text.gif" elif self.thumburl: return self.thumburl - elif "youtu.be" in self.domain or "youtube.com" in self.domain: return f"https://{site}/assets/images/default_thumb_yt.webp" - else: return f"https://{site}/assets/images/default_thumb_link.webp" + elif "youtu.be" in self.domain or "youtube.com" in self.domain: return f"https://{site}/assets/images/default_thumb_yt.gif" + else: return f"https://{site}/assets/images/default_thumb_link.gif" @property @lazy diff --git a/files/classes/user.py b/files/classes/user.py index 6dbc0e11b..3d99124a1 100755 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -423,14 +423,14 @@ class User(Base): @lazy def banner_url(self): if self.bannerurl: return self.bannerurl - else: return f"https://{site}/assets/images/{site_name}/preview.webp" + else: return f"https://{site}/assets/images/{site_name}/preview.gif" @property @lazy def profile_url(self): if self.profileurl: return self.profileurl - elif "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp" - else: return f"https://{site}/assets/images/default-profile-pic.webp" + elif "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.gif" + else: return f"https://{site}/assets/images/default-profile-pic.gif" @property @lazy diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index e2bac6d7f..3e239c88d 100755 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -121,7 +121,7 @@ def sanitize(sanitized, noimages=False): tag["class"] = "in-comment-image" tag["loading"] = "lazy" tag["data-src"] = tag["src"] - tag["src"] = "/assets/images/loading.webp" + tag["src"] = "/assets/images/loading.gif" link = soup.new_tag("a") link["href"] = tag["data-src"] @@ -201,22 +201,22 @@ def sanitize(sanitized, noimages=False): for i in re.finditer('" target="_blank">(https://youtube.com/watch\?v\=.*?)', sanitized): url = i.group(1) replacing = f'{url}' - htmlsource = f'' + htmlsource = f'' sanitized = sanitized.replace(replacing, htmlsource.replace("watch?v=", "embed/")) for i in re.finditer('{url}' - htmlsource = f'' + htmlsource = f'' sanitized = sanitized.replace(replacing, htmlsource) for i in re.finditer('

(https:.*?\.mp4)

', sanitized): - sanitized = sanitized.replace(i.group(0), f'

') + sanitized = sanitized.replace(i.group(0), f'

') for i in re.finditer('{url}' - htmlsource = f'' + htmlsource = f'' sanitized = sanitized.replace(replacing, htmlsource) for rd in ["https://reddit.com/", "https://new.reddit.com/", "https://www.reddit.com/", "https://redd.it/"]: diff --git a/files/routes/static.py b/files/routes/static.py index 0e5d6f1df..1ff5517c8 100755 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -207,7 +207,7 @@ def log_item(id, v): @app.get("/assets/favicon.ico") def favicon(): - return send_file(f"./assets/images/{site_name}/icon.webp") + return send_file(f"./assets/images/{site_name}/icon.gif") @app.get("/api") @auth_desired diff --git a/files/templates/api.html b/files/templates/api.html index 46af4d1e2..925c9c228 100755 --- a/files/templates/api.html +++ b/files/templates/api.html @@ -6,7 +6,7 @@ {% endblock %} {% block content %} - +

 
diff --git a/files/templates/authforms.html b/files/templates/authforms.html
index 9b5609d22..b62eae0ff 100755
--- a/files/templates/authforms.html
+++ b/files/templates/authforms.html
@@ -91,7 +91,7 @@
 
 										
- + diff --git a/files/templates/comments.html b/files/templates/comments.html index 80e58fccd..c4b175413 100755 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -229,7 +229,7 @@ {% endif %} {{c.author.username}} - {% if c.author.customtitle %}  {% if c.author.quadrant %}{% endif %}{{c.author.customtitle | safe}}{% endif %} + {% if c.author.customtitle %}  {% if c.author.quadrant %}{% endif %}{{c.author.customtitle | safe}}{% endif %} {% if c.parent_comment_id and not standalone and level<=7 %}{{ c.parent_comment.author.username }}{% endif %} diff --git a/files/templates/default.html b/files/templates/default.html index 7e321223f..2ce8585e3 100755 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -41,14 +41,14 @@ this.bug&&this.bug.style?{top:parseInt(this.bug.top,10),left:parseInt(this.bug.left,10)}:null}},SpawnBug=function(){var a={},b;for(b in Bug)Bug.hasOwnProperty(b)&&(a[b]=Bug[b]);return a},mergeOptions=function(a,b,c){"undefined"==typeof c&&(c=!0);a=c?cloneOf(a):a;for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);return a},cloneOf=function(a){if(null==a||"object"!=typeof a)return a;var b=a.constructor(),c;for(c in a)a.hasOwnProperty(c)&&(b[c]=cloneOf(a[c]));return b}; window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a,b){window.setTimeout(a,1E3/60)}}(); new BugController({ - imageSprite: "/assets/images/fly-sprite.webp", + imageSprite: "/assets/images/fly-sprite.gif", canDie: false, minBugs: 5, maxBugs: 30, mouseOver: "fly" }); new SpiderController({ - imageSprite: "/assets/images/spider-sprite.webp", + imageSprite: "/assets/images/spider-sprite.gif", canDie: false, minBugs: 2, maxBugs: 20, @@ -76,16 +76,16 @@ - + - + {% block title %} {{'SITE_NAME' | app_config}} - + @@ -96,7 +96,7 @@ - + {% endblock %} @@ -105,12 +105,12 @@ - - + + - - + + @@ -122,127 +122,127 @@ @@ -270,7 +270,7 @@ {% if '@' not in request.path %} - + {% endif %} diff --git a/files/templates/header.html b/files/templates/header.html index 7ab84dba3..f1302f898 100755 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -10,11 +10,11 @@
diff --git a/files/templates/login.html b/files/templates/login.html index 3c027a6c1..6286763f7 100755 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -107,7 +107,7 @@
- +
diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 1ebce967e..eaea03db2 100755 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -92,7 +92,7 @@
- + diff --git a/files/templates/message_success.html b/files/templates/message_success.html index 9d53df323..23d8da45c 100755 --- a/files/templates/message_success.html +++ b/files/templates/message_success.html @@ -9,7 +9,7 @@ {% block content %}
- success state + success state
{{title}}

{{text}}

diff --git a/files/templates/patrons.html b/files/templates/patrons.html index 5da6f0e04..c5ee7a426 100755 --- a/files/templates/patrons.html +++ b/files/templates/patrons.html @@ -15,7 +15,7 @@ {{loop.index}} {{row['username']}} - + {% for (a,count) in row['awards'].values() %} diff --git a/files/templates/settings.html b/files/templates/settings.html index d0ae4c64a..3a25e68a0 100755 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -32,13 +32,13 @@ - + {% block pagetitle %}Settings - {{'SITE_NAME' | app_config}}{% endblock %} - + @@ -49,7 +49,7 @@ - + diff --git a/files/templates/settings2.html b/files/templates/settings2.html index 0f2e81696..2391a9837 100755 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -11,13 +11,13 @@ - - + + - + @@ -28,7 +28,7 @@ - + diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 80cfc8996..083bcb58a 100755 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -17,7 +17,7 @@ - + @@ -28,7 +28,7 @@ - + {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} @@ -154,7 +154,7 @@
- +
diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index d03364e67..13c31333f 100755 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -12,7 +12,7 @@ - + @@ -23,7 +23,7 @@ - + {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} @@ -83,7 +83,7 @@
- + diff --git a/files/templates/submission.html b/files/templates/submission.html index cc188a0f5..ca3287d6f 100755 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -70,7 +70,7 @@ {% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") < 3 else 40 %}