Monorepo for Tangled
1{{ define "user/fragments/followCard" }}
2{{ $userIdent := resolve .UserDid }}
3<div class="flex flex-col divide-y divide-gray-200 dark:divide-gray-700 rounded-sm">
4 <div class="py-4 px-6 drop-shadow-sm rounded bg-white dark:bg-gray-800 flex items-center gap-4">
5 <div class="flex-shrink-0 max-h-full w-24 h-24">
6 <img class="object-cover rounded-full p-2" src="{{ fullAvatar $userIdent }}" alt="{{ $userIdent }}" />
7 </div>
8
9 <div class="flex flex-col md:flex-row md:items-center md:justify-between gap-2 w-full min-w-0">
10 <div class="flex-1 min-h-0 justify-around flex flex-col">
11 <a href="/{{ $userIdent }}">
12 <span class="font-bold dark:text-white overflow-hidden text-ellipsis whitespace-nowrap max-w-full">{{
13 $userIdent | truncateAt30 }}</span>
14 </a>
15 {{ with .Profile }}
16 <p class="text-sm pb-2 md:pb-2 break-words">{{.Description}}</p>
17 {{ end }}
18 <div class="text-sm flex items-center gap-2 my-2 overflow-hidden text-ellipsis whitespace-nowrap max-w-full">
19 <span class="flex-shrink-0">{{ i "users" "size-4" }}</span>
20 <span id="followers" data-followers-did="{{ .UserDid }}"><a href="/{{ $userIdent }}?tab=followers">{{
21 .FollowersCount }} followers</a></span>
22 <span class="select-none after:content-['·']"></span>
23 <span id="following"><a href="/{{ $userIdent }}?tab=following">{{ .FollowingCount }} following</a></span>
24 </div>
25 </div>
26 {{ if and .LoggedInUser (ne .FollowStatus.String "IsSelf") }}
27 <div class="w-full md:w-auto md:max-w-24 order-last md:order-none">
28 {{ template "user/fragments/follow" . }}
29 </div>
30 {{ end }}
31 </div>
32 </div>
33</div>
34{{ end }}