Added (un)finished maps to player profiles.
This commit is contained in:
parent
24d30240a7
commit
9b5193a64e
|
@ -19,6 +19,7 @@
|
|||
with a time of {{ utils.fancyTime(player.firstFinish.time) }}.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h2>Points</h2>
|
||||
<table>
|
||||
|
@ -44,21 +45,57 @@
|
|||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Finished maps</h2>
|
||||
<div class="flex-container">
|
||||
{% for finishedMap in data.finishedMaps %}
|
||||
{{ map.card(finishedMap) }}
|
||||
{% endfor %}
|
||||
|
||||
{% macro insertMap(mapData) %}
|
||||
<div class="map">
|
||||
<a href="/maps/{{ mapData.map | urlencode }}">
|
||||
<img class="map-image" data-src="https://ddnet.tw/ranks/maps/{{ mapData.map | replace(r/[À-ž]/g, "__") | replace(r/[^a-zA-Z0-9]/g, "_") }}.png">
|
||||
</a>
|
||||
<h1 class="map-name">{{ mapData.map }}</h1>
|
||||
<table class="map-info">
|
||||
<tr>
|
||||
<td>Finishes</td>
|
||||
<td>{{ mapData.finishes }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Points</td>
|
||||
<td>{{ mapData.points }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Rank</td>
|
||||
<td>{{ mapData.rank }}</td>
|
||||
</tr>
|
||||
{% if mapData.teamrank %}
|
||||
<tr>
|
||||
<td>Teamrank</td>
|
||||
<td>{{ mapData.teamrank }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</table>
|
||||
<a class="map-more-info" href="/maps/{{ mapData.map | urlencode }}">More Info</a>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
<div>
|
||||
<h2>Finished maps</h2>
|
||||
{% for category, finishedMaps in data.finishedMaps %}
|
||||
<h3>{{ category }}</h3>
|
||||
<div class="flex-container">
|
||||
{% for finishedMap in finishedMaps %}
|
||||
{{ insertMap(finishedMap) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div>
|
||||
<h2>Unfinished maps</h2>
|
||||
<div class="flex-container">
|
||||
{% for unfinishedMap in data.unfinishedMaps %}
|
||||
{{ map.card(unfinishedMap) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% for category, unfinishedMaps in data.unfinishedMaps %}
|
||||
<h3>{{ category }}</h3>
|
||||
<div class="flex-container">
|
||||
{% for unfinishedMap in unfinishedMaps %}
|
||||
{{ insertMap(unfinishedMap) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
|
Loading…
Reference in New Issue
Block a user