forked from MarseyWorld/MarseyWorld
112 lines
3.8 KiB
HTML
112 lines
3.8 KiB
HTML
{% extends "default.html" %}
|
|
{%- set SHOP_FLAVOR = {
|
|
'rDrama': 'Stir drama.',
|
|
'PCM': 'Watch IP2.',
|
|
'WPD': 'Watch people die.',
|
|
}[SITE_NAME]
|
|
-%}
|
|
{% block pagetitle %}Shop{% endblock %}
|
|
{% block pagetype %}message{% endblock %}
|
|
{% block banner %}
|
|
<style>
|
|
.shop-tabs {
|
|
padding-top: 50px;
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
#shop-banner {
|
|
width: 80%;
|
|
}
|
|
.shop-tabs {
|
|
padding-top: 30px;
|
|
}
|
|
}
|
|
|
|
.shop-tab {
|
|
display: inline-flex;
|
|
max-width: 46.6%;
|
|
letter-spacing: 3px;
|
|
border-radius: 0;
|
|
}
|
|
|
|
.shop-tab.active {
|
|
background-color: var(--primary) !important;
|
|
pointer-events: none !important;
|
|
cursor: default !important;
|
|
}
|
|
</style>
|
|
|
|
<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">
|
|
<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="/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 class="container pb-1 text-center">
|
|
<img id="shop-banner" alt="shop banner" src="/i/shop.webp">
|
|
<h3 class="mt-4">{{SHOP_FLAVOR}} Earn coins.</h5>
|
|
<h5 class="mt-4">Total sales: {{"{:,}".format(sales)}} coins</h5>
|
|
<h5 class="mt-4">Coins spent by you: {{"{:,}".format(v.coins_spent)}} coins</h5>
|
|
<h5 class="mt-4">Lootboxes bought by you: {{v.lootboxes_bought}} lootbox{{'es' if v.lootboxes_bought != 1}}</h5>
|
|
<h5 class="mt-4">Your current coins: {{"{:,}".format(v.coins)}}</h5>
|
|
{% if FEATURES['MARSEYBUX'] %}
|
|
<h5 class="mt-4">Your current marseybux: {{"{:,}".format(v.marseybux)}}</h3>
|
|
{% endif %}
|
|
</header>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="overflow-x-auto mt-1 mb-5"><table class="table table-striped shop">
|
|
<thead class="bg-primary text-white">
|
|
<tr>
|
|
<th scope="col">Icon</th>
|
|
<th scope="col">Title</th>
|
|
<th scope="col">Price</th>
|
|
<th scope="col" onclick="sort_table(3)">Owned</th>
|
|
<th scope="col">Buy</th>
|
|
<th scope="col">Description</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for a in awards %}
|
|
<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'] != a['price'] %}
|
|
<td class="shop-table-price">
|
|
<strike>{{a['baseprice']}}</strike> <em class="text-success">{{a['price']}}</em>
|
|
</td>
|
|
{% else %}
|
|
<td class="shop-table-price">{{a['price']}}</td>
|
|
{% endif %}
|
|
<td class="shop-table-owned">{{a['owned']}}</td>
|
|
{% set kind = a['kind'] %}
|
|
<td class="shop-table-actions">
|
|
{% if kind != "benefactor" %}
|
|
<button type="button" id="buy1-{{loop.index}}" class="btn btn-success {% if v.coins < a['price'] %}disabled{% endif %}" data-click="postToastSwitch(this,'/buy/{{kind}}')" onclick="areyousure(this)"><span class="m-auto">Buy</span></button>
|
|
{% endif %}
|
|
{% if FEATURES['MARSEYBUX'] %}
|
|
{% if kind != "grass" %}
|
|
<button type="button" id="buy2-{{loop.index}}" class="marseybux btn btn-success {% if v.marseybux < a['price'] %}disabled{% endif %}" data-click="postToastSwitch(this,'/buy/{{kind}}?mb=true')" onclick="areyousure(this)"><span class="m-auto">Buy with MBux</span></button>
|
|
{% endif %}
|
|
{% endif %}
|
|
</td>
|
|
<td class="shop-table-description">{{a['description']}}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</table>
|
|
</div>
|
|
<script defer src="{{'js/sort_table.js' | asset}}"></script>
|
|
{% endblock %}
|