summaryrefslogtreecommitdiffstats
path: root/templates/repo/home.tmpl
diff options
context:
space:
mode:
authorfnetX (aka fralix) <git@fralix.ovh>2021-11-29 14:50:43 +0100
committerGitHub <noreply@github.com>2021-11-29 21:50:43 +0800
commit830ab75ce03e187ee7bff024ed8318db47a62f8b (patch)
tree064a1510b6f2c55c40a00f8028a79c501a6bfdd6 /templates/repo/home.tmpl
parentb5a9ee94fd1f3bbe35bd19dfc4c7025e9f8e0768 (diff)
downloadgitea-830ab75ce03e187ee7bff024ed8318db47a62f8b.tar.gz
gitea-830ab75ce03e187ee7bff024ed8318db47a62f8b.zip
Switch archive URL code back to href attributes (#17796)
* Add fallback href link * Switch async archive generation to use href links * Edit all templates to use href instead of data-url for archives * Add consistent rel="nofollow" as per wxiaoguang
Diffstat (limited to 'templates/repo/home.tmpl')
-rw-r--r--templates/repo/home.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/home.tmpl b/templates/repo/home.tmpl
index 4ba34bc6c5..5ee6cc2df7 100644
--- a/templates/repo/home.tmpl
+++ b/templates/repo/home.tmpl
@@ -113,9 +113,9 @@
<button id="download-btn" class="ui basic jump dropdown icon button tooltip" data-content="{{.i18n.Tr "repo.download_archive"}}" data-position="top right">
{{svg "octicon-download"}}
<div class="menu">
- <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.zip">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_zip"}}</a>
- <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.tar.gz">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_tar"}}</a>
- <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.bundle">{{svg "octicon-package" 16 "mr-3"}}{{.i18n.Tr "repo.download_bundle"}}</a>
+ <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.zip" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_zip"}}</a>
+ <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip" 16 "mr-3"}}{{.i18n.Tr "repo.download_tar"}}</a>
+ <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.BranchName}}.bundle" rel="nofollow">{{svg "octicon-package" 16 "mr-3"}}{{.i18n.Tr "repo.download_bundle"}}</a>
<a class="item" href="vscode://vscode.git/clone?url={{if $.PageIsWiki}}{{$.WikiCloneLink.HTTPS}}{{else}}{{$.CloneLink.HTTPS}}{{end}}">{{svg "gitea-vscode" 16 "mr-3"}}{{.i18n.Tr "repo.clone_in_vsc"}}</a>
</div>
</button>