From 4e18f2ead3e9c7f32257609ed6a9662d6d827857 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 13 Sep 2021 17:58:52 +0200 Subject: [PATCH] re --- files/classes/submission.py | 10 ++-- files/classes/user.py | 6 +- files/helpers/images.py | 64 +++----------------- files/helpers/jinja2.py | 2 +- files/helpers/sanitize.py | 8 +-- files/routes/comments.py | 4 +- files/routes/posts.py | 8 +-- files/routes/reporting.py | 8 +-- files/routes/settings.py | 8 +-- files/routes/static.py | 4 +- files/templates/authforms.html | 2 +- files/templates/comments.html | 2 +- files/templates/default.html | 80 ++++++++++++------------- files/templates/errors/400.html | 2 +- files/templates/errors/401.html | 2 +- files/templates/errors/403.html | 2 +- files/templates/errors/404.html | 2 +- files/templates/errors/405.html | 2 +- files/templates/errors/409.html | 2 +- files/templates/errors/410.html | 2 +- files/templates/errors/413.html | 2 +- files/templates/errors/418.html | 2 +- files/templates/errors/422.html | 2 +- files/templates/errors/429.html | 2 +- files/templates/errors/451.html | 2 +- files/templates/errors/500.html | 2 +- files/templates/errors/502.html | 14 ++--- files/templates/errors/503.html | 6 +- files/templates/errors/nsfw.html | 2 +- files/templates/errors/patron.html | 2 +- files/templates/formatting.html | 2 +- files/templates/header.html | 4 +- files/templates/login.html | 2 +- files/templates/login_2fa.html | 2 +- files/templates/message_success.html | 2 +- files/templates/patrons.html | 2 +- files/templates/settings.html | 6 +- files/templates/settings2.html | 8 +-- files/templates/settings_profile.html | 60 +++++++++---------- files/templates/sign_up.html | 6 +- files/templates/sign_up_failed_ref.html | 6 +- files/templates/submission.html | 12 ++-- files/templates/submission_listing.html | 4 +- files/templates/submit.html | 6 +- files/templates/userpage.html | 4 +- seed-db.sql | 50 ++++++++-------- 46 files changed, 193 insertions(+), 239 deletions(-) diff --git a/files/classes/submission.py b/files/classes/submission.py index 5ab7afaeb..4cb9fb630 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -209,11 +209,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.gif" - elif not self.url: return f"https://{site}/assets/images/{site_name}/default_thumb_text.gif" + 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" 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.gif" - else: return f"https://{site}/assets/images/default_thumb_link.gif" + 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" @property @@ -411,7 +411,7 @@ class Submission(Base, Stndrd, Age_times, Scores, Fuzzing): @property def is_image(self): - if self.url: return self.url.lower().endswith('.jpg') or self.url.lower().endswith('.png') or self.url.lower().endswith('.gif') or self.url.lower().endswith('.jpeg') or self.url.lower().endswith('?maxwidth=9999') + if self.url: return self.url.lower().endswith('.webp') or self.url.lower().endswith('.jpg') or self.url.lower().endswith('.png') or self.url.lower().endswith('.gif') or self.url.lower().endswith('.jpeg') or self.url.lower().endswith('?maxwidth=9999') else: return False @property diff --git a/files/classes/user.py b/files/classes/user.py index 18a5e0c1d..cb9e054bd 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -448,18 +448,18 @@ class User(Base, Stndrd, Age_times): @property def banner_url(self): if self.bannerurl: return self.bannerurl - else: return f"https://{site}/assets/images/{site_name}/preview.gif" + else: return f"https://{site}/assets/images/{site_name}/preview.webp" @cache.memoize(timeout=86400) def defaultpicture(self): pic = random.randint(1, 150) - return f"https://{site}/assets/images/defaultpictures/{pic}.gif" + return f"https://{site}/assets/images/defaultpictures/{pic}.webp" @property def profile_url(self): if self.profileurl: return self.profileurl elif "rdrama" in site: return self.defaultpicture() - else: return f"https://{site}/assets/images/default-profile-pic.gif" + else: return f"https://{site}/assets/images/default-profile-pic.webp" @property def json_raw(self): diff --git a/files/helpers/images.py b/files/helpers/images.py index f7a9f3c45..3af5f6ad8 100644 --- a/files/helpers/images.py +++ b/files/helpers/images.py @@ -11,7 +11,7 @@ CF_ZONE = environ.get("CLOUDFLARE_ZONE", "").strip() IMGUR_KEY = environ.get("IMGUR_KEY", "").strip() IBB_KEY = environ.get("IBB_KEY", "").strip() -def upload_ibb(filepath=None, file=None, resize=False): +def upload(ibb=False, filepath=None, file=None, resize=False): if file: format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png') @@ -47,66 +47,20 @@ def upload_ibb(filepath=None, file=None, resize=False): try: with open(filepath, 'rb') as f: data={'image': base64.b64encode(f.read())} - req = requests.post(f'https://api.imgbb.com/1/upload?key={IBB_KEY}', data=data) + if ibb: req = requests.post(f'https://api.imgbb.com/1/upload?key={IBB_KEY}', data=data) + else: req = requests.post('https://api.imgur.com/3/upload.json', headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}, data=data) resp = req.json()['data'] - url = resp['url'] + if ibb: url = resp['url'] + else: url = resp['link'] + url = url.replace(".png", ".webp").replace(".jpg", ".webp").replace(".jpeg", ".webp") except Exception as e: print(e) print(req.text) return - return url - - -def upload_imgur(filepath=None, file=None, resize=False): - - if file: - format = file.filename.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png') - filepath = f"image.{format}" - file.save(filepath) - else: format = filepath.split('.')[-1].lower().replace('jpg','png').replace('jpeg','png') - - if resize: - i = IImage.open(filepath) - size = 100, 100 - frames = ImageSequence.Iterator(i) - - def thumbnails(frames): - for frame in frames: - thumbnail = frame.copy() - thumbnail.thumbnail(size, IImage.ANTIALIAS) - yield thumbnail - - frames = thumbnails(frames) - - om = next(frames) - om.info = i.info - filepath = f"image.{i.format}".lower().replace('jpg','png').replace('jpeg','png') - try: om.save(filepath, save_all=True, append_images=list(frames), loop=0, optimize=True, quality=30) - except Exception as e: - print(e) - return - elif format != "gif": - i = IImage.open(filepath) - filepath = f"image.{i.format}".lower().replace('jpg','png').replace('jpeg','png') - i.save(filepath, optimize=True, quality=30) - - try: - with open(filepath, 'rb') as f: - data={'image': base64.b64encode(f.read())} - req = requests.post('https://api.imgur.com/3/upload.json', headers = {"Authorization": f"Client-ID {IMGUR_KEY}"}, data=data) - resp = req.json()['data'] - url = resp['link'] - if not "_d." in url: - url = url.replace(".png", "_d.png").replace(".jpg", "_d.jpg").replace(".jpeg", "_d.jpeg") - if "_d." in url: url += "?maxwidth=9999" - except Exception as e: - print(e) - print(req.text) - return - - new_image = Image(text=url, deletehash=resp["deletehash"]) - g.db.add(new_image) + if not ibb: + new_image = Image(text=url, deletehash=resp["deletehash"]) + g.db.add(new_image) return url diff --git a/files/helpers/jinja2.py b/files/helpers/jinja2.py index 414c091e1..1194a84e9 100644 --- a/files/helpers/jinja2.py +++ b/files/helpers/jinja2.py @@ -27,7 +27,7 @@ def favorite_emojis(x): str = "" emojis = sorted(x.items(), key=lambda x: x[1], reverse=True)[:25] for k, v in emojis: - str += f'' + str += f'' return str @app.context_processor diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 3044f4e1e..e1503f83c 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -219,8 +219,8 @@ def sanitize(sanitized, noimages=False): for i in re.finditer('

:([^ ]{1,30}?):

', sanitized): emoji = i.group(1).lower() - if path.isfile(f'./files/assets/images/emojis/{emoji}.gif'): - sanitized = sanitized.replace(f'

:{emoji}:

', f'

') + if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): + sanitized = sanitized.replace(f'

:{emoji}:

', f'

') try: if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1 @@ -230,8 +230,8 @@ def sanitize(sanitized, noimages=False): for i in re.finditer(':([^ ]{1,30}?):', sanitized): emoji = i.group(1).lower() - if path.isfile(f'./files/assets/images/emojis/{emoji}.gif'): - sanitized = sanitized.replace(f':{emoji}:', f'') + if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): + sanitized = sanitized.replace(f':{emoji}:', f'') try: if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1 diff --git a/files/routes/comments.py b/files/routes/comments.py index 52d0ac47d..cb12993ab 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -289,7 +289,7 @@ def api_comment(v): abort(413) if 'pcmemes.net' in request.host: url = upload_ibb(file=file) - else: url = upload_imgur(file=file) + else: url = upload(file=file) body = request.form.get("body") + f"\n![]({url})" body = body.replace("\n", "\n\n").replace("\n\n\n\n\n\n", "\n\n").replace("\n\n\n\n", "\n\n").replace("\n\n\n", "\n\n") @@ -703,7 +703,7 @@ def edit_comment(cid, v): abort(413) if 'pcmemes.net' in request.host: url = upload_ibb(file=file) - else: url = upload_imgur(file=file) + else: url = upload(file=file) body += f"\n![]({url})" body_md = CustomRenderer().render(mistletoe.Document(body)) diff --git a/files/routes/posts.py b/files/routes/posts.py index 7ab5d1a5c..8a62fded6 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -528,7 +528,7 @@ def thumbs(new_post): file.write(chunk) if 'pcmemes.net' in request.host: post.thumburl = upload_ibb(filepath="image.png", resize=True) - else: post.thumburl = upload_imgur(filepath="image.png", resize=True) + else: post.thumburl = upload(filepath="image.png", resize=True) g.db.add(post) @@ -546,8 +546,8 @@ def filter_title(title): title = bleach.clean(title, tags=[]) for i in re.finditer(':(.{1,30}?):', title): - if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'): - title = title.replace(f':{i.group(1)}:', f'') + if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'): + title = title.replace(f':{i.group(1)}:', f'') return title @@ -915,7 +915,7 @@ def submit_post(v): if file.content_type.startswith('image/'): if 'pcmemes.net' in request.host: new_post.url = upload_ibb(file=file) - else: new_post.url = upload_imgur(file=file) + else: new_post.url = upload(file=file) else: try: post_url = upload_video(file) diff --git a/files/routes/reporting.py b/files/routes/reporting.py index 95349aa18..efdb6918a 100644 --- a/files/routes/reporting.py +++ b/files/routes/reporting.py @@ -20,8 +20,8 @@ def api_flag_post(pid, v): if "<" in reason: return {"error": f"Reasons can't contain <"} for i in re.finditer(':(.{1,30}?):', reason): - if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'): - reason = reason.replace(f':{i.group(1)}:', f'') + if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'): + reason = reason.replace(f':{i.group(1)}:', f'') flag = Flag(post_id=post.id, user_id=v.id, @@ -49,8 +49,8 @@ def api_flag_comment(cid, v): if "<" in reason: return {"error": f"Reasons can't contain <"} for i in re.finditer(':(.{1,30}?):', reason): - if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'): - reason = reason.replace(f':{i.group(1)}:', f'') + if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.webp'): + reason = reason.replace(f':{i.group(1)}:', f'') flag = CommentFlag(comment_id=comment.id, user_id=v.id, diff --git a/files/routes/settings.py b/files/routes/settings.py index 08d262cf4..65e01e2ee 100644 --- a/files/routes/settings.py +++ b/files/routes/settings.py @@ -118,7 +118,7 @@ def settings_profile_post(v): else: return render_template("settings_profile.html", v=v, error=f"Image files only."), 400 if 'pcmemes.net' in request.host: url = upload_ibb(file=file) - else: url = upload_imgur(file=file) + else: url = upload(file=file) bio += f"\n\n![]({url})" @@ -506,11 +506,11 @@ def settings_images_profile(v): file.save(filepath) if 'pcmemes.net' in request.host: highres = upload_ibb(filepath=filepath) - else: highres = upload_imgur(filepath=filepath) + else: highres = upload(filepath=filepath) if not highres: abort(400) if 'pcmemes.net' in request.host: imageurl = upload_ibb(filepath=filepath, resize=True) - else: imageurl = upload_imgur(filepath=filepath, resize=True) + else: imageurl = upload(filepath=filepath, resize=True) if not imageurl: abort(400) v.highres = highres @@ -532,7 +532,7 @@ def settings_images_banner(v): file = request.files["banner"] if 'pcmemes.net' in request.host: imageurl = upload_ibb(file=file) - else: imageurl = upload_imgur(file=file) + else: imageurl = upload(file=file) if imageurl: v.bannerurl = imageurl diff --git a/files/routes/static.py b/files/routes/static.py index 1d448394e..fdf3bf4e1 100644 --- a/files/routes/static.py +++ b/files/routes/static.py @@ -137,7 +137,7 @@ def index(): @app.get("/assets/favicon.ico") def favicon(): - return send_file(f"./assets/images/{site_name}/icon.gif") + return send_file(f"./assets/images/{site_name}/icon.webp") @app.get("/api") @auth_desired @@ -173,7 +173,7 @@ def archives(path): @limiter.exempt def static_service(path): resp = make_response(send_from_directory('./assets', path)) - if request.path.endswith('.gif') or request.path.endswith('.ttf') or request.path.endswith('.woff') or request.path.endswith('.woff2'): + if request.path.endswith('.webp') or request.path.endswith('.gif') or request.path.endswith('.ttf') or request.path.endswith('.woff') or request.path.endswith('.woff2'): resp.headers.remove("Cache-Control") resp.headers.add("Cache-Control", "public, max-age=2628000") diff --git a/files/templates/authforms.html b/files/templates/authforms.html index a013cf446..325104376 100644 --- a/files/templates/authforms.html +++ b/files/templates/authforms.html @@ -102,7 +102,7 @@

- + diff --git a/files/templates/comments.html b/files/templates/comments.html index 95184ce78..597051020 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -141,7 +141,7 @@ {% if c.author.verified %} {% endif %} - {{c.author.username}}{% if c.author.customtitle %}  {% if c.author.quadrant %}{% endif %}{{c.author.customtitle | safe}}{% endif %} + {{c.author.username}}{% if c.author.customtitle %}  {% if c.author.quadrant %}{% endif %}{{c.author.customtitle | safe}}{% endif %}  {{c.age_string}} {% if c.edited_utc %} diff --git a/files/templates/default.html b/files/templates/default.html index e498b405c..e4e133b92 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.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); + var BugDispatch={options:{minDelay:500,maxDelay:1E4,minBugs:2,maxBugs:20,minSpeed:5,maxSpeed:10,maxLargeTurnDeg:150,maxSmallTurnDeg:10,maxWiggleDeg:5,imageSprite:"fly-sprite.webp",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 %} @@ -51,7 +51,7 @@
- +

 

502 Bad Gateway

Don't go this way, stranger. The gate is closed, and the guards are saying:

diff --git a/files/templates/errors/503.html b/files/templates/errors/503.html index ab72df5ee..77bceeaf7 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"> - + @@ -69,7 +69,7 @@
- +

 				

503 Service Unavailable

diff --git a/files/templates/errors/nsfw.html b/files/templates/errors/nsfw.html index 84faf73b1..0f5a836d6 100644 --- a/files/templates/errors/nsfw.html +++ b/files/templates/errors/nsfw.html @@ -10,7 +10,7 @@
- +

Are you over 18?

This post is rated +18 (Adult-Only). You must be 18 or older to continue. Are you sure you want to proceed?

diff --git a/files/templates/errors/patron.html b/files/templates/errors/patron.html index 4623f4ff5..2fa38c45f 100644 --- a/files/templates/errors/patron.html +++ b/files/templates/errors/patron.html @@ -10,7 +10,7 @@
- +

401 Not Authorized

This page is only available to {% if "rdrama" in request.host %}paypigs{% else %}patrons{% endif %}:

{{'GUMROAD_LINK' | app_config}} diff --git a/files/templates/formatting.html b/files/templates/formatting.html index 538b3326f..7bfb4257e 100644 --- a/files/templates/formatting.html +++ b/files/templates/formatting.html @@ -55,7 +55,7 @@ On {{'SITE_NAME' | app_config}}, you can use Markdown formatting. Emojis :marseylove: - + diff --git a/files/templates/header.html b/files/templates/header.html index e4d17f915..4788374e8 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -10,13 +10,13 @@
diff --git a/files/templates/login.html b/files/templates/login.html index 6f81e60ac..612eb0dbd 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 4e725c290..1c1cc97c4 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 d2d9b2d03..ede280eee 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/patrons.html b/files/templates/patrons.html index 04312f338..b87c23d58 100644 --- 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 007ab387c..412a53635 100644 --- a/files/templates/settings.html +++ b/files/templates/settings.html @@ -47,13 +47,13 @@ - + {% 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 aa0ceb07d..6017069c3 100644 --- a/files/templates/settings2.html +++ b/files/templates/settings2.html @@ -8,13 +8,13 @@ - - + + - + @@ -25,7 +25,7 @@ - + diff --git a/files/templates/settings_profile.html b/files/templates/settings_profile.html index 4a36c2e64..4ac6bbebe 100644 --- a/files/templates/settings_profile.html +++ b/files/templates/settings_profile.html @@ -169,48 +169,48 @@ folder: "fantasy", backgrounds: [ - "1.gif", - "2.gif", - "3.gif", - "4.gif", - "5.gif", - "6.gif", + "1.webp", + "2.webp", + "3.webp", + "4.webp", + "5.webp", + "6.webp", ] }, { folder: "solarpunk", backgrounds: [ - "1.gif", - "2.gif", - "3.gif", - "4.gif", - "5.gif", - "6.gif", - "7.gif", - "8.gif", - "9.gif", - "10.gif", - "11.gif", - "12.gif", - "13.gif", - "14.gif", - "15.gif", - "16.gif", - "17.gif", - "18.gif", - "19.gif", + "1.webp", + "2.webp", + "3.webp", + "4.webp", + "5.webp", + "6.webp", + "7.webp", + "8.webp", + "9.webp", + "10.webp", + "11.webp", + "12.webp", + "13.webp", + "14.webp", + "15.webp", + "16.webp", + "17.webp", + "18.webp", + "19.webp", ] }, { folder: "pixelart", backgrounds: [ - "1.gif", - "2.gif", - "3.gif", - "4.gif", - "5.gif", + "1.webp", + "2.webp", + "3.webp", + "4.webp", + "5.webp", ] } ] diff --git a/files/templates/sign_up.html b/files/templates/sign_up.html index 12f49a3d7..2b2eaeda4 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 %} @@ -223,7 +223,7 @@
- +
diff --git a/files/templates/sign_up_failed_ref.html b/files/templates/sign_up_failed_ref.html index f417fef55..a26b5882a 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 6b3a80161..26370c782 100644 --- a/files/templates/submission.html +++ b/files/templates/submission.html @@ -35,7 +35,7 @@ - + {% if p.is_video %} {% endif %} @@ -47,7 +47,7 @@ - + {% if linked_comment.author.is_private %} @@ -64,7 +64,7 @@ - + {% if p.is_video %} {% endif %} @@ -76,7 +76,7 @@ - + {% if p.author.is_private %} @@ -194,7 +194,7 @@ {% set maxbugs = 20*p.award_count("shit") if p.award_count("shit") <= 5 else 100 %}