From f728070815e851bfd8c698c2cf6df2aa423723b7 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Sun, 30 Oct 2022 13:03:14 +0100 Subject: [PATCH] Show user times + single level preview --- iwm_browser/static/search/searchResults.css | 25 ++++++++++++++-- iwm_browser/templates/levelInfo.html | 5 +++- iwm_browser/templates/search.html | 32 ++++++++++++--------- 3 files changed, 45 insertions(+), 17 deletions(-) diff --git a/iwm_browser/static/search/searchResults.css b/iwm_browser/static/search/searchResults.css index ac4cf51..4eb3f1b 100644 --- a/iwm_browser/static/search/searchResults.css +++ b/iwm_browser/static/search/searchResults.css @@ -26,6 +26,9 @@ .searchResults { font-size: 16px; } + .times { + display: none; + } } @@ -77,6 +80,21 @@ margin-bottom: 0.3rem; } +.levelTitle a:link, a:visited { + color: inherit; + text-decoration: initial; + cursor: auto; +} + +.levelTitle a:hover { + outline: 2px dotted blue; +} + +.levelTitle a:link:active { + color: inherit; + outline: 2px dotted blue; +} + .creatorName { justify-self: left; text-align: left; @@ -84,10 +102,11 @@ } .levelDescription { + overflow-x: scroll; text-align: left; - background-color: rgba(245, 222, 179, 0.128); - padding: 1em; - font-size: 1rem; + background-color: #30303a; + padding: 0.5rem; + font-size: small; /* justify-self: right; diff --git a/iwm_browser/templates/levelInfo.html b/iwm_browser/templates/levelInfo.html index 40e5e3e..5de70fa 100644 --- a/iwm_browser/templates/levelInfo.html +++ b/iwm_browser/templates/levelInfo.html @@ -33,10 +33,13 @@
Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}
by {{ map['CreatorName'] }}
{{ map['NumThumbsUp'] }} 👍 {{ map['NumThumbsDown'] }} 👎
+ {% if map['Description'] != ''%}
{{ map['Description'] }}
{% endif %}
Code:
-
First Clear: {{ map['FirstClearUsername'] }}
+
First Clear: {{ map['FirstClearUsername'] }}
+ {% set BestTime = convert_times(map['BestTimePlaytime']) %} +
Best Time: {{ map['BestTimeUsername'] }} [{{ BestTime[0] }}:{{ BestTime[1] }}:{{ BestTime[2] }}]
diff --git a/iwm_browser/templates/search.html b/iwm_browser/templates/search.html index c83fab2..c390101 100644 --- a/iwm_browser/templates/search.html +++ b/iwm_browser/templates/search.html @@ -60,21 +60,27 @@ {% if searchResults %}
{% for map in searchResults %} -
-
-
-
-
{{ map['Name'] }}
-
Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}
-
by {{ map['CreatorName'] }}
-
{{ map['NumThumbsUp'] }} 👍 {{ map['NumThumbsDown'] }} 👎
-
Code:
+
+
+
+
+ +
Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}
+
by {{ map['CreatorName'] }}
+
{{ map['NumThumbsUp'] }} 👍 {{ map['NumThumbsDown'] }} 👎
+ {% if map['Description'] != ''%}
{{ map['Description'] }}
{% endif %} +
Code:
+
+
+
First Clear: {{ map['FirstClearUsername'] }}
+ {% set BestTime = convert_times(map['BestTimePlaytime']) %} +
Best Time: {{ map['BestTimeUsername'] }} [{{ BestTime[0] }}:{{ BestTime[1] }}:{{ BestTime[2] }}]
+
+
-
- -
- {% endfor %} + {% endfor %} +

Page {{ searchPage+1 }}