diff --git a/files/routes/awards.py b/files/routes/awards.py index b4f3c70d0..9f70e06bc 100755 --- a/files/routes/awards.py +++ b/files/routes/awards.py @@ -146,7 +146,8 @@ def shop(v): elif v.patron == 4: val["price"] = int(val["price"]*0.75) else: val["price"] = int(val["price"]*0.70) - return render_template("settings_shop.html", owned=owned, awards=list(AWARDS.values()), v=v) + sales = g.db.query(Vote.id).count() + g.db.query(CommentVote.id).count() - g.db.query(func.sum(User.coins)).scalar() + return render_template("shop.html", owned=owned, awards=list(AWARDS.values()), v=v, sales=sales) @app.post("/buy/") diff --git a/files/templates/default.html b/files/templates/default.html index 11632cb9f..c137badcf 100755 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -268,11 +268,13 @@ -{% if '@' not in request.path %} - - - -{% endif %} +{% block Banner %} + {% if '@' not in request.path %} + + + + {% endif %} +{% endblock %} {% include "header.html" %} diff --git a/files/templates/header.html b/files/templates/header.html index 7c5cb81d2..0be1b81bd 100755 --- a/files/templates/header.html +++ b/files/templates/header.html @@ -98,7 +98,7 @@ @@ -160,7 +160,7 @@ diff --git a/files/templates/shop.html b/files/templates/shop.html index e69de29bb..931e884b3 100644 --- a/files/templates/shop.html +++ b/files/templates/shop.html @@ -0,0 +1,101 @@ +{% extends "default.html" %} + +{% block title %} +Shop +{% endblock %} + +{% block pagetype %}message{% endblock %} + +{% block Banner %} +
+ +

Stir drama. Earn coins.

+
Total sales: {{sales}} dramacoins
+
+{% endblock %} + +{% block content %} + {% if error %} + + {% endif %} + {% if msg %} + + {% endif %} + +

+    

+    
Owned Awards
+ + + + + + + + + + + + {% for a in owned %} + + + + + + + {% endfor %} +
IconTitleDescriptionOwned
{{a['title']}}{{a['description']}}{{a['owned_num']}}
+ +
+
+
+    
+ +
Shop
+ + + + + + + + + + + + + {% for a in awards %} + + + + + + {% set kind = a['kind'] %} + + + {% endfor %} +
IconTitleDescriptionPriceBuy
{{a['title']}}{{a['description']}}{{a['price']}}Buy
+
+
+
+
+
+
+    
+{% endblock %}