Optimize flex layout of release attachment area (#34885)

before:

![b975dce7-d5b1-43e0-b6f4-94557758e30e](https://github.com/user-attachments/assets/c33f3fd0-ce1a-457c-97fe-942b86cf09c1)

after:

![682ce03c-9d2c-4b5d-9ba0-fb759fd98088](https://github.com/user-attachments/assets/55304b19-a3c3-4a91-b07a-0c9868dbe3eb)
This commit is contained in:
Kerwin Bryant 2025-06-28 00:45:39 +08:00 committed by GitHub
parent 1e50cec0b3
commit 69fc5619c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -92,7 +92,7 @@
{{end}} {{end}}
{{range $att := $release.Attachments}} {{range $att := $release.Attachments}}
<li class="item"> <li class="item">
<a target="_blank" class="tw-flex-grow-[2] gt-ellipsis" rel="nofollow" download href="{{$att.DownloadURL}}"> <a target="_blank" class="tw-flex-1 gt-ellipsis" rel="nofollow" download href="{{$att.DownloadURL}}">
<strong class="flex-text-inline">{{svg "octicon-package" 16 "download-icon"}}<span class="gt-ellipsis">{{$att.Name}}</span></strong> <strong class="flex-text-inline">{{svg "octicon-package" 16 "download-icon"}}<span class="gt-ellipsis">{{$att.Name}}</span></strong>
</a> </a>
<div class="attachment-right-info flex-text-inline"> <div class="attachment-right-info flex-text-inline">

View file

@ -70,8 +70,12 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
#release-list .release-entry .attachment-list > .item a {
min-width: 300px;
}
#release-list .release-entry .attachment-list .attachment-right-info { #release-list .release-entry .attachment-list .attachment-right-info {
flex-grow: 1; flex-shrink: 0;
min-width: 300px; min-width: 300px;
} }