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 | |
---|---|---|
.. | ||
actions | 12 months ago | |
branch | 11 months ago | |
cite | 1 year ago | |
code | 11 months ago | |
diff | 11 months ago | |
editor | 11 months ago | |
find | 1 year ago | |
graph | 1 year ago | |
issue | 11 months ago | |
migrate | 11 months ago | |
projects | 1 year ago | |
pulls | 12 months ago | |
release | 11 months ago | |
settings | 11 months ago | |
tag | 1 year ago | |
wiki | 11 months ago | |
activity.tmpl | 12 months ago | |
blame.tmpl | 12 months ago | |
branch_dropdown.tmpl | 1 year ago | |
clone_buttons.tmpl | 1 year ago | |
clone_script.tmpl | 11 months ago | |
code_frequency.tmpl | 12 months ago | |
commit_load_branches_and_tags.tmpl | 1 year ago | |
commit_page.tmpl | 11 months ago | |
commit_status.tmpl | 1 year ago | |
commit_statuses.tmpl | 12 months ago | |
commits.tmpl | 1 year ago | |
commits_list.tmpl | 12 months ago | |
commits_list_small.tmpl | 11 months ago | |
commits_table.tmpl | 11 months ago | |
contributors.tmpl | 12 months ago | |
create.tmpl | 12 months ago | |
create_helper.tmpl | 12 months ago | |
empty.tmpl | 11 months ago | |
file_info.tmpl | 1 year ago | |
forks.tmpl | 1 year ago | |
graph.tmpl | 1 year ago | |
header.tmpl | 11 months ago | |
home.tmpl | 11 months ago | |
icon.tmpl | 12 months ago | |
latest_commit.tmpl | 1 year ago | |
navbar.tmpl | 12 months ago | |
packages.tmpl | 2 years ago | |
pulse.tmpl | 12 months ago | |
recent_commits.tmpl | 12 months ago | |
release_tag_header.tmpl | 11 months ago | |
search.tmpl | 11 months ago | |
search_name.tmpl | 2 years ago | |
shabox_badge.tmpl | 1 year ago | |
star_unstar.tmpl | 11 months ago | |
sub_menu.tmpl | 1 year ago | |
unicode_escape_prompt.tmpl | 11 months ago | |
upload.tmpl | 1 year ago | |
user_cards.tmpl | 12 months ago | |
view_file.tmpl | 11 months ago | |
view_list.tmpl | 11 months ago | |
watch_unwatch.tmpl | 11 months ago | |
watchers.tmpl | 2 years ago |