diff options
author | silverwind <me@silverwind.io> | 2024-05-13 23:33:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-13 23:33:51 +0200 |
commit | ed25676a9ae75c3a5f092dbaa449770fb1e9e70c (patch) | |
tree | 02bfa42def0298f06bb64ebd69fc69abef010dbb /templates/repo/release | |
parent | 8218b6484c86eaec6b45e97bbf85a88c2db71568 (diff) | |
download | gitea-ed25676a9ae75c3a5f092dbaa449770fb1e9e70c.tar.gz gitea-ed25676a9ae75c3a5f092dbaa449770fb1e9e70c.zip |
Restyle release list, fix branch dropdown (#30837)
Fixes https://github.com/go-gitea/gitea/issues/30821 and restyles the
release list.
Desktop:
<img width="1199" alt="Screenshot 2024-05-02 at 20 46 10"
src="https://github.com/go-gitea/gitea/assets/115237/bee92423-d4a9-4b26-8301-3a1e09eef4cd">
Mobile:
<img width="443" alt="Screenshot 2024-05-02 at 20 46 21"
src="https://github.com/go-gitea/gitea/assets/115237/42ecbae5-bdb6-4b16-a0ee-9c64daede68d">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'templates/repo/release')
-rw-r--r-- | templates/repo/release/list.tmpl | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/templates/repo/release/list.tmpl b/templates/repo/release/list.tmpl index 5a8668fbe1..34548672b5 100644 --- a/templates/repo/release/list.tmpl +++ b/templates/repo/release/list.tmpl @@ -7,18 +7,18 @@ <ul id="release-list"> {{range $idx, $info := .Releases}} {{$release := $info.Release}} - <li class="ui grid"> - <div class="ui four wide column meta"> + <li class="release-entry"> + <div class="meta"> <a class="muted" href="{{if not (and $release.Sha1 ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode))}}#{{else}}{{$.RepoLink}}/src/tag/{{$release.TagName | PathEscapeSegments}}{{end}}" rel="nofollow">{{svg "octicon-tag" 16 "tw-mr-1"}}{{$release.TagName}}</a> {{if and $release.Sha1 ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}} <a class="muted tw-font-mono" href="{{$.RepoLink}}/src/commit/{{$release.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "tw-mr-1"}}{{ShortSha $release.Sha1}}</a> {{template "repo/branch_dropdown" dict "root" $ "release" $release}} {{end}} </div> - <div class="ui twelve wide column detail"> + <div class="ui segment detail"> <div class="tw-flex tw-items-center tw-justify-between tw-flex-wrap tw-mb-2"> <h4 class="release-list-title gt-word-break"> - {{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}} + {{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a class="muted" href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}} {{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}} {{if $release.IsDraft}} <span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span> @@ -62,22 +62,22 @@ </div> <div class="divider"></div> <details class="download" {{if eq $idx 0}}open{{end}}> - <summary class="tw-my-4"> + <summary> {{ctx.Locale.Tr "repo.release.downloads"}} </summary> <ul class="list"> {{if and (not $.DisableDownloadSourceArchives) (not $release.IsDraft) ($.Permission.CanRead ctx.Consts.RepoUnitTypeCode)}} <li> - <a class="archive-link" href="{{$.RepoLink}}/archive/{{$release.TagName | PathEscapeSegments}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.source_code"}} (ZIP)</strong></a> + <a class="archive-link" href="{{$.RepoLink}}/archive/{{$release.TagName | PathEscapeSegments}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "download-icon"}}{{ctx.Locale.Tr "repo.release.source_code"}} (ZIP)</strong></a> </li> <li> - <a class="archive-link" href="{{$.RepoLink}}/archive/{{$release.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "tw-mr-1"}}{{ctx.Locale.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a> + <a class="archive-link" href="{{$.RepoLink}}/archive/{{$release.TagName | PathEscapeSegments}}.tar.gz" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "download-icon"}}{{ctx.Locale.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a> </li> {{end}} {{range $release.Attachments}} <li> <a target="_blank" rel="nofollow" href="{{.DownloadURL}}" download> - <strong>{{svg "octicon-package" 16 "tw-mr-1"}}{{.Name}}</strong> + <strong>{{svg "octicon-package" 16 "download-icon"}}{{.Name}}</strong> </a> <div> <span class="text grey">{{.Size | FileSize}}</span> @@ -89,7 +89,6 @@ {{end}} </ul> </details> - <div class="dot"></div> </div> </li> {{end}} |