stranck-dev #3
8
stats.py
8
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()
|
||||
|
|
|
@ -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%}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Matomo -->
|
||||
|
@ -79,6 +95,7 @@
|
|||
{% endif %}
|
||||
<a href="/manage/nosecount">Nose Count</a>
|
||||
<a href="/manage/fursuitcount">Fursuit Count</a>
|
||||
<a href="/manage/sponsorcount" class="rainbow-text">Sponsor Count</a>
|
||||
{% if order %}
|
||||
<a href="/manage/carpooling">Carpooling</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