mirror of
https://github.com/go-gitea/gitea
synced 2025-08-05 17:18:21 +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:
@@ -7,7 +7,7 @@
|
||||
</h2>
|
||||
{{range .Forks}}
|
||||
<div class="gt-df gt-ac gt-py-3">
|
||||
<span class="gt-mr-2">{{avatar $.Context .Owner}}</span>
|
||||
<span class="gt-mr-2">{{ctx.AvatarUtils.Avatar .Owner}}</span>
|
||||
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user