Skip to content

Commit 599ae09

Browse files
lhsazevedosilverwindwxiaoguanglafriks
authored
Use body text color in repository files table links (#20386)
Use body text color in for links in the repository files table Issue/PR links (`.ref-issue`) will not be affected, as seen in other git services. Co-authored-by: silverwind <[email protected]> Co-authored-by: wxiaoguang <[email protected]> Co-authored-by: Lauris BH <[email protected]>
1 parent 1a70fc9 commit 599ae09

File tree

5 files changed

+17
-11
lines changed

5 files changed

+17
-11
lines changed

Diff for: modules/markup/html.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1176,7 +1176,7 @@ func genDefaultLinkProcessor(defaultLink string) processor {
11761176
node.DataAtom = atom.A
11771177
node.Attr = []html.Attribute{
11781178
{Key: "href", Val: defaultLink},
1179-
{Key: "class", Val: "default-link"},
1179+
{Key: "class", Val: "default-link muted"},
11801180
}
11811181
node.FirstChild, node.LastChild = ch, ch
11821182
}

Diff for: templates/repo/view_list.tmpl

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
{{if .LatestCommitUser}}
99
{{avatar .LatestCommitUser 24}}
1010
{{if .LatestCommitUser.FullName}}
11-
<a href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
11+
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
1212
{{else}}
13-
<a href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
13+
<a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a>
1414
{{end}}
1515
{{else}}
1616
{{if .LatestCommit.Author}}
@@ -54,7 +54,7 @@
5454
{{svg "octicon-file-submodule"}}
5555
{{$refURL := $subModuleFile.RefURL AppUrl $.Repository.FullName $.SSHDomain}}
5656
{{if $refURL}}
57-
<a href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{PathEscape $subModuleFile.RefID}}">{{ShortSha $subModuleFile.RefID}}</a>
57+
<a class="muted" href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{PathEscape $subModuleFile.RefID}}">{{ShortSha $subModuleFile.RefID}}</a>
5858
{{else}}
5959
{{$entry.Name}}<span class="at">@</span>{{ShortSha $subModuleFile.RefID}}
6060
{{end}}
@@ -63,16 +63,16 @@
6363
{{$subJumpablePathName := $entry.GetSubJumpablePathName}}
6464
{{$subJumpablePath := SubJumpablePath $subJumpablePathName}}
6565
{{svg "octicon-file-directory-fill"}}
66-
<a href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}">
66+
<a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $subJumpablePathName}}" title="{{$subJumpablePathName}}">
6767
{{if eq (len $subJumpablePath) 2}}
68-
<span class="jumpable-path">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
68+
<span class="color-text-light-2">{{index $subJumpablePath 0}}</span>{{index $subJumpablePath 1}}
6969
{{else}}
7070
{{index $subJumpablePath 0}}
7171
{{end}}
7272
</a>
7373
{{else}}
7474
{{svg (printf "octicon-%s" (EntryIcon $entry))}}
75-
<a href="{{$.TreeLink}}/{{PathEscapeSegments $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
75+
<a class="muted" href="{{$.TreeLink}}/{{PathEscapeSegments $entry.Name}}" title="{{$entry.Name}}">{{$entry.Name}}</a>
7676
{{end}}
7777
{{end}}
7878
</span>

Diff for: web_src/less/_base.less

+6
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
--color-text-dark: #080808;
119119
--color-text: #212121;
120120
--color-text-light: #555555;
121+
--color-text-light-1: #6a6a6a;
121122
--color-text-light-2: #808080;
122123
--color-text-light-3: #a0a0a0;
123124
--color-box-header: #f7f7f7;
@@ -275,6 +276,7 @@ a.muted {
275276

276277
a:hover,
277278
a.muted:hover,
279+
a.muted:hover [class*="color-text"],
278280
.ui.breadcrumb a:hover {
279281
color: var(--color-primary);
280282
}
@@ -2206,3 +2208,7 @@ table th[data-sortt-desc] {
22062208
}
22072209
}
22082210
}
2211+
2212+
.color-text-light-2 {
2213+
color: var(--color-text-light-2);
2214+
}

Diff for: web_src/less/_repository.less

+3-4
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,8 @@
367367
}
368368

369369
&.message {
370+
color: var(--color-text-light-1);
371+
370372
@media @mediaXl {
371373
max-width: 400px;
372374
}
@@ -381,6 +383,7 @@
381383

382384
&.age {
383385
width: 120px;
386+
color: var(--color-text-light-1);
384387
}
385388

386389
.truncate {
@@ -432,10 +435,6 @@
432435
padding-bottom: 8px;
433436
width: calc(100% - 1.25rem);
434437
}
435-
436-
.jumpable-path {
437-
color: var(--color-text-light-2);
438-
}
439438
}
440439

441440
.non-diff-file-content {

Diff for: web_src/less/themes/theme-arc-green.less

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
--color-text-dark: #dbe0ea;
9999
--color-text: #bbc0ca;
100100
--color-text-light: #a6aab5;
101+
--color-text-light-1: #979ba6;
101102
--color-text-light-2: #8a8e99;
102103
--color-text-light-3: #707687;
103104
--color-footer: #2e323e;

0 commit comments

Comments
 (0)