this leaderboard code is affecting my mental sanity

idk maybe this'll fix it it's 1 am who knows anything about coding anymore
master
justcool393 2022-10-28 01:16:51 -05:00
parent 67768bf44d
commit 0b61a83270
1 changed files with 7 additions and 6 deletions

View File

@ -1,16 +1,17 @@
{% extends "settings2.html" %} {% extends "settings2.html" %}
{% block pagetitle %}Leaderboard{% endblock %} {% block pagetitle %}Leaderboard{% endblock %}
{% block content %} {% block content %}
{%-set leaderboards = [ {%-
('coins', 'Coins', True), ('spent', 'Spent in shop', True), ('truescore', 'Truescore', True), ('followers', 'Followers', True), set LEADERBOARDS = [
('posts', 'Posts', True), ('comments', 'Comments', True), ('awards', 'Awards', True), ('badges', 'Badges', True), ('coins', 'Coins', True, True), ('spent', 'Spent in shop', True, True), ('truescore', 'Truescore', True, True), ('followers', 'Followers', True, True),
('marseys', 'Marseys', SITE_NAME == 'rDrama') ('blocked', 'Blocked', True), ('owned-hats', 'Owned hats', True), ('designed-hats', 'Designed hats', True, False) ('posts', 'Posts', True, True), ('comments', 'Comments', True, True), ('awards', 'Awards', True, True), ('badges', 'Badges', True, True),
('marseys', 'Marseys', SITE_NAME == 'rDrama', True) ('blocked', 'Blocked', True, True), ('owned-hats', 'Owned hats', True, True), ('designed-hats', 'Designed hats', True, False)
] -%} ] -%}
<pre class="d-none d-md-inline-block"></pre> <pre class="d-none d-md-inline-block"></pre>
<div id="leaderboard-contents" style="text-align: center; margin-bottom: 1.5rem; font-size: 1.2rem;"> <div id="leaderboard-contents" style="text-align: center; margin-bottom: 1.5rem; font-size: 1.2rem;">
{% for lb in leaderboards %} {% for lb in LEADERBOARDS %}
{% if lbs[2] %} {% if lbs[2] %}
<a href="#leaderboard-{{lb[0]}}">{{lb[1]}}</a>{% if not lb[3] %} &bull;{% endif %} <a href="#leaderboard-{{lb[0]}}">{{lb[1]}}</a>{% if lb[3] %} &bull;{% endif %}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>