mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 19:18:20 +00:00
Direct avatar rendering (#13649)
* Direct avatar rendering This adds new template helpers for avatar rendering which output image elements with direct links to avatars which makes them cacheable by the browsers. This should be a major performance improvment for pages with many avatars. * fix avatars of other user's profile pages * fix top border on user avatar name * uncircle avatars * remove old incomplete avatar selector * use title attribute for name and add it back on blame * minor refactor * tweak comments * fix url path join and adjust test to new result * dedupe functions
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<span class="timeline-avatar"><img src="/img/avatar_default.png"></span>
|
||||
{{else}}
|
||||
<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
|
||||
<img src="{{.Issue.Poster.RelAvatarLink}}">
|
||||
{{avatar .Issue.Poster}}
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="content comment-container">
|
||||
@@ -93,7 +93,7 @@
|
||||
{{ if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived) }}
|
||||
<div class="timeline-item comment form">
|
||||
<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
|
||||
<img src="{{.SignedUser.RelAvatarLink}}">
|
||||
{{avatar .SignedUser}}
|
||||
</a>
|
||||
<div class="content">
|
||||
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
||||
@@ -144,7 +144,7 @@
|
||||
{{if .Repository.IsArchived}}
|
||||
<div class="timeline-item comment form">
|
||||
<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
|
||||
<img src="{{.SignedUser.RelAvatarLink}}">
|
||||
{{avatar .SignedUser}}
|
||||
</a>
|
||||
<div class="content">
|
||||
<form class="ui segment form" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
|
||||
|
Reference in New Issue
Block a user