diff options
author | yp05327 <576951401@qq.com> | 2024-03-25 21:18:58 +0100 |
---|---|---|
committer | Earl Warren <contact@earl-warren.org> | 2024-03-30 07:17:30 +0100 |
commit | 18caa53859aad3669a0ee9ba8f578bd90355b057 (patch) | |
tree | f2f0a83bc853872ae67b056cdf278f578a4b4fc7 /templates | |
parent | Refactor all `.length === 0` patterns in JS (#30045) (diff) | |
download | forgejo-18caa53859aad3669a0ee9ba8f578bd90355b057.tar.xz forgejo-18caa53859aad3669a0ee9ba8f578bd90355b057.zip |
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>
(cherry picked from commit 13921569dd5f77ee7d8352d0036ff649b03e72c8)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/commits_list.tmpl | 8 |
1 files changed, 4 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"> |