1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-29 21:58: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:
wxiaoguang
2023-08-10 11:19:39 +08:00
committed by GitHub
parent 36eb3c433a
commit a370efc13f
54 changed files with 162 additions and 155 deletions

View File

@@ -8,7 +8,7 @@
{{range .Users}}
<div class="flex-item flex-item-center">
<div class="flex-item-leading">
{{avatar $.Context . 48}}
{{ctx.AvatarUtils.Avatar . 48}}
</div>
<div class="flex-item-main">
<div class="flex-item-title">