rDrama/files/templates/hats.html

81 lines
3.3 KiB
HTML
Raw Normal View History

{% extends "default.html" %}
{% block title %}
<title>Hats</title>
{% endblock %}
{% block pagetype %}message{% endblock %}
{% block content %}
<pre>
</pre>
<div class="overflow-x-auto"><table class="table table-striped shop">
<thead class="bg-primary text-white">
<tr>
<th scope="col">Hat</th>
<th scope="col">Name</th>
<th scope="col">Description</th>
{% if SITE == 'rdrama.net' %}
<th scope="col">Author</th>
{% endif %}
<th scope="col">Price</th>
<th scope="col">Actions</th>
</tr>
</thead>
<tbody>
2022-09-03 00:27:19 +00:00
{% for hat, user in owned %}
<tr>
<td><img loading="lazy" alt="{{hat.name}}" src="/i/hats/{{hat.name}}.webp"></td>
<td>{{hat.name}}</td>
<td>{{hat.description}}</td>
{% if SITE == 'rdrama.net' %}
<td><a style="color:#{{user.name_color}}" href="/@{{user.username}}"><img loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.username}}</span></a></td>
{% endif %}
<td>{{hat.price}}</td>
<td class="shop-table-actions">
2022-09-03 00:27:19 +00:00
{% if hat.id == v.equipped_hat.id %}
<a id="unequip-{{hat.id}}" class="unequip btn btn-success" role="button" onclick="post_toast(this,'/unequip_hat',true)"><span class="m-auto">Unequip</span></a>
{% else %}
2022-09-03 00:27:19 +00:00
<a id="equip-{{hat.id}}" class="equip btn btn-success" role="button" onclick="post_toast(this,'/equip_hat/{{hat.id}}',true)"><span class="m-auto">Equip</span></a>
{% endif %}
</td>
</tr>
{% endfor %}
{% for hat, user in not_owned %}
<tr>
<td><img loading="lazy" alt="{{hat.name}}" src="/i/hats/{{hat.name}}.webp"></td>
<td>{{hat.name}}</td>
<td>{{hat.description}}</td>
{% if SITE == 'rdrama.net' %}
<td><a style="color:#{{user.name_color}}" href="/@{{user.username}}"><img loading="lazy" src="{{user.profile_url}}" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.name_color}}"{% endif %}>{{user.username}}</span></a></td>
{% endif %}
<td>{{hat.price}}</td>
<td class="shop-table-actions">
<a id="buy1-{{hat.id}}" class="btn btn-success {% if v.coins < hat.price %}disabled{% endif %}" role="button" onclick="this.classList.add('d-none');document.getElementById('buy1-go-{{hat.id}}').classList.remove('d-none')"><span class="m-auto">Buy</span></a>
2022-09-03 00:27:19 +00:00
<a id="buy1-go-{{hat.id}}" class="d-none btn btn-success {% if v.coins < hat.price %}disabled{% endif %}" role="button" onclick="post_toast(this,'/buy_hat/{{hat.id}}',true)"><span class="m-auto">Are you sure?</span></a>
2022-09-03 00:27:19 +00:00
{% if FEATURES['PROCOINS'] %}
<a id="buy2-{{hat.id}}" class="marseybux btn btn-success {% if v.procoins < hat.price %}disabled{% endif %}" role="button" onclick="this.classList.add('d-none');document.getElementById('buy2-go-{{hat.id}}').classList.remove('d-none')"><span class="m-auto">Buy with MBux</span></a>
2022-09-03 00:27:19 +00:00
<a id="buy2-go-{{hat.id}}" class="d-none marseybux btn btn-success {% if v.procoins < hat.price %}disabled{% endif %}" role="button" onclick="post_toast(this,'/buy_hat/{{hat.id}}?mb=true',true)"><span class="m-auto">Are you sure?</span></a>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<pre>
</pre>
{% endblock %}