{{define "ui_button"}} {{end}} {{define "ui_badge"}} {{if .Icon}}{{icon .Icon "size-3.5"}}{{end}} {{.Text}} {{end}} {{define "ui_kbd"}} {{.}} {{end}} {{define "ui_avatar"}} {{if .Large}}{{avatar .Username .AvatarURL "avatar-lg"}}{{else}}{{avatar .Username .AvatarURL}}{{end}} {{end}} {{define "ui_empty_state"}}
{{if .Icon}}
{{icon .Icon "size-6"}}
{{end}}
{{.Title}}
{{if .Subtitle}}
{{.Subtitle}}
{{end}} {{if .ActionHref}}
{{if .ActionIcon}}{{icon .ActionIcon "size-3.5"}}{{end}} {{.ActionLabel}}
{{end}}
{{end}} {{define "repo_header"}}
{{avatar .Repo.OwnerUsername .Repo.OwnerAvatarURL "repo-avatar"}}
{{if .Repo.IsPrivate}} {{icon "lock" "size-3.5"}} {{t .Lang "repo.private"}} {{else}} {{icon "globe" "size-3.5"}} {{t .Lang "repo.public"}} {{end}} {{if .Repo.Description}} {{.Repo.Description}} {{end}}
{{if .Repo.ForkedFromRepoID}}
{{icon "git-branch" "size-3.5"}} {{t .Lang "fork.forked_from"}} {{.Repo.ForkedFromOwner}}/{{.Repo.ForkedFromName}}
{{end}}
{{if .CurrentUser}}
{{if .IsRepoOwner}} {{icon "git-branch" "size-3.5"}} {{else if .ViewerFork}} {{icon "git-branch" "size-3.5"}} {{else}}
{{end}} {{if .Repo.EnableIssues}} {{icon "issue" "size-3.5"}} {{end}} {{if .Repo.EnablePulls}} {{icon "git-pull-request" "size-3.5"}} {{end}}
{{end}}
{{icon "code" "size-4"}} {{t .Lang "repo.tab.code"}} {{if .Repo.EnableIssues}} {{icon "issue" "size-4"}} {{t .Lang "repo.tab.issues"}} {{if gt .Repo.OpenIssueCount 0}} {{.Repo.OpenIssueCount}} {{end}} {{end}} {{if .Repo.EnablePulls}} {{icon "git-pull-request" "size-4"}} {{t .Lang "repo.tab.pulls"}} {{if gt .Repo.OpenPRCount 0}} {{.Repo.OpenPRCount}} {{end}} {{end}} {{if .Repo.EnableReleases}} {{icon "tag" "size-4"}} {{t .Lang "repo.tab.releases"}} {{if gt .Repo.ReleaseCount 0}} {{.Repo.ReleaseCount}} {{end}} {{end}} {{if .Repo.EnableActivity}} {{icon "activity" "size-4"}} {{t .Lang "repo.tab.activity"}} {{end}} {{if .CanWrite}} {{icon "settings" "size-4"}} {{t .Lang "repo.tab.settings"}} {{end}}
{{end}}