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.
c1331d1f7a
# Preview Tab - Removed the jQuery AJAX call and replaced with our fetch wrapper - Tested the preview tab functionality and it works as before # Diff Tab - Removed the jQuery AJAX call and replaced with htmx - Tested the diff tab functionality and it works as before ## htmx Attributes - `hx-post="{{.RepoLink}}..."`: make a POST request to the endpoint - `hx-indicator=".tab[data-tab='diff']"`: attach the loading indicator to the tab body - `hx-target=".tab[data-tab='diff']"`: target the tab body for swapping with the response - `hx-swap="innerHTML"`: swap the target's inner HTML - `hx-include="#edit_area"`: include the value of the textarea (content) in the request body - `hx-vals='{"context":"{{.BranchLink}}"}'`: include the context in the request body - `hx-params="context,content"`: include only these keys in the request body # Demo using `fetch` and `htmx` instead of jQuery AJAX ![demo](https://github.com/go-gitea/gitea/assets/20454870/585cd6e8-f329-4c9e-ab53-a540acbd7988) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> |
11 months ago | |
---|---|---|
.. | ||
admin | 11 months ago | |
api/packages/pypi | 2 years ago | |
base | 11 months ago | |
code | 11 months ago | |
custom | ||
devtest | 11 months ago | |
explore | 11 months ago | |
11 months ago | ||
org | 11 months ago | |
package | 11 months ago | |
projects | 11 months ago | |
repo | 11 months ago | |
shared | 11 months ago | |
status | 11 months ago | |
swagger | 11 months ago | |
user | 11 months ago | |
webhook | 12 months ago | |
home.tmpl | 12 months ago | |
install.tmpl | 12 months ago | |
post-install.tmpl | 1 year ago |