{{/* Template Attributes: * User: The user associated with the commit, if any * Commit: The commit * Author: The author, currently only the commit page passes this * AvatarSize: Avatar size in pixels * AuthorBold: Whether to render the author as bold text */}}
{{if .User}} {{ctx.AvatarUtils.Avatar .User .AvatarSize}} {{$username := ""}} {{if and .User.FullName DefaultShowFullName}} {{$username = .User.FullName}} {{else if .User.Name}} {{$username = .User.Name}} {{end}} {{$username}} {{else if .Author}} {{$username := ""}} {{if and .Author.FullName DefaultShowFullName}} {{$username = .Author.FullName}} {{else if .Author.Name}} {{$username = .Author.Name}} {{else if .Commit.Author.Name}} {{$username = .Commit.Author.Name}} {{end}} {{ctx.AvatarUtils.AvatarByEmail .Author.Email $username .AvatarSize}} {{if .Author.HomeLink}} {{$username}} {{else}} {{$username}} {{end}} {{else}} {{$username := ""}} {{if .Commit.Author.Name}} {{$username = .Commit.Author.Name}} {{else}} {{$username = .Author.Name}} {{end}} {{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email $username .AvatarSize}} {{if .Commit.Author.Name}} {{.Commit.Author.Name}} {{else}} {{.Author.Name}} {{end}} {{end}}