From 2b295f1c5bbddce2568310d45e4bd67275814f30 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Fri, 20 Aug 2021 07:52:52 +0200 Subject: [PATCH] sneed --- files/classes/submission.py | 8 +-- files/classes/user.py | 5 +- files/routes/static.py | 2 +- files/templates/authforms.html | 2 +- files/templates/default.html | 78 ++++++++++++------------- files/templates/errors/502.html | 12 ++-- files/templates/errors/503.html | 4 +- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/message_success.html | 2 +- files/templates/seized.html | 2 +- files/templates/settings.html | 6 +- files/templates/settings2.html | 8 +-- files/templates/sign_up.html | 6 +- files/templates/sign_up_failed_ref.html | 6 +- files/templates/submission.html | 10 ++-- files/templates/submit.html | 2 +- files/templates/userpage.html | 4 +- 18 files changed, 81 insertions(+), 80 deletions(-) diff --git a/files/classes/submission.py b/files/classes/submission.py index 61b92ee8e..c31a521b8 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -203,11 +203,11 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing): @property @lazy def thumb_url(self): - if self.over_18: return f"https://{site}/assets/images/nsfw.png" - elif not self.url: return f"https://{site}/assets/images/{site_name}/default_thumb_text.png" + 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.png" - else: return f"https://{site}/assets/images/default_thumb_link.png" + 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 diff --git a/files/classes/user.py b/files/classes/user.py index acddd7005..c1e82ab19 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -470,7 +470,7 @@ class User(Base, Stndrd, Age_times): @property def banner_url(self): if self.bannerurl: return self.bannerurl - else: return f"https://{site}/assets/images/default_bg.png" + else: return f"https://{site}/assets/images/default_bg.gif" @cache.memoize() def defaultpicture(self): @@ -480,7 +480,8 @@ class User(Base, Stndrd, Age_times): @property def profile_url(self): if self.profileurl: return self.profileurl - else: return self.defaultpicture() + elif "rdrama" in site: return self.defaultpicture() + else: return f"https://{site}/assets/images/default-profile-pic.gif" @property def json_raw(self): diff --git a/files/routes/static.py b/files/routes/static.py index 4d2c6977f..568e1d993 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -98,7 +98,7 @@ def index(): @app.get("/assets/favicon.ico") def favicon(): - return send_file(f"./assets/images/{site_name}/favicon.png") + return send_file(f"./assets/images/{site_name}/favicon.gif") @app.get("/api") @auth_desired diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 2ffac7167..e6782bad2 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -102,7 +102,7 @@
- + diff --git a/files/templates/default.html b/files/templates/default.html index 178e86e7c..ba82d934b 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -11,7 +11,7 @@ Released under MIT-style license. Original Screen Bug http://screen-bug.googlecode.com/git/index.html */ - var BugDispatch={options:{minDelay:500,maxDelay:1E4,minBugs:2,maxBugs:20,minSpeed:5,maxSpeed:10,maxLargeTurnDeg:150,maxSmallTurnDeg:10,maxWiggleDeg:5,imageSprite:"fly-sprite.png",bugWidth:13,bugHeight:14,num_frames:5,zoom:10,canFly:!0,canDie:!0,numDeathTypes:3,monitorMouseMovement:!1,eventDistanceToBug:40,minTimeBetweenMultipy:1E3,mouseOver:"random"},initialize:function(a){this.options=mergeOptions(this.options,a);this.options.minBugs>this.options.maxBugs&&(this.options.minBugs=this.options.maxBugs); + var BugDispatch={options:{minDelay:500,maxDelay:1E4,minBugs:2,maxBugs:20,minSpeed:5,maxSpeed:10,maxLargeTurnDeg:150,maxSmallTurnDeg:10,maxWiggleDeg:5,imageSprite:"fly-sprite.gif",bugWidth:13,bugHeight:14,num_frames:5,zoom:10,canFly:!0,canDie:!0,numDeathTypes:3,monitorMouseMovement:!1,eventDistanceToBug:40,minTimeBetweenMultipy:1E3,mouseOver:"random"},initialize:function(a){this.options=mergeOptions(this.options,a);this.options.minBugs>this.options.maxBugs&&(this.options.minBugs=this.options.maxBugs); this.modes=["multiply","nothing"];this.options.canFly&&this.modes.push("fly","flyoff");this.options.canDie&&this.modes.push("die");-1==this.modes.indexOf(this.options.mouseOver)&&(this.options.mouseOver="random");this.transform=null;this.transforms={Moz:function(a){this.bug.style.MozTransform=a},webkit:function(a){this.bug.style.webkitTransform=a},O:function(a){this.bug.style.OTransform=a},ms:function(a){this.bug.style.msTransform=a},Khtml:function(a){this.bug.style.KhtmlTransform=a},w3c:function(a){this.bug.style.transform= a}};if("transform"in document.documentElement.style)this.transform=this.transforms.w3c;else{var b=["Moz","webkit","O","ms","Khtml"],c=0;for(c=0;cb?d=b:d - - + + 502 Bad Gateway @@ -11,17 +11,17 @@ - + - - + + - + {% if v %} diff --git a/files/templates/errors/503.html b/files/templates/errors/503.html index d3dfcd698..021be9ee6 100644 --- a/files/templates/errors/503.html +++ b/files/templates/errors/503.html @@ -7,7 +7,7 @@ - + 503 Service Unavailable @@ -18,7 +18,7 @@ integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> - + diff --git a/files/templates/login.html b/files/templates/login.html index f809b3d6a..287dbf6a3 100644 --- a/files/templates/login.html +++ b/files/templates/login.html @@ -120,7 +120,7 @@
- + diff --git a/files/templates/login_2fa.html b/files/templates/login_2fa.html index 30088fa07..60f9eddbc 100644 --- a/files/templates/login_2fa.html +++ b/files/templates/login_2fa.html @@ -106,7 +106,7 @@
- + diff --git a/files/templates/message_success.html b/files/templates/message_success.html index 29f2b4cef..290bc05ec 100644 --- 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/seized.html b/files/templates/seized.html index 4ca86fb30..05ed37dbf 100644 --- a/files/templates/seized.html +++ b/files/templates/seized.html @@ -1,7 +1,7 @@ - - + {% block pagetitle %}Settings - {{'SITE_NAME' | app_config}}{% endblock %} - + @@ -64,7 +64,7 @@ - + diff --git a/files/templates/settings2.html b/files/templates/settings2.html index cc1d05d68..850fe2ca2 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -8,13 +8,13 @@ - - + + - + @@ -25,7 +25,7 @@ - + diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index ccb9e43d4..05758782c 100644 --- a/files/templates/sign_up.html +++ b/files/templates/sign_up.html @@ -71,7 +71,7 @@ - + @@ -82,7 +82,7 @@ - + {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}Sign up - {{'SITE_NAME' | app_config}}{% endif %} @@ -215,7 +215,7 @@
- +
diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index 8a372eca4..4c3ad70e3 100644 --- a/files/templates/sign_up_failed_ref.html +++ b/files/templates/sign_up_failed_ref.html @@ -11,7 +11,7 @@ - + @@ -22,7 +22,7 @@ - + {% if ref_user %}{{ref_user.username}} invites you to {{'SITE_NAME' | app_config}}{% else %}{{'SITE_NAME' | app_config}}{% endif %} @@ -95,7 +95,7 @@
- + diff --git a/files/templates/submission.html b/files/templates/submission.html index fca6c8320..ea67d7001 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -35,7 +35,7 @@ - + @@ -44,7 +44,7 @@ - + {% if linked_comment.author.is_private %} @@ -61,7 +61,7 @@ - + @@ -70,7 +70,7 @@ - + {% if p.author.is_private %} @@ -181,7 +181,7 @@ {% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") <= 5 else 100 %}