Show 0.822 details on levelInfo page

This commit is contained in:
magmaus3 2023-04-09 18:54:46 +02:00
parent 5f4a08f3ad
commit 8be2ab5121
Signed by: magmaus3
GPG key ID: 966755D3F4A9B251

View file

@ -28,22 +28,44 @@
<div class="splitter"></div>
<div class="searchResults">
<div class="searchResultCard full">
<div class="thumbnail"><img src="{{ THUMB_URL }}/{{ map['ID'] }}.png"></div>
<div class="thumbnail"><img aria-hidden="true" src="{{ generate_thumbnail_url(map['ID'], THUMB_URL) }}"></div>
<div class="details">
<div class="basic">
<div class="levelTitle">{{ map['Name'] }}</div>
<div class="levelDifficulty"><span>Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}</span></div>
<div class="levelTitle"><a href="/level/{{ map['ID'] }}">{{ map['Name'] }}</a></div>
<div class="levelDifficulty"><span aria-label="Difficulty: {{ map['AverageUserDifficulty']|int }}">Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}</span></div>
<div class="creatorName">by <a href="/user/{{ map['CreatorId'] }}"><b>{{ map['CreatorName'] }}</b></a></div>
<div class="levelRating">{{ map['NumThumbsUp'] }} 👍 {{ map['NumThumbsDown'] }} 👎</div>
<div class="replayVisibility">Replays visible: {{ "always" if map['ReplayVisibility'] == 2 }}{{ "after clear" if map['ReplayVisibility'] == 0 }}</div>
<div class="dragonCoins">Gems : {{ map['DragonCoins'] }}</div>
{% if map['Description'] != ''%}<div class="levelDescription">{{ map['Description'] }}</div>{% endif %}
<div class="levelCode">Code: <input type="text" onclick="copy(this)" readonly=1 value="{{ map['MapCode'] }}" /></div>
<div class="levelCode"><label for="levelCode-input-{{ map['ID'] }}">Code:</label> <input id="levelCode-input-{{ map['ID'] }}" type="text" onclick="copy(this)" readonly=1 value="{{ map['MapCode'] }}" /></div>
<div class="fullResponse">
<details>
<summary>Full server response</summary>
<table>
<thead><td>Key</td><td>Value</td></thead>
<tbody>
{% for value in map %}
<tr>
<td>{{value}}</td><td>{{map[value]}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<!-- <pre>{{ json_dumps(map, indent=4) }}</pre> -->
</details>
</div>
</div>
<div class="times">
<div class="FirstClear">First Clear: <b>{{ map['FirstClearUsername'] }}</b></div>
<div class="FirstClear">First Clear: <a href="/user/{{map['FirstClearUserID']}}"><b>{{ map['FirstClearUsername'] }}</b></a></div>
{% set BestTime = convert_times(map['BestTimePlaytime']) %}
<div class="BestTime">Best Time: <b>{{ map['BestTimeUsername'] }}</b> [{{ BestTime[0] }}:{{ BestTime[1] }}:{{ BestTime[2] }}]</div>
{% set BestFullTime = convert_times(map['BestFullTimePlaytime']) %}
<div class="BestTime">Best Time: <a href="/user/{{ map['BestFullTimeUserID'] }}"><b>{{ map['BestTimeUsername'] }}</b></a> [{{ BestTime[0] }}:{{ BestTime[1] }}:{{ BestTime[2] }}]</div>
{% if map['BestFullTimeUserID'] != 0 %}<div class="BestTime {{ 'illegal' if not map['DragonCoins']}}">Best 100% Time: <a href="/user/{{map['BestFullTimeUserID']}}"><b>{{ map['BestFullTimeUsername'] }}</b></a> [{{ BestFullTime[0] }}:{{ BestFullTime[1] }}:{{ BestFullTime[2] }}]{{ "(illegal time)" if not map['DragonCoins'] }}</div>{% endif %}
</div>
</div>
</div>
</div>
</div>