{{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }} {{ define "extrameta" }} {{ template "repo/fragments/meta" . }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} {{ end }} {{ define "repoContent" }}
{{ block "branchSelector" . }}{{ end }}
{{ block "fileTree" . }}{{ end }} {{ block "rightInfo" . }}{{ end }}
{{ end }} {{ define "branchSelector" }}
{{ if .ForkInfo.IsFork }} {{ $disabled := "" }} {{ $title := "" }} {{ if eq .ForkInfo.Status 0 }} {{ $disabled = "disabled" }} {{ $title = "This branch is not behind the upstream" }} {{ else if eq .ForkInfo.Status 2 }} {{ $disabled = "disabled" }} {{ $title = "This branch has conflicts that must be resolved" }} {{ else if eq .ForkInfo.Status 3 }} {{ $disabled = "disabled" }} {{ $title = "This branch does not exist on the upstream" }} {{ end }} {{ end }}
{{ end }} {{ define "fileTree" }}
{{ $containerstyle := "py-1" }} {{ $linkstyle := "no-underline hover:underline dark:text-white" }} {{ range .Files }} {{ if not .IsFile }}
{{ end }} {{ end }} {{ range .Files }} {{ if .IsFile }}
{{ i "file" "size-4" }}{{ .Name }}
{{ end }} {{ end }}
{{ end }} {{ define "rightInfo" }} {{ end }} {{ define "commitLog" }}
{{ i "logs" "w-4 h-4" }} commits
{{ range .CommitsTrunc }}
{{ $messageParts := splitN .Message "\n\n" 2 }}
{{ index $messageParts 0 }} {{ if gt (len $messageParts) 1 }} {{ end }}
{{ if gt (len $messageParts) 1 }} {{ end }}
{{ slice .Hash.String 0 8 }} {{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }} {{ if $didOrHandle }} {{ $didOrHandle }} {{ else }} {{ .Author.Name }} {{ end }}
{{ timeFmt .Committer.When }} {{ $tagsForCommit := index $.TagMap .Hash.String }} {{ if gt (len $tagsForCommit) 0 }}
{{ end }} {{ range $tagsForCommit }} {{ . }} {{ end }}
{{ end }}
{{ end }} {{ define "branchList" }} {{ if gt (len .BranchesTrunc) 0 }}
{{ i "git-branch" "w-4 h-4" }} branches
{{ range .BranchesTrunc }}
{{ .Reference.Name }} {{ if .Commit }} {{ end }} {{ if .IsDefault }} default {{ end }}
{{ end }}
{{ end }} {{ end }} {{ define "tagList" }} {{ if gt (len .TagsTrunc) 0 }}
{{ i "tags" "w-4 h-4" }} tags
{{ range $idx, $tag := .TagsTrunc }} {{ with $tag }}
{{ with .Tag }} {{ end }} {{ if eq $idx 0 }} latest {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }} {{ define "repoAfter" }} {{- if .HTMLReadme -}}
{{- if .Raw -}}
                        {{- .HTMLReadme -}}
                    
{{- else -}} {{ .HTMLReadme }} {{- end -}}
{{- end -}} {{ template "repo/fragments/cloneInstructions" . }} {{ end }}