{{define "content"}}
{{avatar .ProfileUser.Username .ProfileUser.AvatarURL "avatar-xxl"}}

{{if .ProfileUser.FullName}}{{.ProfileUser.FullName}}{{else}}{{.ProfileUser.Username}}{{end}}

{{if .ProfileUser.IsAdmin}} {{t .Lang "admin.role.admin"}} {{end}}
@{{.ProfileUser.Username}}
{{if .ProfileUser.Bio}}

{{.ProfileUser.Bio}}

{{end}}
{{if .ProfileUser.Location}} {{icon "map-pin" "size-3.5"}}{{.ProfileUser.Location}} {{end}} {{if .ProfileUser.Website}} {{icon "link" "size-3.5"}}{{.ProfileUser.Website}} {{end}} {{icon "calendar" "size-3.5"}}{{t .Lang "profile.joined"}} ยท {{formatShortDate .ProfileUser.CreatedAt}}
{{if .CurrentUser}} {{if eq .CurrentUser.ID .ProfileUser.ID}} {{icon "edit" "size-3.5"}} {{t .Lang "profile.edit"}} {{end}} {{end}}
{{if .ProfileReadmeHTML}}
{{.ProfileReadmeHTML}}
{{end}}

{{t .Lang "nav.repositories"}} {{len .Repos}}

/
{{if .CurrentUser}} {{if eq .CurrentUser.ID .ProfileUser.ID}} {{icon "plus" "size-3.5"}} {{t .Lang "nav.new_repo"}} {{end}} {{end}}
{{if .Repos}}
{{range .Repos}}
{{if .IsPrivate}} {{icon "lock" "size-3.5"}} {{else}} {{icon "book-open" "size-3.5"}} {{end}} {{.Name}} {{if .IsPrivate}}{{t $.Lang "repo.private"}}{{else}}{{t $.Lang "repo.public"}}{{end}}
{{if .Description}}

{{.Description}}

{{end}}
{{icon "git-branch" "size-3.5"}} {{.DefaultBranch}} {{timeAgo .UpdatedAt $.Lang}}
{{end}}
{{else}} {{if and .CurrentUser (eq .CurrentUser.ID .ProfileUser.ID)}} {{template "ui_empty_state" (dict "Icon" "git-branch" "Title" (t .Lang "repo.empty_list") "Subtitle" (t .Lang "repo.empty_list_sub") "ActionHref" "/new" "ActionLabel" (t .Lang "repo.new.title") "ActionIcon" "plus")}} {{else}} {{template "ui_empty_state" (dict "Icon" "git-branch" "Title" (t .Lang "repo.empty_list"))}} {{end}} {{end}}
{{end}}