Skip to content

Commit 74a04ac

Browse files
committed
ui fixes
1 parent abe54bf commit 74a04ac

File tree

5 files changed

+58
-40
lines changed

5 files changed

+58
-40
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,7 @@ commits = Commits
810810
commit = Commit
811811
release = Release
812812
releases = Releases
813+
released_this = released this
813814
file_raw = Raw
814815
file_history = History
815816
file_view_raw = View Raw

templates/repo/release/list.tmpl

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
{{range $idx, $release := .Releases}}
3232
<tr>
3333
<td class="tag">
34-
<h4>
34+
<h3 class="release-tag-name mb-3">
3535
<a class="df ac" href="{{$.RepoLink}}/src/tag/{{.TagName | EscapePound}}" rel="nofollow">{{.TagName}}</a>
36-
</h4>
36+
</h3>
3737
<div class="download df ac">
3838
{{if $.Permission.CanRead $.UnitTypeCode}}
3939
<a class="mr-3 commit-sha" href="{{$.RepoLink}}/src/commit/{{.Sha1}}" rel="nofollow">{{svg "octicon-git-commit" 16 "mr-2"}}{{ShortSha .Sha1}}</a>
@@ -104,7 +104,7 @@
104104
{{end}}
105105
</div>
106106
{{else}}
107-
<h3>
107+
<h3 class="release-list-title">
108108
<a href="{{$.RepoLink}}/releases/tag/{{.TagName | EscapePound}}">{{.Title}}</a>
109109
{{if $.CanCreateRelease}}<small>(<a href="{{$.RepoLink}}/releases/edit/{{.TagName | EscapePound}}" rel="nofollow">{{$.i18n.Tr "repo.release.edit"}}</a>)</small>{{end}}
110110
</h3>
@@ -119,41 +119,44 @@
119119
Ghost
120120
{{end}}
121121
</span>
122-
{{if .CreatedUnix}}<span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span> | {{end}}
122+
<span class="released">
123+
{{$.i18n.Tr "repo.released_this"}}
124+
</span>
125+
{{if .CreatedUnix}}
126+
<span class="time">{{TimeSinceUnix .CreatedUnix $.Lang}}</span> |
127+
{{end}}
123128
<span class="ahead"><a href="{{$.RepoLink}}/compare/{{.TagName | EscapePound}}...{{.Target}}">{{$.i18n.Tr "repo.release.ahead.commits" .NumCommitsBehind | Str2html}}</a> {{$.i18n.Tr "repo.release.ahead.target" .Target}}</span>
124129
</p>
125130
<div class="markdown desc">
126131
{{Str2html .Note}}
127132
</div>
128-
<div class="download">
129-
<div class="ui accordion">
130-
<h2 class="title {{if eq $idx 0}}active{{end}}">
131-
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
132-
{{$.i18n.Tr "repo.release.downloads"}}
133-
</h2>
134-
<div class="content {{if eq $idx 0}}active{{end}}">
135-
<ul class="list">
136-
{{if $.Permission.CanRead $.UnitTypeCode}}
137-
<li>
138-
<a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a>
139-
</li>
133+
<div class="ui accordion download">
134+
<h2 class="title {{if eq $idx 0}}active{{end}} df ac mb-0">
135+
{{svg "octicon-triangle-right" 14 "dropdown icon"}}
136+
{{$.i18n.Tr "repo.release.downloads"}}
137+
</h2>
138+
<div class="content {{if eq $idx 0}}active{{end}}">
139+
<ul class="list">
140+
{{if $.Permission.CanRead $.UnitTypeCode}}
141+
<li>
142+
<a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.zip" rel="nofollow"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (ZIP)</strong></a>
143+
</li>
144+
<li>
145+
<a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a>
146+
</li>
147+
{{end}}
148+
{{if .Attachments}}
149+
{{range .Attachments}}
140150
<li>
141-
<a href="{{$.RepoLink}}/archive/{{.TagName | EscapePound}}.tar.gz"><strong>{{svg "octicon-file-zip" 16 "mr-2"}}{{$.i18n.Tr "repo.release.source_code"}} (TAR.GZ)</strong></a>
151+
<span class="ui text right" data-tooltip="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}" data-position="bottom right">{{svg "octicon-info"}}</span>
152+
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
153+
<strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16 "mr-2"}}</span>{{.Name}}</strong>
154+
<span class="ui text grey right">{{.Size | FileSize}}</span>
155+
</a>
142156
</li>
143157
{{end}}
144-
{{if .Attachments}}
145-
{{range .Attachments}}
146-
<li>
147-
<span class="ui text right" data-tooltip="{{$.i18n.Tr "repo.release.download_count" (.DownloadCount | PrettyNumber)}}" data-position="bottom right">{{svg "octicon-info"}}</span>
148-
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}">
149-
<strong><span class="ui image" title='{{.Name}}'>{{svg "octicon-package" 16 "mr-2"}}</span>{{.Name}}</strong>
150-
<span class="ui text grey right">{{.Size | FileSize}}</span>
151-
</a>
152-
</li>
153-
{{end}}
154-
{{end}}
155-
</ul>
156-
</div>
158+
{{end}}
159+
</ul>
157160
</div>
158161
</div>
159162
{{end}}

web_src/less/_repository.less

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1921,6 +1921,11 @@
19211921
margin-top: 20px;
19221922
padding-top: 15px;
19231923

1924+
.release-list-title {
1925+
font-size: 1.5rem;
1926+
font-weight: normal;
1927+
}
1928+
19241929
> li {
19251930
list-style: none;
19261931

@@ -1946,7 +1951,7 @@
19461951
}
19471952

19481953
.detail {
1949-
border-left: 1px solid #dddddd;
1954+
border-left: 2px solid #dddddd;
19501955

19511956
.author {
19521957
img {
@@ -1985,7 +1990,7 @@
19851990
.dot {
19861991
width: 9px;
19871992
height: 9px;
1988-
background-color: #cccccc;
1993+
background-color: #ddd;
19891994
z-index: 999;
19901995
position: absolute;
19911996
display: block;
@@ -1997,6 +2002,13 @@
19972002
}
19982003
}
19992004
}
2005+
2006+
#tags-table {
2007+
.release-tag-name {
2008+
font-size: 1.5rem;
2009+
font-weight: normal;
2010+
}
2011+
}
20002012
}
20012013

20022014
&.new.release {

web_src/less/helpers.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
.df { display: flex; }
22
.ac { align-items: center; }
33
.jc { justify-content: center; }
4+
.js { justify-content: flex-start; }
5+
.je { justify-content: flex-end; }
46
.sb { justify-content: space-between; }
57

68
.m-0 { margin: 0 !important; }

web_src/less/themes/theme-arc-green.less

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,6 @@ body {
481481
color: #a0cc75;
482482
}
483483

484-
.repository.release #release-list {
485-
border-top-color: #4c505c;
486-
}
487-
488484
.repository .milestone.list > .item .operate > a {
489485
color: #87ab63;
490486
}
@@ -2039,21 +2035,25 @@ footer .container .links > * {
20392035
color: #a5a5a8;
20402036
}
20412037

2038+
.repository.release #release-list {
2039+
border-top-color: #505667;
2040+
}
2041+
20422042
.repository.release #release-list > li .detail {
2043-
border-left-color: #4c505c;
2043+
border-left-color: #505667;
20442044
}
20452045

20462046
.repository.release #release-list > li .detail .dot {
2047-
background-color: #888;
2047+
background-color: #505667;
20482048
border-color: #383c4a;
20492049
}
20502050

20512051
.repository.release #release-list > li .detail .download .list {
2052-
border-top-color: #404552;
2052+
border-top-color: #454b5a;
20532053
}
20542054

20552055
.repository.release #release-list > li .detail .download .list li {
2056-
border-bottom-color: #404552;
2056+
border-bottom-color: #454b5a;
20572057
}
20582058

20592059
.board-column {

0 commit comments

Comments
 (0)