mirror of
https://github.com/go-gitea/gitea
synced 2025-07-26 12:18:36 +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:
@@ -8,7 +8,7 @@
|
||||
{{range .Cards}}
|
||||
<li class="item ui segment">
|
||||
<a href="{{.HomeLink}}">
|
||||
{{avatar $.Context .}}
|
||||
{{ctx.AvatarUtils.Avatar .}}
|
||||
</a>
|
||||
<h3 class="name"><a href="{{.HomeLink}}">{{.DisplayName}}</a></h3>
|
||||
|
||||
|
Reference in New Issue
Block a user