rDrama/files/templates/shop.html

165 lines
5.5 KiB
HTML
Raw Normal View History

2021-10-21 13:30:05 +00:00
{% extends "default.html" %}
{% block title %}
<title>Shop</title>
{% endblock %}
{% block pagetype %}message{% endblock %}
2021-11-25 21:31:38 +00:00
{% block subHeader %}
2021-11-25 21:38:53 +00:00
<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>
2021-11-25 21:31:38 +00:00
</div>
2021-11-25 22:47:09 +00:00
<ul class="ml-auto flex space-x-4">
2021-11-25 21:38:53 +00:00
<li>
2021-11-25 22:47:49 +00:00
<strong class="text-lg md:text-2xl">
2021-11-25 22:46:23 +00:00
{{sales}}
</strong>
2021-11-25 22:47:09 +00:00
<small class="text-gray-400">total sales</small>
2021-11-25 21:38:53 +00:00
</li>
<li>
2021-11-25 22:47:49 +00:00
<strong class="text-lg md:text-2xl">
2021-11-25 22:47:09 +00:00
{{v.coins_spent}}
</strong>
<small class="text-gray-400">spent by you</small>
2021-11-25 21:38:53 +00:00
</li>
</ul>
2021-11-25 21:31:38 +00:00
</div>
2021-11-25 21:38:53 +00:00
</div>
2021-11-25 21:31:38 +00:00
{% endblock %}
2021-10-21 13:30:05 +00:00
{% block content %}
2021-11-25 21:38:53 +00:00
<div class="col-span-full">
2021-10-21 20:50:15 +00:00
{% 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 %}
2021-11-25 21:40:21 +00:00
<!-- <img src="/assets/images/shop.webp" width="50%"/> -->
2021-10-21 20:50:15 +00:00
2021-11-25 21:38:53 +00:00
<!-- 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">
2021-11-25 22:19:35 +00:00
<div class="my-4 flex flex-col bg-gray-900 rounded-lg overflow-hidden">
2021-11-25 22:17:09 +00:00
<table class="min-w-full">
2021-11-25 22:19:35 +00:00
<thead class="bg-gray-700">
2021-11-25 21:38:53 +00:00
<tr>
2021-11-25 22:19:35 +00:00
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
2021-11-25 21:45:11 +00:00
Item
2021-11-25 21:38:53 +00:00
</th>
2021-11-25 22:19:35 +00:00
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
2021-11-25 21:45:11 +00:00
Description
2021-11-25 21:38:53 +00:00
</th>
2021-11-25 22:19:35 +00:00
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
2021-11-25 22:34:58 +00:00
Price
2021-11-25 21:38:53 +00:00
</th>
2021-11-25 22:19:35 +00:00
<th scope="col" class="px-6 py-3 text-left text-xs font-bold text-gray-400 uppercase tracking-wider">
2021-11-25 21:40:21 +00:00
Owned
2021-11-25 21:38:53 +00:00
</th>
<th scope="col" class="relative px-6 py-3">
2021-11-25 21:40:21 +00:00
<span class="sr-only">Buy</span>
2021-11-25 21:38:53 +00:00
</th>
</tr>
</thead>
2021-11-25 22:19:35 +00:00
<tbody class="bg-gray-900 divide-y divide-gray-900">
2021-11-25 21:40:21 +00:00
{% for a in awards %}
2021-11-25 22:19:35 +00:00
<tr class="shadow-inset-t-white-05 {% if awards.index(a) % 2 != 0 %}bg-gray-700 bg-opacity-20{% endif %}">
2021-11-25 21:38:53 +00:00
<td class="px-6 py-4 whitespace-nowrap">
<div class="flex items-center">
2021-11-25 21:43:31 +00:00
<div class="flex items-center justify-center flex-shrink-0 h-10 w-10">
2021-11-25 22:44:35 +00:00
<i class="{{a['icon']}} {{a['color']}} fa-fw text-lg"></i>
2021-11-25 21:38:53 +00:00
</div>
<div class="ml-4">
2021-11-25 22:09:20 +00:00
<div class="text-base font-bold">
2021-11-25 21:45:11 +00:00
{{a['title']}}
2021-11-25 21:38:53 +00:00
</div>
2021-11-25 22:34:58 +00:00
<div class="text-sm text-gray-500 capitalize">{{a['kind']}}</div>
2021-11-25 21:38:53 +00:00
</div>
</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
2021-11-25 22:44:02 +00:00
<div class="text-sm text-gray-400">{{a['description']}}</div>
2021-11-25 21:38:53 +00:00
</td>
<td class="px-6 py-4 whitespace-nowrap">
2021-11-25 22:43:03 +00:00
<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);">
2021-11-25 22:34:11 +00:00
{{a['price']}}
2021-11-25 21:38:53 +00:00
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">
2021-11-25 21:47:33 +00:00
{{a['owned']}}
2021-11-25 21:38:53 +00:00
</td>
2021-11-25 22:21:35 +00:00
{% set kind = a['kind'] %}
2021-11-25 21:38:53 +00:00
<td class="px-6 py-4 whitespace-nowrap text-right text-sm font-medium">
2021-11-25 22:39:24 +00:00
<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}}')">
2021-11-25 22:37:06 +00:00
Buy
</button>
2021-11-25 22:21:35 +00:00
{% 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 %}
2021-11-25 21:38:53 +00:00
</td>
</tr>
2021-11-25 21:40:21 +00:00
{% endfor %}
2021-11-25 21:38:53 +00:00
</tbody>
</table>
</div>
</div>
</div>
</div>
2021-10-21 20:50:15 +00:00
2021-11-25 21:38:53 +00:00
</div>
{% endblock %}
2021-10-22 23:50:00 +00:00
2021-11-25 21:38:53 +00:00
{% block scripts %}
<style>
@media (max-width: 768px) {
.table th {
padding-left: 0.3rem !important;
padding-right: 0.3rem !important;
2021-10-22 23:50:00 +00:00
}
2021-11-25 21:38:53 +00:00
.table td {
padding-left: 0.3rem !important;
padding-right: 0.3rem !important;
font-size: 0.9rem;
2021-10-27 00:37:34 +00:00
}
2021-11-25 21:38:53 +00:00
.marseybux {
font-size: 0.7rem !important;
}
}
.tooltip-inner {
font-size: 1.5rem;
max-width: 300px;
}
</style>
2021-10-21 13:30:05 +00:00
{% endblock %}