{{ define "title" }}commits · {{ .RepoInfo.FullName }}{{ end }} {{ define "extrameta" }} {{ $title := printf "commits · %s" .RepoInfo.FullName }} {{ $url := printf "https://tangled.org/%s/commits" .RepoInfo.FullName }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }}

commits

{{ range $index, $commit := .Commits }}
{{ $messageParts := splitN $commit.Message "\n\n" 2 }}
{{ index $messageParts 0 }} {{ if gt (len $messageParts) 1 }} {{ end }} {{ if index $.TagMap $commit.Hash.String }} {{ range $tag := index $.TagMap $commit.Hash.String }} {{ $tag }} {{ end }} {{ end }}
{{ if gt (len $messageParts) 1 }} {{ end }}
{{ i "folder-code" "w-4 h-4" }}
{{ $verified := $.VerifiedCommits.IsVerified $commit.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 $commit.Hash.String 0 8 }} {{ if $verified }} {{ i "shield-check" "w-3 h-3" }} {{ end }} {{ template "attribution" (list $commit $.EmailToDid) }}
{{ template "repo/fragments/shortTime" $commit.Committer.When }} {{ $pipeline := index $.Pipelines .Hash.String }} {{ if and $pipeline (gt (len $pipeline.Statuses) 0) }}
{{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $pipeline "RepoInfo" $.RepoInfo) }} {{ 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 "repoAfter" }} {{ $commits_len := len .Commits }}
{{ if gt .Page 1 }}{{ i "chevron-left" "w-4 h-4" }} previous{{ else }}
{{ end }} {{ if eq $commits_len 60 }}next {{ i "chevron-right" "w-4 h-4" }}{{ end }}
{{ end }}