Skip to content

Commit ace3015

Browse files
silverwindlafrikstechknowlogickwxiaoguang
committed
Timeline and color tweaks (go-gitea#21799)
Followup to go-gitea#21784. - Restore muted effect on timeline author and issuelist comment icon - Remove whitespace inside shared user templates, fixing link hover underline - Use shared author link template more - Use `bold` class instead of CSS - Fix grey-light color being too dark on arc-green - Add missing black-light color - Fix issuelist progress bar color - Fix various other cases of missing `.muted` <img width="416" alt="Screenshot 2022-11-13 at 12 15 22" src="https://user-images.githubusercontent.com/115237/201519497-1d4725c6-bc8b-47b5-9f68-1278ac9a8c92.png"> <img width="324" alt="Screenshot 2022-11-13 at 12 16 52" src="https://user-images.githubusercontent.com/115237/201519501-c0d03700-f9af-4316-ab46-482f2c7c738b.png"> <img width="79" alt="Screenshot 2022-11-13 at 12 30 55" src="https://user-images.githubusercontent.com/115237/201519502-46dc2d73-bbdf-4a2e-84d3-d2976f793163.png"> <img width="440" alt="Screenshot 2022-11-13 at 12 41 03" src="https://user-images.githubusercontent.com/115237/201519876-ada33948-f84a-4aeb-a40d-5c873f9a49e9.png"> <img width="213" alt="Screenshot 2022-11-13 at 12 52 54" src="https://user-images.githubusercontent.com/115237/201520291-a4d7238e-aeca-46c7-9008-8b644b1b676e.png"> <img width="208" alt="Screenshot 2022-11-13 at 12 56 16" src="https://user-images.githubusercontent.com/115237/201520436-aa8ba109-b959-42fb-831a-021e806c7082.png"> Co-authored-by: Lauris BH <[email protected]> Co-authored-by: techknowlogick <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent 5c0de39 commit ace3015

File tree

14 files changed

+47
-47
lines changed

14 files changed

+47
-47
lines changed

templates/explore/repo_list.tmpl

+3-3
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@
3838
{{end}}
3939
</div>
4040
</div>
41-
<div class="metas df ac">
41+
<div class="metas df ac text grey">
4242
{{if .PrimaryLanguage}}
43-
<a href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
44-
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
43+
<a class="muted" href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
44+
<span class="df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
4545
</a>
4646
{{end}}
4747
{{if not $.DisableStars}}

templates/org/home.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
<div class="item">
6969
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
7070
<p class="text grey">
71-
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> ·
72-
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a>
71+
<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> ·
72+
<a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a>
7373
</p>
7474
</div>
7575
{{end}}

templates/repo/diff/comments.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="ui top attached header comment-header df ac sb">
1212
<div class="comment-header-left df ac">
1313
{{if .OriginalAuthor}}
14-
<span class="text black mr-2">
14+
<span class="text black bold mr-2">
1515
{{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}}
1616
{{.OriginalAuthor}}
1717
</span>

templates/repo/issue/view_content.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<div class="ui top attached header comment-header df ac sb">
3131
<div class="comment-header-left df ac">
3232
{{if .Issue.OriginalAuthor}}
33-
<span class="text black">
33+
<span class="text black bold">
3434
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
3535
{{.Issue.OriginalAuthor}}
3636
</span>
@@ -45,7 +45,7 @@
4545
{{avatar .Issue.Poster}}
4646
</a>
4747
<span class="text grey">
48-
<a class="author"{{if gt .Issue.Poster.ID 0}} href="{{.Issue.Poster.HomeLink}}"{{end}}>{{.Issue.Poster.GetDisplayName}}</a>
48+
{{template "shared/user/authorlink" .Issue.Poster}}
4949
{{.locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
5050
</span>
5151
{{end}}

templates/repo/issue/view_content/comments.tmpl

+9-11
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<div class="ui top attached header comment-header df ac sb">
2626
<div class="comment-header-left df ac">
2727
{{if .OriginalAuthor}}
28-
<span class="text black mr-2">
28+
<span class="text black bold mr-2">
2929
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
3030
{{.OriginalAuthor}}
3131
</span>
@@ -42,9 +42,7 @@
4242
</a>
4343
{{end}}
4444
<span class="text grey">
45-
<a class="author"{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>
46-
{{.Poster.GetDisplayName}}
47-
</a>
45+
{{template "shared/user/authorlink" .Poster}}
4846
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
4947
</span>
5048
{{end}}
@@ -151,14 +149,14 @@
151149
<span class="badge">{{svg "octicon-bookmark"}}</span>
152150
{{template "shared/user/avatarlink" .Poster}}
153151
{{if eq .RefAction 3}}<del>{{end}}
154-
<span class="text grey">
152+
<span class="text grey muted-links">
155153
{{template "shared/user/authorlink" .Poster}}
156154
{{$.locale.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentHTMLURL|Escape) $refFrom | Safe}}
157155
</span>
158156
{{if eq .RefAction 3}}</del>{{end}}
159157

160158
<div class="detail">
161-
<span class="text grey"><a href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle}}</b> {{.RefIssueIdent}}</a></span>
159+
<span class="text grey"><a class="muted" href="{{.RefIssueHTMLURL}}"><b>{{.RefIssueTitle}}</b> {{.RefIssueIdent}}</a></span>
162160
</div>
163161
</div>
164162
{{else if eq .Type 4}}
@@ -207,7 +205,7 @@
207205
{{if .RemovedAssignee}}
208206
{{template "shared/user/avatarlink" .Assignee}}
209207
<span class="text grey">
210-
<a class="author" {{if gt .Assignee.ID 0}}href="{{.Assignee.HomeLink}}"{{end}}>{{.Assignee.GetDisplayName}}</a>
208+
{{template "shared/user/authorlink" .Assignee}}
211209
{{if eq .Poster.ID .Assignee.ID}}
212210
{{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
213211
{{else}}
@@ -331,7 +329,7 @@
331329
<div class="detail">
332330
{{svg "octicon-plus"}}
333331
<span class="text grey">
334-
<a href="{{.DependentIssue.HTMLURL}}">
332+
<a class="muted" href="{{.DependentIssue.HTMLURL}}">
335333
{{if eq .DependentIssue.RepoID .Issue.RepoID}}
336334
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
337335
{{else}}
@@ -354,7 +352,7 @@
354352
<div class="detail">
355353
<span class="text grey">{{svg "octicon-trash"}}</span>
356354
<span class="text grey">
357-
<a href="{{.DependentIssue.HTMLURL}}">
355+
<a class="muted" href="{{.DependentIssue.HTMLURL}}">
358356
{{if eq .DependentIssue.RepoID .Issue.RepoID}}
359357
#{{.DependentIssue.Index}} {{.DependentIssue.Title}}
360358
{{else}}
@@ -408,7 +406,7 @@
408406
<div class="comment-header-left df ac">
409407
<span class="text grey">
410408
{{if .OriginalAuthor}}
411-
<span class="text black">
409+
<span class="text black bold">
412410
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
413411
{{.OriginalAuthor}}
414412
</span>
@@ -536,7 +534,7 @@
536534
{{end}}
537535
<span class="text grey">
538536
{{if .OriginalAuthor}}
539-
<span class="text black">
537+
<span class="text black bold">
540538
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}}
541539
{{.OriginalAuthor}}
542540
</span>

templates/repo/issue/view_content/sidebar.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@
389389
{{avatar $user}}
390390
</a>
391391
<div class="content">
392-
<a class="author">{{$user.DisplayName}}</a>
392+
{{template "shared/user/authorlink" $user}}
393393
<div class="text">
394394
{{$trackedtime}}
395395
</div>

templates/shared/issuelist.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
</div>
161161
<div class="issue-item-icon-right text grey">
162162
{{if .NumComments}}
163-
<a class="tdn" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
163+
<a class="tdn muted" href="{{if .HTMLURL}}{{.HTMLURL}}{{else}}{{$.Link}}/{{.Index}}{{end}}">
164164
{{svg "octicon-comment" 16 "mr-2"}}{{.NumComments}}
165165
</a>
166166
{{end}}

templates/shared/user/authorlink.tmpl

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<a class="author"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
2-
{{.GetDisplayName}}
3-
</a>
1+
<a class="author text black bold muted"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>

templates/shared/user/avatarlink.tmpl

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
2-
{{avatar .}}
3-
</a>
1+
<a class="avatar"{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{avatar .}}</a>

templates/shared/user/namelink.tmpl

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>
2-
{{.GetDisplayName}}
3-
</a>
1+
<a{{if gt .ID 0}} href="{{.HomeLink}}"{{end}}>{{.GetDisplayName}}</a>

web_src/less/_base.less

+5-2
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
--color-pink: #e03997;
8080
--color-brown: #a5673f;
8181
--color-grey: #888888;
82+
--color-black: #1b1c1d;
8283
/* light variants - produced via Sass scale-color(color, $lightness: +25%) */
8384
--color-red-light: #e45e5e;
8485
--color-orange-light: #f59555;
@@ -92,9 +93,9 @@
9293
--color-pink-light: #e86bb1;
9394
--color-brown-light: #c58b66;
9495
--color-grey-light: #a6a6a6;
96+
--color-black-light: #525558;
9597
/* other colors */
9698
--color-gold: #a1882b;
97-
--color-black: #1b1c1d;
9899
--color-white: #ffffff;
99100
--color-diff-removed-word-bg: #fdb8c0;
100101
--color-diff-added-word-bg: #acf2bd;
@@ -293,13 +294,15 @@ a,
293294
text-decoration-skip-ink: all;
294295
}
295296

296-
a.muted {
297+
a.muted,
298+
.muted-links a {
297299
color: inherit;
298300
}
299301

300302
a:hover,
301303
a.muted:hover,
302304
a.muted:hover [class*="color-text"],
305+
.muted-links a:hover,
303306
.ui.breadcrumb a:hover {
304307
color: var(--color-primary);
305308
}

web_src/less/_repository.less

+7-11
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@
829829

830830
.timeline-avatar {
831831
position: absolute;
832-
left: -72px;
832+
left: -68px;
833833

834834
img {
835835
width: 40px !important;
@@ -846,7 +846,6 @@
846846
.avatar img {
847847
width: 20px;
848848
height: 20px;
849-
margin: 0 .25rem;
850849
vertical-align: middle;
851850
}
852851

@@ -981,10 +980,6 @@
981980
margin-top: 4px;
982981
}
983982

984-
.author {
985-
font-weight: 600;
986-
}
987-
988983
.comment-form-reply .footer {
989984
padding-bottom: 1em;
990985
}
@@ -1165,9 +1160,12 @@
11651160
padding-left: 15px;
11661161

11671162
.detail {
1168-
font-size: .9rem;
1169-
margin-top: 5px;
1170-
margin-left: 8px;
1163+
margin-top: 4px;
1164+
margin-left: 14px;
1165+
1166+
.svg {
1167+
margin-right: 2px;
1168+
}
11711169
}
11721170

11731171
.segments {
@@ -2673,12 +2671,10 @@
26732671

26742672
a {
26752673
color: var(--color-text);
2676-
text-decoration: none;
26772674
}
26782675

26792676
a:hover {
26802677
color: var(--color-primary);
2681-
text-decoration: none;
26822678
}
26832679
}
26842680

web_src/less/shared/issuelist.less

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,14 @@
9191
border-radius: 3px;
9292
vertical-align: 2px !important;
9393
}
94+
95+
progress::-webkit-progress-value {
96+
background-color: var(--color-secondary-dark-4);
97+
}
98+
99+
progress::-moz-progress-bar {
100+
background-color: var(--color-secondary-dark-4);
101+
}
94102
}
95103

96104
.conflicting {

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

+5-4
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@
6767
--color-purple: #b259d0;
6868
--color-pink: #d22e8b;
6969
--color-brown: #a47252;
70-
--color-grey: #5e626a;
71-
/* light variants */
70+
--color-grey: #9ea2aa;
71+
--color-black: #1e222e;
72+
/* light variants - produced via Sass scale-color(color, $lightness: -10%) */
7273
--color-red-light: #c23636;
7374
--color-orange-light: #b84f0b;
7475
--color-yellow-light: #b88a03;
@@ -80,9 +81,9 @@
8081
--color-purple-light: #a742c9;
8182
--color-pink-light: #be297d;
8283
--color-brown-light: #94674a;
83-
--color-grey-light: #55585f;
84+
--color-grey-light: #8d919b;
85+
--color-black-light: #1b1f29;
8486
/* other colors */
85-
--color-black: #1e222e;
8687
--color-gold: #b1983b;
8788
--color-white: #ffffff;
8889
--color-diff-removed-word-bg: #6f3333;

0 commit comments

Comments
 (0)