forked from MarseyWorld/MarseyWorld
56 lines
1.7 KiB
HTML
56 lines
1.7 KiB
HTML
<div id="awards-container" class="w-100 h-100">
|
|
{% macro stackable_award(award, src, alt) %}
|
|
<div class="stackable-container">
|
|
{% for i in range(p.award_count(award, v)) %}
|
|
<div class="{{award}}">
|
|
<img loading="lazy" alt="{{alt}}" src="{{src}}">
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endmacro %}
|
|
|
|
{% if p.award_count("emoji", v) %}
|
|
<div class="stackable-container">
|
|
{% for emoji in p.emoji_award_emojis(v, OVER_18_EMOJIS) %}
|
|
{% set src = '/e/' + emoji + '.webp' %}
|
|
{% set alt = ':#' + emoji + ':' %}
|
|
{% set delay = 'animation-delay-' ~ (loop.index-1) %}
|
|
<div class="emoji-award {{delay}}">
|
|
<img class="{{delay}}" loading="lazy" alt="{{alt}}" src="{{src}}">
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% if p.award_count("train", v) %}
|
|
{{stackable_award('train', '/e/marseytrain.webp', ':#marseytrain:')}}
|
|
{% endif %}
|
|
|
|
{% if p.award_count("scooter", v) %}
|
|
{{stackable_award('scooter', '/e/marseyscooter.webp', ':#marseyscooter:')}}
|
|
{% endif %}
|
|
|
|
{% if p.award_count("firework", v) %}
|
|
<script defer src="{{'js/fireworks.js' | asset}}"></script>
|
|
{{stackable_award('firework')}}
|
|
{% endif %}
|
|
|
|
{% if p.award_count("confetti", v) and (IS_BIRTHGAY() or IS_BIRTHDEAD()) %}
|
|
<div class="confetti w-100 h-100"></div>
|
|
{% endif %}
|
|
|
|
{% if p.award_count("ricardo", v) %}
|
|
{% for i in range(min(p.award_count("ricardo", v), 3)) %}
|
|
{% set i = i + 1 %}
|
|
<div class="ricardo ricardo{{i}}">
|
|
{% if IS_HOMOWEEN() %}
|
|
{% set src = SITE_FULL_IMAGES ~ "/assets/events/homoween/images/ricardo" ~ i ~ ".webp" %}
|
|
{% else %}
|
|
{% set src = SITE_FULL_IMAGES ~ "/i/ricardo" ~ i ~ ".webp" %}
|
|
{% endif %}
|
|
<img loading="lazy" src="{{src}}">
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</div>
|