{{ 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 }}
{{ range $value := .Languages }}
{{ template "repo/fragments/colorBall" (dict "color" (langColor $value.Name)) }}
{{ or $value.Name "Other" }} {{ if lt $value.Percentage 0.05 }} 0.1% {{ else }} {{ printf "%.1f" $value.Percentage }}% {{ end }}
{{ end }}
{{ end }} {{ define "branchSelector" }}
{{ 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 .IsSubmodule }} {{ $link = printf "/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) .Name }} {{ $icon = "folder-input" }} {{ $iconStyle = "size-4" }} {{ end }} {{ if .IsFile }} {{ $link = printf "/%s/%s/%s/%s" $.RepoInfo.FullName "blob" (urlquery $.Ref) .Name }} {{ $icon = "file" }} {{ $iconStyle = "size-4" }} {{ end }}
{{ i $icon $iconStyle "flex-shrink-0" }} {{ .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 }} {{ template "attribution" (list . $.EmailToDid) }}
{{ 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 "attribution" }} {{ $commit := index . 0 }} {{ $map := index . 1 }} {{ $author := index $map $commit.Author.Email }} {{ $coauthors := $commit.CoAuthors }} {{ $all := list }} {{ if $author }} {{ $all = append $all $author }} {{ end }} {{ range $coauthors }} {{ $co := index $map .Email }} {{ if $co }} {{ $all = append $all $co }} {{ end }} {{ end }} {{ template "fragments/tinyAvatarList" (dict "all" $all "classes" "size-6") }} {{ if $author }}{{ resolve $author }}{{ else }}{{ $commit.Author.Name }}{{ end }} {{ if $coauthors }} +{{ length $coauthors }}{{ 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 -}} {{ template "repo/fragments/readme" . }} {{- end -}} {{ end }}