From 7246973651e716faa8393f5cd5fc1328578d3495 Mon Sep 17 00:00:00 2001 From: Stranck Date: Thu, 4 Jan 2024 12:14:43 +0100 Subject: [PATCH 1/2] Added sponsorcount page --- stats.py | 8 ++++++++ tpl/base.html | 19 ++++++++++++++++++ tpl/sponsorcount.html | 46 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 tpl/sponsorcount.html 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 bc5dc0f..8eaf5ed 100644 --- a/tpl/base.html +++ b/tpl/base.html @@ -57,6 +57,24 @@ 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); + text-align: center; + background-size: 800% 800%; + color: transparent; + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + font-size: 24px; + animation: rainbow 4s linear infinite; + } + + @keyframes rainbow { + 0%{background-position:0% 0%} + 50%{background-position:50% 0%} + 100%{background-position:100% 0%} + } @@ -87,6 +105,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 %} From fee70fac7c7f49ee1ecf77ceecb2985122d7d1a3 Mon Sep 17 00:00:00 2001 From: Stranck Date: Thu, 4 Jan 2024 13:38:41 +0100 Subject: [PATCH 2/2] Updated rainbow animation --- tpl/base.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tpl/base.html b/tpl/base.html index 2084507..850b16c 100644 --- a/tpl/base.html +++ b/tpl/base.html @@ -51,21 +51,19 @@ .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); + background-image: repeating-linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff); text-align: center; - background-size: 800% 800%; + background-size: 2000% 2000%; color: transparent; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; - font-size: 24px; animation: rainbow 4s linear infinite; } @keyframes rainbow { 0%{background-position:0% 0%} - 50%{background-position:50% 0%} - 100%{background-position:100% 0%} + 100%{background-position:57.75% 0%} }