stranck-dev #3
8
stats.py
8
stats.py
|
@ -4,6 +4,14 @@ from ext import *
|
||||||
|
|
||||||
bp = Blueprint("stats", url_prefix="/manage")
|
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")
|
@bp.route("/nosecount")
|
||||||
async def nose_count(request, order: Order):
|
async def nose_count(request, order: Order):
|
||||||
await request.app.ctx.om.updateCache()
|
await request.app.ctx.om.updateCache()
|
||||||
|
|
|
@ -57,6 +57,24 @@
|
||||||
footer img {height:1.3em;}
|
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;}
|
.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%}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Matomo -->
|
<!-- Matomo -->
|
||||||
|
@ -87,6 +105,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<a href="/manage/nosecount">Nose Count</a>
|
<a href="/manage/nosecount">Nose Count</a>
|
||||||
<a href="/manage/fursuitcount">Fursuit Count</a>
|
<a href="/manage/fursuitcount">Fursuit Count</a>
|
||||||
|
<a href="/manage/sponsorcount" class="rainbow-text">Sponsor Count</a>
|
||||||
{% if order %}
|
{% if order %}
|
||||||
<a href="/manage/carpooling">Carpooling</a>
|
<a href="/manage/carpooling">Carpooling</a>
|
||||||
<a style="float:right;" href="/manage/logout">Logout</a>
|
<a style="float:right;" href="/manage/logout">Logout</a>
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% block title %}Furizon 2024 Sponsorcount{% endblock %}
|
||||||
|
{% block main %}
|
||||||
|
<main class="container">
|
||||||
|
<header>
|
||||||
|
<picture>
|
||||||
|
<source srcset="/res/furizon.png" media="(prefers-color-scheme:dark)">
|
||||||
|
<img src="/res/furizon-light.png" style="height:4rem;text-align:center;">
|
||||||
|
</picture>
|
||||||
|
</header>
|
||||||
|
<h2 class="rainbow-text">Sponsor count!</h2>
|
||||||
|
<p>Welcome to the sponsor-count page! This is the list of users that support us! Thanks really a lot to everyone ❤️</p>
|
||||||
|
{% for person in orders.values() if person.sponsorship == "super"%}
|
||||||
|
{% if loop.first %}
|
||||||
|
<hr />
|
||||||
|
<h1>Super sponsors!</h1>
|
||||||
|
<div class="grid people" style="padding-bottom:1em;">
|
||||||
|
{% endif %}
|
||||||
|
<div style="margin-bottom: 1em;">
|
||||||
|
<div class="propic-container">
|
||||||
|
<img class="propic propic-{{person.sponsorship}}" src="/res/propic/{{person.ans('propic_fursuiter') or 'default.png'}}" />
|
||||||
|
<img class="propic-flag" src="/res/flags/{{person.country.lower()}}.svg" />
|
||||||
|
</div>
|
||||||
|
<h5>{{person.ans('fursona_name')}}</h5>
|
||||||
|
</div>
|
||||||
|
{% if loop.last %}</div>{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% for person in orders.values() if person.sponsorship == "normal"%}
|
||||||
|
{% if loop.first %}
|
||||||
|
<hr />
|
||||||
|
<h1>Sponsors</h1>
|
||||||
|
<div class="grid people" style="padding-bottom:1em;">
|
||||||
|
{% endif %}
|
||||||
|
<div style="margin-bottom: 1em;">
|
||||||
|
<div class="propic-container">
|
||||||
|
<img class="propic propic-{{person.sponsorship}}" src="/res/propic/{{person.ans('propic_fursuiter') or 'default.png'}}" />
|
||||||
|
<img class="propic-flag" src="/res/flags/{{person.country.lower()}}.svg" />
|
||||||
|
</div>
|
||||||
|
<h5>{{person.ans('fursona_name')}}</h5>
|
||||||
|
</div>
|
||||||
|
{% if loop.last %}</div>{% endif %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
</main>
|
||||||
|
{% endblock %}
|
Loading…
Reference in New Issue