diff --git a/stats.py b/stats.py index a97ef9b..75d7467 100644 --- a/stats.py +++ b/stats.py @@ -4,6 +4,14 @@ from ext import * bp = Blueprint("stats", url_prefix="/manage") +@bp.route("/sponsorcount") +async def sponsor_count(request, order: Order): + await request.app.ctx.om.updateCache() + orders = {key:value for key,value in sorted(request.app.ctx.om.cache.items(), key=lambda x: len(x[1].room_members), reverse=True) if value.status not in ['c', 'e']} + + tpl = request.app.ctx.tpl.get_template('sponsorcount.html') + return html(tpl.render(orders=orders, order=order)) + @bp.route("/nosecount") async def nose_count(request, order: Order): await request.app.ctx.om.updateCache() diff --git a/tpl/base.html b/tpl/base.html index 719beaa..850b16c 100644 --- a/tpl/base.html +++ b/tpl/base.html @@ -49,6 +49,22 @@ footer img {height:1.3em;} .tag {background:var(--primary);color:var(--contrast);font-size:0.8em;font-weight:600;padding:0.1em 0.3em;border-radius:3px;} + + .rainbow-text { + background-image: repeating-linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff); + text-align: center; + background-size: 2000% 2000%; + color: transparent; + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + animation: rainbow 4s linear infinite; + } + + @keyframes rainbow { + 0%{background-position:0% 0%} + 100%{background-position:57.75% 0%} + } @@ -79,6 +95,7 @@ {% endif %} Nose Count Fursuit Count + Sponsor Count {% if order %} Carpooling Logout diff --git a/tpl/sponsorcount.html b/tpl/sponsorcount.html new file mode 100644 index 0000000..a217202 --- /dev/null +++ b/tpl/sponsorcount.html @@ -0,0 +1,46 @@ +{% extends "base.html" %} +{% block title %}Furizon 2024 Sponsorcount{% endblock %} +{% block main %} +
+
+ + + + +
+

Sponsor count!

+

Welcome to the sponsor-count page! This is the list of users that support us! Thanks really a lot to everyone ❤️

+ {% for person in orders.values() if person.sponsorship == "super"%} + {% if loop.first %} +
+

Super sponsors!

+
+ {% endif %} +
+
+ + +
+
{{person.ans('fursona_name')}}
+
+ {% if loop.last %}
{% endif %} + {% endfor %} + + {% for person in orders.values() if person.sponsorship == "normal"%} + {% if loop.first %} +
+

Sponsors

+
+ {% endif %} +
+
+ + +
+
{{person.ans('fursona_name')}}
+
+ {% if loop.last %}
{% endif %} + {% endfor %} + +
+{% endblock %}