diff options
author | fnetX (aka fralix) <git@fralix.ovh> | 2021-11-29 14:50:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-29 21:50:43 +0800 |
commit | 830ab75ce03e187ee7bff024ed8318db47a62f8b (patch) | |
tree | 064a1510b6f2c55c40a00f8028a79c501a6bfdd6 /templates/repo/branch | |
parent | b5a9ee94fd1f3bbe35bd19dfc4c7025e9f8e0768 (diff) | |
download | gitea-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/branch')
-rw-r--r-- | templates/repo/branch/list.tmpl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/repo/branch/list.tmpl b/templates/repo/branch/list.tmpl index 33a10fa01f..3580808aac 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -32,8 +32,8 @@ <div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.Tr "repo.branch.download" ($.DefaultBranch)}}" data-position="top right"> {{svg "octicon-download"}} <div class="menu"> - <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.zip">{{svg "octicon-file-zip"}} ZIP</a> - <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.tar.gz">{{svg "octicon-file-zip"}} TAR.GZ</a> + <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a> + <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments $.DefaultBranch}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}} TAR.GZ</a> </div> </div> </td> @@ -116,8 +116,8 @@ <div class="ui basic jump dropdown icon button tooltip" data-content="{{$.i18n.Tr "repo.branch.download" (.Name)}}" data-position="top right"> {{svg "octicon-download"}} <div class="menu"> - <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments .Name}}.zip">{{svg "octicon-file-zip"}} ZIP</a> - <a class="item archive-link" data-url="{{$.RepoLink}}/archive/{{PathEscapeSegments .Name}}.tar.gz">{{svg "octicon-file-zip"}} TAR.GZ</a> + <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .Name}}.zip" rel="nofollow">{{svg "octicon-file-zip"}} ZIP</a> + <a class="item archive-link" href="{{$.RepoLink}}/archive/{{PathEscapeSegments .Name}}.tar.gz" rel="nofollow">{{svg "octicon-file-zip"}} TAR.GZ</a> </div> </div> {{end}} |