mirror of
https://github.com/go-gitea/gitea
synced 2025-07-31 22:58:35 +00:00
Use template context function for avatar rendering (#26385)
Introduce `AvatarUtils`, no need to pass `$.Context` to every sub-template, and simplify the template helper functions.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
{{$isPublic := index $.MembersIsPublicMember .ID}}
|
||||
<div class="flex-item {{if $.PublicOnly}}flex-item-center{{end}}">
|
||||
<div class="flex-item-leading">
|
||||
<a href="{{.HomeLink}}">{{avatar $.Context . 48}}</a>
|
||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 48}}</a>
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title">
|
||||
|
Reference in New Issue
Block a user