forked from MarseyWorld/MarseyWorld
Respect upper bound on award quantity.
parent
618c5dbde0
commit
f1ceb5b079
|
@ -47,6 +47,7 @@ def inject_constants():
|
|||
"KOFI_TOKEN":KOFI_TOKEN, "KOFI_LINK":KOFI_LINK,
|
||||
"approved_embed_hosts":approved_embed_hosts,
|
||||
"site_settings":app.config['SETTINGS'], "EMAIL":EMAIL, "calc_users":calc_users,
|
||||
"max": max, "min": min,
|
||||
"TELEGRAM_LINK":TELEGRAM_LINK, "EMAIL_REGEX_PATTERN":EMAIL_REGEX_PATTERN,
|
||||
"CONTENT_SECURITY_POLICY_DEFAULT":CONTENT_SECURITY_POLICY_DEFAULT,
|
||||
"CONTENT_SECURITY_POLICY_HOME":CONTENT_SECURITY_POLICY_HOME,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% set wholesome = '/e/marseywholesome.webp' %}
|
||||
{% endif %}
|
||||
|
||||
{% for i in range(p.award_count("wholesome", v)) %}
|
||||
{% for i in range(min(p.award_count("wholesome", v), 4)) %}
|
||||
{% if g.inferior_browser %}
|
||||
<div class="seal seal{{i+1}}" height="100%" width="100%">
|
||||
<img alt=":#marseywholesome:" class="sealimg" src="{{wholesome}}">
|
||||
|
@ -20,7 +20,7 @@
|
|||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% for i in range(p.award_count("train", v)) %}
|
||||
{% for i in range(min(p.award_count("train", v), 4)) %}
|
||||
{% set train_dir = 'left' if (i % 2) == 0 else 'right' %}
|
||||
{% set train_mirror = ' mirrored' if (i % 2) == 0 else '' %}
|
||||
<marquee class="train train{{i+1}}" direction="{{train_dir}}" scrollamount=10 width="100%">
|
||||
|
@ -28,7 +28,7 @@
|
|||
</marquee>
|
||||
{% endfor %}
|
||||
|
||||
{% for i in range(p.award_count("scooter", v)) %}
|
||||
{% for i in range(min(p.award_count("scooter", v), 4)) %}
|
||||
{% set scooter_dir = 'right' if (i % 2) == 0 else 'left' %}
|
||||
{% set scooter_mirror = '' if (i % 2) == 0 else ' mirrored' %}
|
||||
<marquee class="train train{{(i + 2) % 4 + 1}}" direction="{{scooter_dir}}" scrollamount=10 width="100%">
|
||||
|
@ -68,7 +68,7 @@
|
|||
|
||||
{% if p.award_count("firework", v) %}
|
||||
<script defer src="{{'js/fireworks.js' | asset}}"></script>
|
||||
{% for i in range(p.award_count("firework", v)) %}
|
||||
{% for i in range(min(p.award_count("firework", v), 4)) %}
|
||||
<div class="firework">
|
||||
<img src="">
|
||||
</div>
|
||||
|
@ -77,7 +77,7 @@
|
|||
|
||||
{% if p.award_count("ricardo", v) %}
|
||||
<script defer src="{{'js/ricardo.js' | asset}}"></script>
|
||||
{% for i in range(p.award_count("ricardo", v)) %}
|
||||
{% for i in range(min(p.award_count("ricardo", v), 3)) %}
|
||||
<div id="ricardo{{i+1}}" class="ricardo">
|
||||
<img src="/i/ricardo{{i+1}}.webp">
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue