add: followers/following ui
This commit is contained in:
parent
17564ede49
commit
e183a01887
13 changed files with 469 additions and 86 deletions
|
@ -34,14 +34,14 @@
|
|||
<div class="card flex flex-col gap-2" id="social">
|
||||
<div class="w-full flex">
|
||||
<a
|
||||
href="/user/{{ profile.username }}/followers"
|
||||
href="/@{{ profile.username }}/followers"
|
||||
class="w-full flex justify-center items-center gap-2"
|
||||
>
|
||||
<h4>{{ profile.follower_count }}</h4>
|
||||
<span>{{ text "auth:label.followers" }}</span>
|
||||
</a>
|
||||
<a
|
||||
href="/user/{{ profile.username }}/following"
|
||||
href="/@{{ profile.username }}/following"
|
||||
class="w-full flex justify-center items-center gap-2"
|
||||
>
|
||||
<h4>{{ profile.following_count }}</h4>
|
||||
|
|
22
crates/app/src/public/html/profile/followers.html
Normal file
22
crates/app/src/public/html/profile/followers.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% import "macros.html" as macros %} {% extends "profile/base.html" %} {% block
|
||||
content %}
|
||||
<div class="card-nest">
|
||||
<div class="card small flex gap-2 items-center">
|
||||
{{ icon "users-round" }}
|
||||
<span>{{ text "auth:label.followers" }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card flex flex-col gap-4">
|
||||
<!-- prettier-ignore -->
|
||||
{% for item in list %}
|
||||
<div class="card-nest">
|
||||
<div class="card small">
|
||||
Since <span class="date">{{ item[0].created }}</span>
|
||||
</div>
|
||||
|
||||
{{ components::user_card(user=item[1]) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
22
crates/app/src/public/html/profile/following.html
Normal file
22
crates/app/src/public/html/profile/following.html
Normal file
|
@ -0,0 +1,22 @@
|
|||
{% import "macros.html" as macros %} {% extends "profile/base.html" %} {% block
|
||||
content %}
|
||||
<div class="card-nest">
|
||||
<div class="card small flex gap-2 items-center">
|
||||
{{ icon "users-round" }}
|
||||
<span>{{ text "auth:label.following" }}</span>
|
||||
</div>
|
||||
|
||||
<div class="card flex flex-col gap-4">
|
||||
<!-- prettier-ignore -->
|
||||
{% for item in list %}
|
||||
<div class="card-nest">
|
||||
<div class="card small">
|
||||
Since <span class="date">{{ item[0].created }}</span>
|
||||
</div>
|
||||
|
||||
{{ components::user_card(user=item[1]) }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue