diff options
author | HesterG <hestergong@gmail.com> | 2023-02-24 04:28:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 14:28:18 -0600 |
commit | 8ed6096158cb764f2259232eba0a46e6c273354c (patch) | |
tree | aebb7ba018629acf5864a80ed7f25eb9cbf0461f /templates/repo/view_list.tmpl | |
parent | 659cf30b6932fc2da303d15156f1ece17cd2b309 (diff) | |
download | gitea-8ed6096158cb764f2259232eba0a46e6c273354c.tar.gz gitea-8ed6096158cb764f2259232eba0a46e6c273354c.zip |
Add wrapper to author to avoid long name ui problem (#23030)
This PR is a possible solution for issue #22866. Main change is to add a
`author-wrapper` class around author name, like the wrapper added to
message. The `max-width` is set to 200px on PC, and 100px on mobile
device for now.
Diffstat (limited to 'templates/repo/view_list.tmpl')
-rw-r--r-- | templates/repo/view_list.tmpl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 6fcf60daef..9540c872c2 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -8,14 +8,14 @@ {{if .LatestCommitUser}} {{avatar $.Context .LatestCommitUser 24}} {{if .LatestCommitUser.FullName}} - <a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a> + <a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a> {{else}} - <a class="muted" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a> + <a class="muted author-wrapper" title="{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{if .LatestCommit.Author}}{{.LatestCommit.Author.Name}}{{else}}{{.LatestCommitUser.Name}}{{end}}</strong></a> {{end}} {{else}} {{if .LatestCommit.Author}} {{avatarByEmail $.Context .LatestCommit.Author.Email .LatestCommit.Author.Name 24}} - <strong>{{.LatestCommit.Author.Name}}</strong> + <span class="author-wrapper" title="{{.LatestCommit.Author.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></span> {{end}} {{end}} <a rel="nofollow" class="ui sha label {{if .LatestCommit.Signature}} isSigned {{if .LatestCommitVerification.Verified}} isVerified{{if eq .LatestCommitVerification.TrustStatus "trusted"}}{{else if eq .LatestCommitVerification.TrustStatus "untrusted"}}Untrusted{{else}}Unmatched{{end}}{{else if .LatestCommitVerification.Warning}} isWarning{{end}}{{end}}" href="{{.RepoLink}}/commit/{{PathEscape .LatestCommit.ID.String}}"> |