diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-08-21 23:00:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-21 15:00:14 +0000 |
commit | 0731abc44441048079444ba3d83eaeacc4814ed7 (patch) | |
tree | 8a17d6d119bcdff6e32f122473c3861f7a5535c4 | |
parent | 8cf3b61fb9e43c773f3ca975874d0f0e69210d44 (diff) | |
download | gitea-0731abc44441048079444ba3d83eaeacc4814ed7.tar.gz gitea-0731abc44441048079444ba3d83eaeacc4814ed7.zip |
Remove avatarHTML from template helpers (#26598)
The HTML code is more readable and more correct (it needs `"ui avatar"`
class)
Co-authored-by: Giteabot <teabot@gitea.io>
-rw-r--r-- | modules/templates/helper.go | 1 | ||||
-rw-r--r-- | templates/user/dashboard/feeds.tmpl | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/modules/templates/helper.go b/modules/templates/helper.go index 8fedc4076a..bb1411cbfd 100644 --- a/modules/templates/helper.go +++ b/modules/templates/helper.go @@ -53,7 +53,6 @@ func NewFuncMap() template.FuncMap { // ----------------------------------------------------------------- // svg / avatar / icon "svg": svg.RenderHTML, - "avatarHTML": AvatarHTML, "EntryIcon": base.EntryIcon, "MigrationIcon": MigrationIcon, "ActionIcon": ActionIcon, diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index 24768439f5..aad44f57df 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -86,7 +86,7 @@ {{range $push.Commits}} {{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}} <div class="flex-item"> - {{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "" .AuthorName}} + <img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16"> <a class="commit-id" href="{{$commitLink}}">{{ShortSha .Sha1}}</a> <span class="text truncate light grey"> {{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}} |