offline-twitter/pkg/webserver/tpl/includes/following_button.tpl
2025-02-15 19:46:10 -08:00

18 lines
348 B
Smarty

{{define "following-button"}}
{{if .IsFollowed}}
<button class="following-button"
hx-post="/unfollow/{{.Handle}}"
hx-swap="outerHTML"
>
Unfollow
</button>
{{else}}
<button class="following-button"
hx-post="/follow/{{.Handle}}"
hx-swap="outerHTML"
>
Follow
</button>
{{end}}
{{end}}