Skip to content

Commit 69fc561

Browse files
authored
Optimize flex layout of release attachment area (go-gitea#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)
1 parent 1e50cec commit 69fc561

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

templates/repo/release/list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
{{end}}
9393
{{range $att := $release.Attachments}}
9494
<li class="item">
95-
<a target="_blank" class="tw-flex-grow-[2] gt-ellipsis" rel="nofollow" download href="{{$att.DownloadURL}}">
95+
<a target="_blank" class="tw-flex-1 gt-ellipsis" rel="nofollow" download href="{{$att.DownloadURL}}">
9696
<strong class="flex-text-inline">{{svg "octicon-package" 16 "download-icon"}}<span class="gt-ellipsis">{{$att.Name}}</span></strong>
9797
</a>
9898
<div class="attachment-right-info flex-text-inline">

web_src/css/repo/release-tag.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@
7070
flex-wrap: wrap;
7171
}
7272

73+
#release-list .release-entry .attachment-list > .item a {
74+
min-width: 300px;
75+
}
76+
7377
#release-list .release-entry .attachment-list .attachment-right-info {
74-
flex-grow: 1;
78+
flex-shrink: 0;
7579
min-width: 300px;
7680
}
7781

0 commit comments

Comments
 (0)