rDrama/files/templates/hole/holes.html

60 lines
2.2 KiB
HTML

{% extends "default.html" %}
{% block pagetitle %}Holes{% endblock %}
{% block content %}
<h3 class="mt-3">Create Hole</h3>
<form class="mt-3" id="submitform" action="/create_hole" method="post" data-nonce="{{g.nonce}}">
<div class="container pb-0">
<div class="row mb-4">
<div class="col col-md-6 p-3 py-md-0">
<div class="body">
<input hidden name="formkey" value="{{v|formkey}}" class="notranslate" translate="no">
<label for="create-hole-name">Hole Name</label>
<input autocomplete="off" minlength="3" maxlength="25" pattern='[a-zA-Z0-9_\-]*' class="form-control" id="create-hole-name" type="text" name="name" required>
<small class="form-text text-muted">3-25 characters, including letters, numbers, _ , and -</small>
{% if HOLE_INACTIVITY_DELETION or True %}
<p class="text-danger mt-2">Warning: holes get automatically deleted if they spend 7 days with no new posts.</p>
{% endif %}
<div class="footer">
<div class="d-flex">
<button type="submit" class="btn btn-primary ml-auto" {% if cost > v.coins + v.marseybux %}disabled{% endif %}>Create Hole</button>
</div>
<p class="mt-2 mr-1" style="float: right"><b>Cost</b>: {{cost}} coins or marseybux</p>
</div>
</div>
</div>
</div>
</div>
</form>
<h3 class="mb-3">Holes</h3>
<div class="overflow-x-auto">
<table>
<thead>
<tr>
<th>#</th>
<th>Name</th>
<th>Posts</th>
<th>Followers</th>
<th>Blockers</th>
<th>Created on</th>
</tr>
</thead>
{% for hole, count in holes %}
<tr>
<td>{{loop.index}}</td>
<td><a href="/h/{{hole}}">{{hole}} {% if hole.name in v.hole_blocks %}<span class="text-danger">[blocked, visit it to unblock it]</span>{% endif %}</a></td>
<td><a href="/h/{{hole}}">{{count}}</a></td>
<td><a href="/h/{{hole}}/followers">{{hole.follow_num}}</a></td>
{% if hole.stealth %}
<td>{{total_users - hole.stealth_hole_unblock_num}}</td>
{% else %}
<td><a href="/h/{{hole}}/blockers">{{hole.block_num}}</a></td>
{% endif %}
<td data-time="{{hole.created_utc}}"></td>
</tr>
{% endfor %}
</table>
</div>
{% endblock %}