2021-10-15 14:08:27 +00:00
|
|
|
{% for u in users %}
|
2021-12-01 23:28:59 +00:00
|
|
|
<div class="my-2 px-2 w-1/2 overflow-hidden lg:w-1/3 xl:w-1/5">
|
2021-12-01 23:32:18 +00:00
|
|
|
<div id="user-{{u.id}}" class="shadow-sm rounded bg-gray-200 border border-gray-300 h-full">
|
2021-12-01 23:28:11 +00:00
|
|
|
<div class="relative">
|
|
|
|
<img loading="lazy" src="{{u.banner_url}}" class="object-cover" alt="@{{u.username}} user banner" height=175>
|
2021-12-04 12:50:49 +00:00
|
|
|
<div class="absolute bottom-3 left-3">
|
|
|
|
<img loading="lazy" src="{{u.profile_url}}" class="h-12 w-12 bg-white p-[3px] border border-gray-300">
|
2021-12-04 12:50:02 +00:00
|
|
|
</div>
|
2021-12-01 23:28:11 +00:00
|
|
|
</div>
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 23:32:18 +00:00
|
|
|
<div class="break-word">
|
2021-12-04 12:50:49 +00:00
|
|
|
<div class="flex flex-wrap justify-between items-center p-3">
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 23:32:55 +00:00
|
|
|
<a class="card-title text-break h5 mb-0" href="{{u.url}}">@{{u.username}}</a>
|
2021-10-15 14:08:27 +00:00
|
|
|
|
2021-12-01 23:28:11 +00:00
|
|
|
{% if v %}
|
2021-12-01 23:30:17 +00:00
|
|
|
{% if v.id!=u.id and not u.is_private and not u.is_nofollow %}
|
2021-12-01 23:32:18 +00:00
|
|
|
<div id="button-sub-{{u.id}}" class="{% if u.has_follower(v) %}hidden{% endif %} z-10">
|
2021-12-01 23:30:17 +00:00
|
|
|
<button class="btn btn-green" onclick="post_toast2('/follow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}')">Follow
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% if u.id != 995 %}
|
2021-12-01 23:32:18 +00:00
|
|
|
<div id="button-unsub-{{u.id}}" class="{% if not u.has_follower(v) %}hidden{% endif %} z-10">
|
2021-12-01 23:30:17 +00:00
|
|
|
<button class="btn btn-gray" onclick="post_toast2('/unfollow/{{u.username}}','button-sub-{{u.id}}','button-unsub-{{u.id}}')">Unfollow
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
2021-12-01 23:28:11 +00:00
|
|
|
{% else %}
|
2021-12-01 23:32:18 +00:00
|
|
|
<div id="button-sub-{{u.id}}" class="z-10">
|
2021-12-01 23:30:17 +00:00
|
|
|
<a class="btn btn-green " href="/signup?redirect={{request.path}}">Follow</a>
|
|
|
|
</div>
|
2021-10-15 14:08:27 +00:00
|
|
|
{% endif %}
|
|
|
|
</div>
|
2021-12-01 23:28:11 +00:00
|
|
|
|
|
|
|
{% if not hide_bios and u.bio_html %}
|
2021-12-01 23:32:18 +00:00
|
|
|
<div class="text-black">
|
|
|
|
{{u.bio_html | safe}}
|
|
|
|
</div>
|
2021-12-01 23:28:11 +00:00
|
|
|
{% endif %}
|
2021-10-15 14:08:27 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-12-01 23:28:11 +00:00
|
|
|
</div>
|
|
|
|
{% endfor %}
|