Fix frontpage avatars (#13853)
The frontpage uses a rather strange method to obtain the commit's avatar which I've overlooked earlier. I don't exactly understand how it works but this change fixes the wrong default avatars by using the function that was in previous use. Also introduced a few constants for size an size increase factor. Fixes: https://github.com/go-gitea/gitea/issues/13844
This commit is contained in:
parent
658e90a114
commit
c05701dd7d
13 changed files with 78 additions and 65 deletions
|
@ -40,6 +40,12 @@ func DefaultAvatarLink() string {
|
|||
// determined by the avatar-hosting service.
|
||||
const DefaultAvatarSize = -1
|
||||
|
||||
// DefaultAvatarPixelSize is the default size in pixels of a rendered avatar
|
||||
const DefaultAvatarPixelSize = 28
|
||||
|
||||
// AvatarRenderedSizeFactor is the factor by which the default size is increased for finer rendering
|
||||
const AvatarRenderedSizeFactor = 2
|
||||
|
||||
// HashEmail hashes email address to MD5 string.
|
||||
// https://en.gravatar.com/site/implement/hash/
|
||||
func HashEmail(email string) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue