From c50e11d0d5837a0d4d9b201b96cb64eacb4c3e28 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Fri, 9 Jun 2023 15:27:44 +0200 Subject: [PATCH] Cleanup templates --- iwm_browser/templates/home.html | 38 +----- iwm_browser/templates/levelCard.html | 38 ++++++ iwm_browser/templates/levelInfo.html | 100 +++++----------- iwm_browser/templates/playlist.html | 121 +++++++------------ iwm_browser/templates/search.html | 168 ++++++++------------------- iwm_browser/templates/searchBar.html | 39 +++++++ 6 files changed, 194 insertions(+), 310 deletions(-) create mode 100644 iwm_browser/templates/levelCard.html create mode 100644 iwm_browser/templates/searchBar.html diff --git a/iwm_browser/templates/home.html b/iwm_browser/templates/home.html index c654325..700be23 100644 --- a/iwm_browser/templates/home.html +++ b/iwm_browser/templates/home.html @@ -14,43 +14,7 @@
- + {% include "searchBar.html" %}
IWM Browser
diff --git a/iwm_browser/templates/levelCard.html b/iwm_browser/templates/levelCard.html new file mode 100644 index 0000000..9ed2fb4 --- /dev/null +++ b/iwm_browser/templates/levelCard.html @@ -0,0 +1,38 @@ +
+
+
+
+ +
Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}
+ +
{{ map['NumThumbsUp'] }} 👍 {{ map['NumThumbsDown'] }} 👎
+
Replays visible: {{ "always" if map['ReplayVisibility'] == 2 }}{{ "after clear" if map['ReplayVisibility'] == 0 }}
+
Gems : {{ map['DragonCoins'] }}
+ {% if map['Description'] != ''%}
{{ map['Description'] }}
{% endif %} +
+
+
+ Full server response + + + + {% for value in map %} + + + + {% endfor %} + +
KeyValue
{{value}}{{map[value]}}
+ +
+
+
+
+ + {% set BestTime = convert_times(map['BestTimePlaytime']) %} + {% set BestFullTime = convert_times(map['BestFullTimePlaytime']) %} +
Best Time: {{ map['BestTimeUsername'] }} [{{ BestTime[0] }}:{{ BestTime[1] }}:{{ BestTime[2] }}]
+ {% if map['BestFullTimeUserID'] != 0 %}
Best 100% Time: {{ map['BestFullTimeUsername'] }} [{{ BestFullTime[0] }}:{{ BestFullTime[1] }}:{{ BestFullTime[2] }}]{{ "(illegal time)" if not map['DragonCoins'] }}
{% endif %} +
+
+
diff --git a/iwm_browser/templates/levelInfo.html b/iwm_browser/templates/levelInfo.html index 4c15e93..5da17f7 100644 --- a/iwm_browser/templates/levelInfo.html +++ b/iwm_browser/templates/levelInfo.html @@ -1,78 +1,36 @@ - - - - - - - - - - - + diff --git a/iwm_browser/templates/playlist.html b/iwm_browser/templates/playlist.html index d1ef9d8..ff7e0da 100644 --- a/iwm_browser/templates/playlist.html +++ b/iwm_browser/templates/playlist.html @@ -1,86 +1,45 @@ - - - IWM Browser - - - - - - - - - + diff --git a/iwm_browser/templates/searchBar.html b/iwm_browser/templates/searchBar.html new file mode 100644 index 0000000..d535c84 --- /dev/null +++ b/iwm_browser/templates/searchBar.html @@ -0,0 +1,39 @@ + +