{{ define "user" }} {{ template "head" . }} {{ template "meta" .Meta }} {{ template "nav" . }}
{{ if .ViewedUser.Avatar }}
{{ else if .HasProfile }} {{ else }} {{ end }}

{{ .ViewedUser.Handle }}

{{ if or (eq .SupporterBadge "Captain") (eq .SupporterBadge "owner") }} {{ .SupporterBadge }} {{ else if .SupporterBadge }} {{ .SupporterBadge }} {{ end }}
{{ if not .HasProfile }}

This user hasn't set up their {{ .ClientShortName }} profile yet.

{{ else if .HasError }} {{ template "state-error" (dict "Title" "We couldn't load their images" "Subtext" "The database had trouble fetching this profile. Try refreshing in a moment." "RetryURL" (printf "/u/%s" .ViewedUser.Handle) ) }} {{ else }}
{{ template "card-grid" (dict "Repositories" .Repositories "Columns" 4 "EmptyMessage" "No images yet.") }}
{{ end }}
{{ template "footer" . }} {{ end }}