diff --git a/iwm_browser/main.py b/iwm_browser/main.py index fad9176..45c561a 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -8,17 +8,14 @@ import httpx import json import os import re -from . import utils basedir = os.path.dirname(__file__) app = FastAPI() app.mount("/static", StaticFiles(directory=basedir + "/static"), name="static") template_env = jinja2.Environment( - loader=jinja2.PackageLoader("iwm_browser", "templates"), - auto_reload=True -) - -template_env.globals['convert_times'] = utils.convert_times + loader=jinja2.PackageLoader("iwm_browser", "templates"), + auto_reload=True + ) BASE_URL = "http://make.fangam.es" THUMB_URL = "https://images.make.fangam.es" diff --git a/iwm_browser/static/search/searchResults.css b/iwm_browser/static/search/searchResults.css index 4eb3f1b..ac4cf51 100644 --- a/iwm_browser/static/search/searchResults.css +++ b/iwm_browser/static/search/searchResults.css @@ -26,9 +26,6 @@ .searchResults { font-size: 16px; } - .times { - display: none; - } } @@ -80,21 +77,6 @@ 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; @@ -102,11 +84,10 @@ } .levelDescription { - overflow-x: scroll; text-align: left; - background-color: #30303a; - padding: 0.5rem; - font-size: small; + background-color: rgba(245, 222, 179, 0.128); + padding: 1em; + font-size: 1rem; /* justify-self: right; diff --git a/iwm_browser/templates/levelInfo.html b/iwm_browser/templates/levelInfo.html index 5de70fa..40e5e3e 100644 --- a/iwm_browser/templates/levelInfo.html +++ b/iwm_browser/templates/levelInfo.html @@ -33,13 +33,10 @@
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] }}]
+
First Clear: {{ map['FirstClearUsername'] }}
diff --git a/iwm_browser/templates/search.html b/iwm_browser/templates/search.html index c390101..c83fab2 100644 --- a/iwm_browser/templates/search.html +++ b/iwm_browser/templates/search.html @@ -60,27 +60,21 @@ {% if searchResults %}
{% for map in searchResults %} -
-
-
-
- -
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] }}]
-
- +
+
+
+
+
{{ map['Name'] }}
+
Difficulty: {{ '▲' * map['AverageUserDifficulty']|int }}
+
by {{ map['CreatorName'] }}
+
{{ map['NumThumbsUp'] }} 👍 {{ map['NumThumbsDown'] }} 👎
+
Code:
+
- {% endfor %} - + +
+ {% endfor %}

Page {{ searchPage+1 }}