74 lines
2.9 KiB
HTML
74 lines
2.9 KiB
HTML
{% extends "default.html" %}
|
|
{% block pagetitle %}Shop{% endblock %}
|
|
{% block pagetype %}message{% endblock %}
|
|
{% block banner %}
|
|
<div class="container-fluid bg-white sticky shop-tabs" style="padding-bottom: 0 !important;">
|
|
<div class="row box-shadow-bottom">
|
|
<div class="col p-0">
|
|
<div class="container" style="padding-bottom: 0;">
|
|
<div class="row box-shadow-bottom bg-white" style="justify-content: center;">
|
|
<a class="btn btn-primary btn-block m-0 shop-tab active" href="/shop/awards">
|
|
<span class="mr-auto ml-auto"><i class="fas fa-gift mr-2"></i>AWARDS</span>
|
|
</a>
|
|
<a class="btn btn-primary btn-block m-0 shop-tab" href="/shop/hats">
|
|
<span class="mr-auto ml-auto"><i class="fas fa-hat-cowboy mr-2"></i>HATS</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<header id="shop-header" class="container text-center pb-0">
|
|
<img loading="lazy" id="shop-banner" alt="shop banner" src="{{SITE_FULL_IMAGES}}/i/shop.webp">
|
|
<ul id="shop-stats" class="my-1 my-md-2">
|
|
<li>Number of awards you bought: {{v.num_of_bought_awards}}</li>
|
|
<li>Coins you spent on awards: {{"{:,}".format(v.coins_spent)}}</li>
|
|
<li>Total award sales: {{"{:,}".format(sales)}}</li>
|
|
<li>Your current coins: {{"{:,}".format(v.coins)}}</li>
|
|
{% if FEATURES['MARSEYBUX'] %}
|
|
<li>Your current marseybux: {{"{:,}".format(v.marseybux)}}</li>
|
|
{% endif %}
|
|
<li>Your total award discount: {{v.formatted_discount}}</li>
|
|
</ul>
|
|
</header>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="overflow-x-auto mt-3 mb-5"><table class="table table-striped shop">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th class="disable-sort-click">Icon</th>
|
|
<th>Title</th>
|
|
<th>Price</th>
|
|
<th>Owned</th>
|
|
<th class="disable-sort-click">Buy</th>
|
|
<th>Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for a in awards %}
|
|
{% set kind = a['kind'] %}
|
|
{% set price = a['price'] %}
|
|
<tr>
|
|
<td class="shop-table-icon"><i class="{{a['icon']}} {{a['color']}}" style="font-size: 30px"></i></td>
|
|
<td class="shop-table-title">{{a['title']}}</td>
|
|
{% if a['baseprice'] != price %}
|
|
<td class="shop-table-price">
|
|
<span class="discounted-price">{{a['baseprice']}}</span> <em class="text-success">{{price}}</em>
|
|
</td>
|
|
{% else %}
|
|
<td class="shop-table-price">{{price}}</td>
|
|
{% endif %}
|
|
<td class="shop-table-owned">{{a['owned']}}</td>
|
|
<td class="shop-table-actions">
|
|
<button type="button" id="buy-{{loop.index}}" class="btn btn-success {% if v.coins+v.marseybux < price or (kind == 'grass' and v.coins < price) or (kind == 'benefactor' and v.marseybux < price) %}disabled{% endif %}" data-areyousure="postToastSwitch(this,'/buy/{{kind}}')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)">Buy</button>
|
|
</td>
|
|
<td class="shop-table-description">{{a['description']}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
|
|
{% endblock %}
|