dawdle/site/dawdle/templates/dawdle/player_items.html
2024-02-28 16:23:41 +11:00

50 lines
1.9 KiB
HTML

{% extends "dawdle/base.html" %}
{% load static %}
{% load duration %}
{% load alignment %}
{% block content %}
<div class="contentbox">
<h1>Players</h1>
<table id="playerlist">
<thead>
<tr><td>Rank</td><td style="width:30rem">Name</td><td>Time to next level</td></tr>
</thead><tbody>
{% for p in object_list %}
<tr class="{%if p.online %}online{% else %}offline{% endif %}">
<td style="text-align:right">#{{forloop.counter}}</td>
<td><img style="height: 0.7em; width: 0.7em"
src="{% if p.online %}
{% static 'dawdle/Blue_sphere.svg' %}
{% else %}
{% static 'dawdle/Gray_sphere.svg' %}
{% endif %}"
alt="{% if p.online %}
On
{% else %}
Off
{% endif %}">
<a href="{% url 'dawdle:player-detail' p.name %}">{{p.name}},
the <span class="{{p.alignment|alignment}}-align">{{p.alignment|alignment}}</span>
level {{p.level}} {{p.cclass}}</a>
</td>
<td style="text-align: right"2>{{p.nextlvl|duration}}</td>
</tr>
{% endfor %}
</tbody></table>
<div id="pmap-container">
<img id="pmap" src="{% url 'dawdle:map' %}" alt="Player Map" usemap="#playermap">
</div>
<map name="playermap">
{% for p in object_list %}
<area shape="circle"
coords="{{p.posx}},{{p.posy}},3"
alt="{{p.name}}"
href="{% url 'dawdle:player-detail' p.name %}">
{% endfor %}
</map>
</div>
{% endblock %}