41 lines
1.3 KiB
HTML
41 lines
1.3 KiB
HTML
{% extends "default.html" %}
|
|
{% block content %}
|
|
<script>
|
|
window.addEventListener("load",function(event) {
|
|
function removeFollower(event, username) {
|
|
post_toast('/remove_follow/' + username);
|
|
let table = document.getElementById("followers-table");
|
|
table.removeChild(event.target.parentElement.parentElement);
|
|
}
|
|
});
|
|
</script>
|
|
<pre>
|
|
|
|
|
|
</pre>
|
|
<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>
|
|
{% if v.id == u.id %}
|
|
<th style="font-weight: bold"></th>
|
|
{% endif %}
|
|
</tr>
|
|
</thead>
|
|
<tbody id="followers-table">
|
|
{% for user in users %}
|
|
<tr>
|
|
<td style="font-weight: bold">{{loop.index}}</td>
|
|
<td><a style="color:#{{user.namecolor}}; font-weight:bold;" href="/@{{user.username}}"><img loading="lazy" src="/uid/{{user.id}}/pic" class="pp20"><span {% if user.patron %}class="patron" style="background-color:#{{user.namecolor}};"{% endif %}>{{user.username}}</span></a></td>
|
|
{% if v.id == u.id %}
|
|
<td><div class="btn btn-danger pr-2" onclick="removeFollower(event, '{{user.username}}')">Remove follow</div></td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
{% endblock %} |