forked from rDrama/rDrama
show marsey author in deux
parent
48cbe8a6b1
commit
612ea7354b
|
@ -19,7 +19,7 @@ def rdrama(id, title):
|
||||||
@app.get("/marseys")
|
@app.get("/marseys")
|
||||||
@auth_required
|
@auth_required
|
||||||
def marseys(v):
|
def marseys(v):
|
||||||
if SITE_NAME == 'rDrama':
|
if SITE in ('rdrama.net','devrama.xyz','deuxrama.net'):
|
||||||
marseys = g.db.query(Marsey, User).join(User)
|
marseys = g.db.query(Marsey, User).join(User)
|
||||||
sort = request.values.get("sort", "usage")
|
sort = request.values.get("sort", "usage")
|
||||||
if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username)
|
if sort == "usage": marseys = marseys.order_by(Marsey.count.desc(), User.username)
|
||||||
|
|
|
@ -11,30 +11,21 @@
|
||||||
<th>Name</th>
|
<th>Name</th>
|
||||||
<th>Marsey</th>
|
<th>Marsey</th>
|
||||||
<th><a href="?sort=usage">Usage</a></th>
|
<th><a href="?sort=usage">Usage</a></th>
|
||||||
{% if SITE_NAME == 'rDrama' %}<th><a href="?sort=author">Author</a></th>{% endif %}
|
{% if SITE in ('rdrama.net','devrama.xyz','deuxrama.net') %}<th><a href="?sort=author">Author</a></th>{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="followers-table">
|
<tbody id="followers-table">
|
||||||
{% if SITE_NAME == 'rDrama' %}
|
{% for marsey, author in marseys %}
|
||||||
{% for marsey, author in marseys %}
|
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{loop.index}}</td>
|
<td>{{loop.index}}</td>
|
||||||
<td>{{marsey.name}}</td>
|
<td>{{marsey.name}}</td>
|
||||||
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":#{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp"></td>
|
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":#{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp"></td>
|
||||||
<td>{{marsey.count}}</td>
|
<td>{{marsey.count}}</td>
|
||||||
|
{% if SITE in ('rdrama.net','devrama.xyz','deuxrama.net') %}
|
||||||
<td><a style="color:#{{author.namecolor}};font-weight:bold" href="/@{{author.username}}"><img loading="lazy" src="{{author.profile_url}}" class="pp20"><span {% if author.patron %}class="patron" style="background-color:#{{author.namecolor}}"{% endif %}>{{author.username}}</span></a></td>
|
<td><a style="color:#{{author.namecolor}};font-weight:bold" href="/@{{author.username}}"><img loading="lazy" src="{{author.profile_url}}" class="pp20"><span {% if author.patron %}class="patron" style="background-color:#{{author.namecolor}}"{% endif %}>{{author.username}}</span></a></td>
|
||||||
|
{% endif %}
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% else %}
|
|
||||||
{% for marsey in marseys %}
|
|
||||||
<tr>
|
|
||||||
<td>{{loop.index}}</td>
|
|
||||||
<td>{{marsey.name}}</td>
|
|
||||||
<td><img class="marsey" loading="lazy" data-bs-toggle="tooltip" alt=":{{marsey.name}}:" title=":{{marsey.name}}:" src="/e/{{marsey.name}}.webp"></td>
|
|
||||||
<td>{{marsey.count}}</td>
|
|
||||||
</tr>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue