From 252022854df61958b83010fd4cf897c8b8975467 Mon Sep 17 00:00:00 2001 From: Aevann Date: Wed, 21 Feb 2024 22:29:02 +0200 Subject: [PATCH] remove unnecessary () and space --- files/templates/default.html | 2 +- files/templates/events/fistmas/banner.html | 2 +- files/templates/events/homoween/banner.html | 2 +- files/templates/events/homoween/banner.svg | 2 +- files/templates/events/homoween/eye_tracking.html | 2 +- files/templates/header.html | 2 +- files/templates/home.html | 2 +- files/templates/root.html | 4 ++-- files/templates/util/macros.html | 2 +- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/files/templates/default.html b/files/templates/default.html index 205483c29..0d4c0d5c9 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -139,7 +139,7 @@ {% if IS_EVENT() and not (SITE_NAME == 'WPD' and not v) and (not v or v.event_music) and not (hole and hole.name == 'music') and not (u and u.song) and not (IS_HOMOWEEN() and p and p.award_count("haunt", v)) and not (p and p.embed and p.domain == 'twitter.com') %} {% set path = "assets/events/" ~ IS_EVENT() ~ "/music" %} - {% set song = SITE_FULL ~ "/" ~ path ~ "/" ~ listdir('files/'~path)|random() ~ '?x=45' %} + {% set song = SITE_FULL ~ "/" ~ path ~ "/" ~ listdir('files/'~path)|random ~ '?x=45' %} {% endif %} diff --git a/files/templates/events/fistmas/banner.html b/files/templates/events/fistmas/banner.html index 68eac38e8..4dc27fc93 100644 --- a/files/templates/events/fistmas/banner.html +++ b/files/templates/events/fistmas/banner.html @@ -3,7 +3,7 @@ {% endif %} - {% if SITE_NAME == 'rDrama' and range(1, 20)|random() == 1 %} + {% if SITE_NAME == 'rDrama' and range(1, 20)|random == 1 %} {% else %} diff --git a/files/templates/events/homoween/banner.html b/files/templates/events/homoween/banner.html index 961a748af..a66f6885b 100644 --- a/files/templates/events/homoween/banner.html +++ b/files/templates/events/homoween/banner.html @@ -1,4 +1,4 @@ -{% if range(1, 100)|random() == 1 %} +{% if range(1, 100)|random == 1 %} {% endif %} diff --git a/files/templates/events/homoween/banner.svg b/files/templates/events/homoween/banner.svg index 0b2df6f8e..aab1ffc84 100644 --- a/files/templates/events/homoween/banner.svg +++ b/files/templates/events/homoween/banner.svg @@ -128,7 +128,7 @@ diff --git a/files/templates/header.html b/files/templates/header.html index b2c32159e..ba7589b1c 100644 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -7,7 +7,7 @@
{{calc_users()}} {% if SITE_NAME == 'rDrama' %} - {% if not hasattr(g, "loggedin_counter") or not g.loggedin_counter or (range(1,5) | random == 1 and not (v and v.truescore > 1000)) %} + {% if not hasattr(g, "loggedin_counter") or not g.loggedin_counter or (range(1,5)|random == 1 and not (v and v.truescore > 1000)) %} {% include "journoid_banner.html" %} {% else %} {% if IS_DKD() %} diff --git a/files/templates/home.html b/files/templates/home.html index eae4381cb..852efbea9 100644 --- a/files/templates/home.html +++ b/files/templates/home.html @@ -8,7 +8,7 @@ Kongrama {# DELETE_ME_PLS #} {% elif v %} - {{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random()}}{% endif %} + {{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES|random}}{% endif %} {% else %} {{SITE_NAME}}{% if TAGLINES %}: {{TAGLINES[0]}}{% endif %} {% endif %} diff --git a/files/templates/root.html b/files/templates/root.html index 2c3b07248..5e285299f 100644 --- a/files/templates/root.html +++ b/files/templates/root.html @@ -36,9 +36,9 @@ {% if IS_HOMOWEEN() and ((v and v.jumpscare) or request.path.startswith('/shop/')) %} - {% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random() ~ "?x=45" %} + {% set image_src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/jumpscares/" ~ listdir("files/assets/events/homoween/images/jumpscares")|random ~ "?x=45" %} - {% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random() ~ "?x=45" %} + {% set audio_src = "/assets/events/homoween/audio/jumpscares/" ~ listdir("files/assets/events/homoween/audio/jumpscares")|random ~ "?x=45" %} {% endif %} diff --git a/files/templates/util/macros.html b/files/templates/util/macros.html index 5f0d78cf1..a047dbb26 100644 --- a/files/templates/util/macros.html +++ b/files/templates/util/macros.html @@ -8,7 +8,7 @@ {% if request.path.startswith('/post/') and p %} {{- SITE_FULL_IMAGES ~ "/" ~ path ~ "/" ~ listdir('files/' ~ path)|seeded_random(p.id) ~ '?x=7' -}} {% else %} - {{- SITE_FULL_IMAGES ~ "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random() ~ '?x=7' -}} + {{- SITE_FULL_IMAGES ~ "/" ~ path ~ "/" ~ listdir('files/' ~ path)|random ~ '?x=7' -}} {% endif %} {%- endmacro -%}