diff options
author | yp05327 <576951401@qq.com> | 2024-03-26 05:18:58 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-25 20:18:58 +0000 |
commit | 13921569dd5f77ee7d8352d0036ff649b03e72c8 (patch) | |
tree | 87a1ba15d6378d5038c7d0028e72261ce76ffe5f | |
parent | 8fe26fb314f1710139728d9118b455fc6a16cce2 (diff) | |
download | gitea-13921569dd5f77ee7d8352d0036ff649b03e72c8.tar.gz gitea-13921569dd5f77ee7d8352d0036ff649b03e72c8.zip |
Add muted class to author name in repo commit list (#29989)
Before:

After:

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:

---------
Co-authored-by: silverwind <me@silverwind.io>
-rw-r--r-- | templates/repo/commits_list.tmpl | 8 | ||||
-rw-r--r-- | web_src/css/repo.css | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index aa7ca88931..bae9924141 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -13,16 +13,16 @@ {{$commitRepoLink := $.RepoLink}}{{if $.CommitRepoLink}}{{$commitRepoLink = $.CommitRepoLink}}{{end}} {{range .Commits}} <tr> - <td class="author"> + <td class="author tw-flex"> {{$userName := .Author.Name}} {{if .User}} {{if .User.FullName}} {{$userName = .User.FullName}} {{end}} - {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-1"}}<a href="{{.User.HomeLink}}">{{$userName}}</a> + {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}<a class="muted author-wrapper" href="{{.User.HomeLink}}">{{$userName}}</a> {{else}} - {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-1"}} - {{$userName}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "tw-mr-2"}} + <span class="author-wrapper">{{$userName}}</span> {{end}} </td> <td class="sha"> diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 2014dfc370..18f28dc4a6 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -2438,6 +2438,7 @@ tbody.commit-list { .author-wrapper { max-width: 180px; + align-self: center; } /* in the commit list, messages can wrap so we can use inline */ |