MarseyWorld/files/templates/followers.html

36 lines
1.2 KiB
HTML
Raw Normal View History

2021-07-21 01:12:26 +00:00
{% extends "default.html" %}
{% block content %}
2021-09-28 20:54:33 +00:00
<script>
function removeFollower(event, username) {
post_toast('/remove_follow/' + username);
let table = document.getElementById("followers-table");
table.removeChild(event.target.parentElement.parentElement);
}
</script>
2021-07-30 09:02:53 +00:00
<pre></pre>
2021-07-21 01:12:26 +00:00
<h5>@{{u.username}}'s followers</h5>
<pre></pre>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th style="font-weight: bold">#</th>
<th style="font-weight: bold">Name</th>
2021-09-28 20:54:33 +00:00
{% if v.id == u.id %}
<th style="font-weight: bold"></th>
{% endif %}
2021-07-21 01:12:26 +00:00
</tr>
</thead>
2021-09-28 20:54:33 +00:00
<tbody id="followers-table">
2021-07-21 01:12:26 +00:00
{% for user in users %}
<tr>
2021-09-05 09:49:48 +00:00
<td style="font-weight: bold">{{loop.index}}</td>
2021-09-03 14:08:32 +00:00
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic/profile" class="profile-pic-20 mr-1"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
2021-09-28 20:54:33 +00:00
{% if v.id == u.id %}
<td><div class="btn btn-danger" onclick="removeFollower(event, '{{user.username}}')">Remove follow</div></td>
{% endif %}
2021-07-21 01:12:26 +00:00
</tr>
{% endfor %}
2021-09-28 20:54:33 +00:00
</tbody>
2021-07-21 01:12:26 +00:00
</table>
{% endblock %}