diff --git a/files/classes/user.py b/files/classes/user.py index d7259f1f8..632ff173d 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -416,15 +416,15 @@ 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?v=200 + else: return f"https://{site}/assets/images/{site_name}/preview.webp?v=200" @property @lazy def profile_url(self): - if self.grinch: return f"https://{site}/assets/images/grinch.webp?v=200 - if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=200 + if self.grinch: return f"https://{site}/assets/images/grinch.webp?v=200" + if self.agendaposter: return f"https://{site}/assets/images/defaultpictures/agendaposter/{random.randint(1, 50)}.webp?v=200" if self.profileurl: return self.profileurl - if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=200 + if "rama" in site: return f"https://{site}/assets/images/defaultpictures/{random.randint(1, 150)}.webp?v=200" return f"https://{site}/assets/images/default-profile-pic.webp" @property diff --git a/files/routes/static.py b/files/routes/static.py index 0f2ed1834..1dc8f1594 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -212,7 +212,7 @@ def log_item(id, v): @app.get("/assets/favicon.ico") def favicon(): - return send_file(f"./assets/images/{site_name}/icon.webp?v=200) + return send_file(f"./assets/images/{site_name}/icon.webp?v=200") @app.get("/api") @auth_desired diff --git a/files/templates/admin/badge_grant.html b/files/templates/admin/badge_grant.html index 9ba7f3f17..fef488c0a 100644 --- a/files/templates/admin/badge_grant.html +++ b/files/templates/admin/badge_grant.html @@ -55,7 +55,7 @@ {% for k, v in badge_types.items() %} - + {{v['name']}} {{v['description']}} diff --git a/files/templates/authforms.html b/files/templates/authforms.html index 1b2c71ff5..f88e37230 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -14,11 +14,11 @@ {% if v %} - {% endif %} + + {% if v.agendaposter %}{% elif v.css %}{% endif %} {% else %} - {% endif %} @@ -90,7 +90,7 @@
- diff --git a/files/templates/award_modal.html b/files/templates/award_modal.html index 71a39c7dd..d418c4684 100644 --- a/files/templates/award_modal.html +++ b/files/templates/award_modal.html @@ -1,4 +1,4 @@ - diff --git a/files/templates/patrons.html b/files/templates/patrons.html index 71d587c79..79d4af8ce 100644 --- a/files/templates/patrons.html +++ b/files/templates/patrons.html @@ -14,7 +14,7 @@ {{loop.index}} {{u.username}} - {% endfor %} diff --git a/files/templates/report_post_modal.html b/files/templates/report_post_modal.html index 33ece7eb1..04653e078 100644 --- a/files/templates/report_post_modal.html +++ b/files/templates/report_post_modal.html @@ -1,4 +1,4 @@ - diff --git a/files/templates/submission.html b/files/templates/submission.html index f77de9b04..a431c71b9 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -31,7 +31,7 @@ {% if v %} - {% endif %} {% endif %} @@ -376,9 +376,9 @@ {% if p.domain == "twitter.com" %} {{p.embed_url | safe}} {% if v and v.theme.split("_")[0] in ["light", "coffee", "4chan"] %} - {% else %} - {% endif %} {% elif "youtu" in p.domain %} @@ -571,7 +571,7 @@ {% endif %} {% if offset %} - {% endif %} @@ -610,18 +610,18 @@ {% include "/submission/SubmissionAwards.html" %} {% if v %} - {% if not p.comment_count %} - {% endif %} {% endif %} {% if v and (v.id == p.author_id or v.admin_level > 1 and v.admin_level > 2) %} - {% endif %} {% if not v or v.highlightcomments %} - {% endif %} + {% set minbugs = 10*p.award_count("shit") if p.award_count("shit") < 3 else 20 %} {% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") < 3 else 40 %} + {% set minbugs = 10*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 20 %} {% set maxbugs = 20*p.award_count("fireflies") if p.award_count("fireflies") < 3 else 40 %} + {% elif p.award_count("fireplace")%} - {% else %} - {% endif %} {% endif %} {% if not v %} {% if p.award_count("snow") and p.award_count("fireplace") %} - {% elif p.award_count("fireplace")%} - {% else %} - {% endif %} {% endif %} diff --git a/files/templates/submission_listing.html b/files/templates/submission_listing.html index 9a7066692..ee46b6d2c 100644 --- a/files/templates/submission_listing.html +++ b/files/templates/submission_listing.html @@ -376,8 +376,8 @@ {% include "expanded_image_modal.html" %} - + +