Skip to content

Commit 0731abc

Browse files
wxiaoguangGiteaBot
andauthored
Remove avatarHTML from template helpers (#26598)
The HTML code is more readable and more correct (it needs `"ui avatar"` class) Co-authored-by: Giteabot <[email protected]>
1 parent 8cf3b61 commit 0731abc

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

modules/templates/helper.go

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ func NewFuncMap() template.FuncMap {
5353
// -----------------------------------------------------------------
5454
// svg / avatar / icon
5555
"svg": svg.RenderHTML,
56-
"avatarHTML": AvatarHTML,
5756
"EntryIcon": base.EntryIcon,
5857
"MigrationIcon": MigrationIcon,
5958
"ActionIcon": ActionIcon,

templates/user/dashboard/feeds.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
{{range $push.Commits}}
8787
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
8888
<div class="flex-item">
89-
{{avatarHTML ($push.AvatarLink $.Context .AuthorEmail) 16 "" .AuthorName}}
89+
<img class="ui avatar" src="{{$push.AvatarLink $.Context .AuthorEmail}}" title="{{.AuthorName}}" width="16" height="16">
9090
<a class="commit-id" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
9191
<span class="text truncate light grey">
9292
{{RenderCommitMessage $.Context .Message $repoLink $.ComposeMetas}}

0 commit comments

Comments
 (0)