Skip to content

Commit 1392156

Browse files
yp05327silverwind
andauthored
Add muted class to author name in repo commit list (#29989)
Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/f6b3728c-ed9a-4e47-8755-89373235dff2) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/272c85e3-620d-4758-ae4d-ad90b54e142c) If repo is a mirror, external user's name will be white, but if user is existed, then you will see blue names and white names together: ![image](https://github.com/go-gitea/gitea/assets/18380374/747622da-56e3-4162-b391-919787a8cee4) --------- Co-authored-by: silverwind <me@silverwind.io>
1 parent 8fe26fb commit 1392156

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

templates/repo/commits_list.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
{{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}}
1414
{{range .Commits}}
1515
<tr>
16-
<td class="author">
16+
<td class="author tw-flex">
1717
{{$userName := .Author.Name}}
1818
{{if .User}}
1919
{{if .User.FullName}}
2020
{{$userName = .User.FullName}}
2121
{{end}}
22-
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-1"}}<a href="{{.User.HomeLink}}">{{$userName}}</a>
22+
{{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a>
2323
{{else}}
24-
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-1"}}
25-
{{$userName}}
24+
{{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}}
25+
<span class="author-wrapper">{{$userName}}</span>
2626
{{end}}
2727
</td>
2828
<td class="sha">

web_src/css/repo.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2438,6 +2438,7 @@ tbody.commit-list {
24382438

24392439
.author-wrapper {
24402440
max-width: 180px;
2441+
align-self: center;
24412442
}
24422443

24432444
/* in the commit list, messages can wrap so we can use inline */

0 commit comments

Comments
 (0)