mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-06-22 08:38:30 -04: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:
parent
36eb3c433a
commit
a370efc13f
54 changed files with 162 additions and 155 deletions
|
@ -5,7 +5,7 @@
|
|||
{{if .OriginalAuthor}}
|
||||
<span class="avatar"><img src="{{AppSubUrl}}/assets/img/avatar_default.png"></span>
|
||||
{{else}}
|
||||
{{template "shared/user/avatarlink" dict "Context" $.root.Context "user" .Poster}}
|
||||
{{template "shared/user/avatarlink" dict "user" .Poster}}
|
||||
{{end}}
|
||||
<div class="content comment-container">
|
||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue