diff --git a/store/app.py b/store/app.py index 172544d5..2e01d40a 100644 --- a/store/app.py +++ b/store/app.py @@ -18,6 +18,7 @@ locale = "en" app = Flask(__name__, static_url_path='/assets', static_folder="assets") catalog = json.load(open("../builds/default/v3/apps.json")) catalog['categories'] = {c['id']:c for c in catalog['categories']} +catalog['antifeatures'] = {c['id']:c for c in catalog['antifeatures']} try: config = toml.loads(open("config.toml").read()) @@ -167,7 +168,7 @@ def app_info(app_id): ] = f"data:image/{ext};charset=utf-8;base64,{data}" break - return render_template("app.html", user=session.get('user', {}), app_id=app_id, infos=infos) + return render_template("app.html", user=session.get('user', {}), app_id=app_id, infos=infos, catalog=catalog) @app.route('/wishlist') diff --git a/store/templates/app.html b/store/templates/app.html index f3bbe2f9..78be075f 100644 --- a/store/templates/app.html +++ b/store/templates/app.html @@ -1,8 +1,9 @@ +{% set locale = 'en' %} {% extends "base.html" %} {% block main %}
- + -

{{ infos["manifest"]["name"] }}

+

{{ infos["manifest"]["name"] }}

+ {% if infos['category'] %} + + {{ catalog['categories'][infos['category']]['title'][locale].lower() }} + + {% endif %} +
+ + {% if infos['level'] == 0 %} +
+ +
+ {% elif infos['level']|int <= 4 %} +
+ +
+ {% elif infos['level'] == 8 %} +
+ +
+ {% endif %} + {% endblock %} diff --git a/store/templates/base.html b/store/templates/base.html index f9242db5..20ed7725 100644 --- a/store/templates/base.html +++ b/store/templates/base.html @@ -21,6 +21,9 @@ .btn-primary { @apply text-white bg-blue-500 hover:bg-blue-700; } + .btn-link { + @apply bg-gray-100 hover:bg-gray-200; + } .btn-primary-outline { @apply border text-blue-600 border-blue-500 hover:text-blue-400; } @@ -125,7 +128,7 @@ {% block main %} {% endblock %} -

TODO : add a proper footer
+