{{template "repo/header" .}}
{{template "base/alert" .}} {{template "repo/code/recently_pushed_new_branches" .}} {{if and (not .HideRepoInfo) (not .IsBlame)}}
{{$description := .Repository.DescriptionHTML $.Context}} {{if $description}}{{$description | RenderCodeBlock}}{{else if .IsRepositoryAdmin}}{{ctx.Locale.Tr "repo.no_desc"}}{{end}} {{.Repository.Website}}
{{template "shared/search/button"}}
{{/* it should match the code in issue-home.js */}} {{range .Topics}}{{.Name}}{{end}} {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}{{end}}
{{end}} {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}
{{end}} {{if RepoFlagsEnabled}} {{template "custom/repo_flag_banners" .}} {{if .SignedUser.IsAdmin}} {{template "repo/admin_flags" .}} {{end}} {{end}} {{if .Repository.IsArchived}}
{{if .Repository.ArchivedUnix.IsZero}} {{ctx.Locale.Tr "repo.archive.title"}} {{else}} {{ctx.Locale.Tr "repo.archive.title_date" (DateTime "long" .Repository.ArchivedUnix)}} {{end}}
{{end}} {{template "repo/sub_menu" .}}
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "tw-mr-1"}} {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} {{$cmpBranch := ""}} {{if ne .Repository.ID .BaseRepo.ID}} {{$cmpBranch = printf "%s/%s:" (.Repository.OwnerName|PathEscape) (.Repository.Name|PathEscape)}} {{end}} {{$cmpBranch = print $cmpBranch (.BranchName|PathEscapeSegments)}} {{$compareLink := printf "%s/compare/%s...%s" .BaseRepo.Link (.BaseRepo.DefaultBranch|PathEscapeSegments) $cmpBranch}} {{svg "octicon-git-pull-request"}} {{end}} {{$n := len .TreeNames}} {{$l := Eval $n "-" 1}} {{if eq $n 0}} {{ctx.Locale.Tr "repo.find_file.go_to_file"}} {{end}} {{if and .CanWriteCode .IsViewBranch (not .Repository.IsMirror) (not .Repository.IsArchived) (not .IsViewFile)}} {{end}} {{if and (eq $n 0) (.Repository.IsTemplate)}} {{ctx.Locale.Tr "repo.use_template"}} {{end}} {{if ne $n 0}} {{StringUtils.EllipsisString .Repository.Name 30}} {{- range $i, $v := .TreeNames -}} / {{- if eq $i $l -}} {{StringUtils.EllipsisString $v 30}} {{- else -}} {{$p := index $.Paths $i}}{{StringUtils.EllipsisString $v 30}} {{- end -}} {{- end -}} {{end}}
{{if eq $n 0}}
{{template "repo/clone_buttons" .}} {{template "repo/clone_script" .}}{{/* the script will update `.js-clone-url` and related elements */}}
{{template "repo/cite/cite_modal" .}} {{end}} {{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}} {{svg "octicon-history" 16 "tw-mr-2"}}{{ctx.Locale.Tr "repo.file_history"}} {{end}}
{{if .IsViewFile}} {{template "repo/view_file" .}} {{else if .IsBlame}} {{template "repo/blame" .}} {{else}} {{template "repo/view_list" .}} {{end}}