{{ define "title" }}{{ .RepoInfo.FullName }} at {{ .Ref }}{{ end }} {{ define "extrameta" }} {{ template "repo/fragments/meta" . }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }} {{ end }} {{ define "repoContent" }}
{{ if .Languages }} {{ block "repoLanguages" . }}{{ end }} {{ end }}
{{ block "branchSelector" . }}{{ end }}
{{ block "fileTree" . }}{{ end }} {{ block "rightInfo" . }}{{ end }}
{{ end }} {{ define "repoLanguages" }}
{{ range $value := .Languages }}
{{ end }}
{{ end }} {{ define "branchSelector" }}
{{ $isOwner := and .LoggedInUser .RepoInfo.Roles.IsOwner }} {{ $isCollaborator := and .LoggedInUser .RepoInfo.Roles.IsCollaborator }} {{ if and (or $isOwner $isCollaborator) .ForkInfo .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 }} {{ i "git-compare" "w-4 h-4" }}
{{ end }} {{ define "fileTree" }}
{{ $linkstyle := "no-underline hover:underline dark:text-white" }} {{ range .Files }}
{{ $link := printf "/%s/%s/%s/%s" $.RepoInfo.FullName "tree" (urlquery $.Ref) .Name }} {{ $icon := "folder" }} {{ $iconStyle := "size-4 fill-current" }} {{ if .IsFile }} {{ $link = printf "/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) .Name }} {{ $icon = "file" }} {{ $iconStyle = "size-4" }} {{ end }}
{{ i $icon $iconStyle }}{{ .Name }}
{{ with .LastCommit }} {{ template "repo/fragments/time" .When }} {{ end }}
{{ end }}
{{ end }} {{ define "rightInfo" }} {{ end }} {{ define "commitLog" }}
{{ i "logs" "w-4 h-4" }} commits {{ .TotalCommits }}
{{ range .CommitsTrunc }}
{{ $messageParts := splitN .Message "\n\n" 2 }}
{{ index $messageParts 0 }} {{ if gt (len $messageParts) 1 }} {{ end }}
{{ if gt (len $messageParts) 1 }} {{ end }}
{{ $verified := $.VerifiedCommits.IsVerified .Hash.String }} {{ $hashStyle := "text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900" }} {{ if $verified }} {{ $hashStyle = "bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 rounded" }} {{ end }} {{ slice .Hash.String 0 8 }} {{ if $verified }} {{ i "shield-check" "w-3 h-3" }} {{ end }} {{ $didOrHandle := index $.EmailToDidOrHandle .Author.Email }} {{ if $didOrHandle }} {{ template "user/fragments/picHandleLink" $didOrHandle }} {{ else }} {{ .Author.Name }} {{ end }}
{{ template "repo/fragments/time" .Committer.When }} {{ $tagsForCommit := index $.TagMap .Hash.String }} {{ if gt (len $tagsForCommit) 0 }}
{{ end }} {{ range $tagsForCommit }} {{ . }} {{ end }} {{ $pipeline := index $.Pipelines .Hash.String }} {{ if and $pipeline (gt (len $pipeline.Statuses) 0) }}
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "RepoInfo" $.RepoInfo "Pipeline" $pipeline) }} {{ end }}
{{ end }}
{{ end }} {{ define "branchList" }} {{ if gt (len .BranchesTrunc) 0 }}
{{ i "git-branch" "w-4 h-4" }} branches {{ len .Branches }}
{{ range .BranchesTrunc }}
{{ .Reference.Name }} {{ if .Commit }} {{ template "repo/fragments/time" .Commit.Committer.When }} {{ end }} {{ if .IsDefault }} default {{ end }}
{{ if ne $.Ref .Reference.Name }} {{ i "git-compare" "w-3 h-3" }} compare {{end}}
{{ end }}
{{ end }} {{ end }} {{ define "tagList" }} {{ if gt (len .TagsTrunc) 0 }}
{{ i "tags" "w-4 h-4" }} tags {{ len .Tags }}
{{ range $idx, $tag := .TagsTrunc }} {{ with $tag }}
{{ with .Tag }} {{ template "repo/fragments/time" .Tagger.When }} {{ end }} {{ if eq $idx 0 }} {{ with .Tag }}{{ end }} latest {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }} {{ define "repoAfter" }} {{- if or .HTMLReadme .Readme -}}
{{- if .Raw -}}
                        {{- .Readme -}}
                    
{{- else -}} {{ .HTMLReadme }} {{- end -}}
{{- end -}} {{ template "repo/fragments/cloneInstructions" . }} {{ end }}