mirror of https://github.com/go-gitea/gitea.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
- Use htmx to perform the button request - `hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}'` to authenticate (we should probably learn to reuse this) - `hx-post="{{.ContextUser.HomeLink}}?action=follow"` to send a POST request to follow the user - `hx-target="#profile-avatar-card"` to target the card div for replacement - `hx-swap="outerHTML"` to replace the card (as opposed to its inner content) with the new card that shows the new follower count and button color - Change the backend response to return a `<div>` tag (the card) instead of a redirect to the user page # Before  # After  Signed-off-by: Yarden Shoham <git@yardenshoham.com> |
1 year ago | |
---|---|---|
.. | ||
admin | 1 year ago | |
api/packages/pypi | 2 years ago | |
base | 1 year ago | |
code | 1 year ago | |
custom | 5 years ago | |
devtest | 1 year ago | |
explore | 1 year ago | |
2 years ago | ||
org | 1 year ago | |
package | 1 year ago | |
projects | 1 year ago | |
repo | 1 year ago | |
shared | 1 year ago | |
status | 1 year ago | |
swagger | 1 year ago | |
user | 1 year ago | |
webhook | 2 years ago | |
home.tmpl | 2 years ago | |
install.tmpl | 2 years ago | |
post-install.tmpl | 2 years ago |