this repo has no description
at master 709 B view raw
1{{ define "user/fragments/follow" }} 2 <button id="{{ normalizeForHtmlId .UserDid }}" 3 class="btn w-full flex gap-2 items-center group" 4 5 {{ if eq .FollowStatus.String "IsNotFollowing" }} 6 hx-post="/follow?subject={{.UserDid}}" 7 {{ else }} 8 hx-delete="/follow?subject={{.UserDid}}" 9 {{ end }} 10 11 hx-trigger="click" 12 hx-target="#{{ normalizeForHtmlId .UserDid }}" 13 hx-swap="outerHTML" 14 > 15 {{ if eq .FollowStatus.String "IsNotFollowing" }} 16 {{ i "user-round-plus" "w-4 h-4" }} follow 17 {{ else }} 18 {{ i "user-round-minus" "w-4 h-4" }} unfollow 19 {{ end }} 20 {{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }} 21 </button> 22{{ end }}