|
|
@ -60,17 +60,6 @@ func AvatarByAction(ctx context.Context, action *activities_model.Action, others |
|
|
|
return Avatar(ctx, action.ActUser, others...) |
|
|
|
return Avatar(ctx, action.ActUser, others...) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// RepoAvatar renders repo avatars. args: repo, size(int), class (string)
|
|
|
|
|
|
|
|
func RepoAvatar(repo *repo_model.Repository, others ...any) template.HTML { |
|
|
|
|
|
|
|
size, class := gitea_html.ParseSizeAndClass(avatars.DefaultAvatarPixelSize, avatars.DefaultAvatarClass, others...) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src := repo.RelAvatarLink() |
|
|
|
|
|
|
|
if src != "" { |
|
|
|
|
|
|
|
return AvatarHTML(src, size, class, repo.FullName()) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return template.HTML("") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// AvatarByEmail renders avatars by email address. args: email, name, size (int), class (string)
|
|
|
|
// AvatarByEmail renders avatars by email address. args: email, name, size (int), class (string)
|
|
|
|
func AvatarByEmail(ctx context.Context, email, name string, others ...any) template.HTML { |
|
|
|
func AvatarByEmail(ctx context.Context, email, name string, others ...any) template.HTML { |
|
|
|
size, class := gitea_html.ParseSizeAndClass(avatars.DefaultAvatarPixelSize, avatars.DefaultAvatarClass, others...) |
|
|
|
size, class := gitea_html.ParseSizeAndClass(avatars.DefaultAvatarPixelSize, avatars.DefaultAvatarClass, others...) |
|
|
|