forked from rDrama/rDrama
161 lines
5.4 KiB
HTML
161 lines
5.4 KiB
HTML
{% extends "default.html" %}
|
|
|
|
{% block title %}
|
|
<title>Shop</title>
|
|
{% endblock %}
|
|
|
|
{% block pagetype %}message{% endblock %}
|
|
|
|
{% block subHeader %}
|
|
<div class="relative max-w-screen-2xl mx-auto px-4 py-4 grid grid-cols-12 rounded-t-md">
|
|
<div class="absolute top-0 left-0 w-full h-full bg-gradient-to-t from-gray-800 to-gray-700 rounded-t-md sub-header-shadow"></div>
|
|
<div class="relative col-span-full flex items-center">
|
|
<div>
|
|
<h1 class="font-bold text-xl font-heading leading-normal">
|
|
Shop
|
|
</h1>
|
|
<small class="block text-gray-400">
|
|
Stir drama. Earn coins.
|
|
</small>
|
|
</div>
|
|
<ul class="ml-auto flex space-x-2 text-sm">
|
|
<li>
|
|
<strong class="text-gray-500">Total sales:</strong> {{sales}}
|
|
</li>
|
|
<li>
|
|
<strong class="text-gray-500">Spent by you:</strong> {{v.coins_spent}}
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="col-span-full">
|
|
{% if error %}
|
|
<div class="alert alert-danger alert-dismissible fade show my-3" role="alert">
|
|
<i class="fas fa-exclamation-circle my-auto"></i>
|
|
<span>
|
|
{{error}}
|
|
</span>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
{% if msg %}
|
|
<div class="alert alert-success alert-dismissible fade show my-3" role="alert">
|
|
<i class="fas fa-check-circle my-auto" aria-hidden="true"></i>
|
|
<span>
|
|
{{msg}}
|
|
</span>
|
|
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
|
|
<span aria-hidden="true"><i class="far fa-times"></i></span>
|
|
</button>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- <img src="/assets/images/shop.webp" width="50%"/> -->
|
|
|
|
<!-- This example requires Tailwind CSS v2.0+ -->
|
|
<div class="flex flex-col">
|
|
<div class="-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8">
|
|
<div class="py-2 align-middle inline-block min-w-full sm:px-6 lg:px-8">
|
|
<div class="my-4 flex flex-col bg-gray-900 rounded-lg overflow-hidden">
|
|
<table class="min-w-full">
|
|
<thead class="bg-gray-700">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
|
|
Item
|
|
</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
|
|
Description
|
|
</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
|
|
Price
|
|
</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
|
|
Owned
|
|
</th>
|
|
<th scope="col" class="relative px-6 py-3">
|
|
<span class="sr-only">Buy</span>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-gray-900 divide-y divide-gray-900">
|
|
{% for a in awards %}
|
|
<tr class="shadow-inset-t-white-05 {% if awards.index(a) % 2 != 0 %}bg-gray-700 bg-opacity-20{% endif %}">
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="flex items-center">
|
|
<div class="flex items-center justify-center flex-shrink-0 h-10 w-10">
|
|
<i class="{{a['icon']}} {{a['color']}} fa-fw text-xl"></i>
|
|
</div>
|
|
<div class="ml-4">
|
|
<div class="text-base font-bold">
|
|
{{a['title']}}
|
|
</div>
|
|
<div class="text-sm text-gray-500 capitalize">{{a['kind']}}</div>
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<div class="text-sm text-gray-300">{{a['description']}}</div>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap">
|
|
<span class="inline-flex items-center px-1 py-0.5 text-xs text-green-900 text-shadow-light bg-green-400 font-bold leading-5 rounded">
|
|
<img src="https://i.ibb.co/xFgG6yf/Coinfixed.gif" width="14px" height="10px" class="object-contain mr-1" style="filter: grayscale(100%) sepia(100%) hue-rotate(90deg);">
|
|
{{a['price']}}
|
|
</span>
|
|
</td>
|
|
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
|
|
{{a['owned']}}
|
|
</td>
|
|
{% set kind = a['kind'] %}
|
|
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
|
|
<button class="ml-auto block px-4 py-2 bg-gradient-to-t from-pink-700 to-pink-600 hover:from-pink-600 hover:to-pink-700 active:shadow-inner border border-gray-900 rounded-md text-shadow-t shadow-inset-t-white-10 text-sm font-bold text-gray-300 focus:text-gray-500 focus:outline-none {% if v.coins < a['price'] %}disabled{% endif %}" onclick="post_toast('/buy/{{kind}}')">
|
|
Buy
|
|
</button>
|
|
{% if v.procoins and a['price'] < 3600 %}
|
|
<a class="d-flex marseybux btn btn-success {% if v.procoins < a['price'] %}disabled{% endif %}" href="javascript:void(0)" onclick="post_toast('/buy/{{kind}}?mb=true')">
|
|
<span class="m-auto">Buy with Marseybux</span>
|
|
</a>
|
|
{% endif %}
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
|
|
<!-- More people... -->
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<style>
|
|
@media (max-width: 768px) {
|
|
.table th {
|
|
padding-left: 0.3rem !important;
|
|
padding-right: 0.3rem !important;
|
|
}
|
|
.table td {
|
|
padding-left: 0.3rem !important;
|
|
padding-right: 0.3rem !important;
|
|
font-size: 0.9rem;
|
|
}
|
|
.marseybux {
|
|
font-size: 0.7rem !important;
|
|
}
|
|
}
|
|
|
|
.tooltip-inner {
|
|
font-size: 1.5rem;
|
|
max-width: 300px;
|
|
}
|
|
</style>
|
|
{% endblock %}
|