{{ define "title" }} commit {{ .Diff.Commit.This }} · {{ .RepoInfo.FullName }} {{ end }} {{ define "extrameta" }} {{ $title := printf "commit %s · %s" .Diff.Commit.This .RepoInfo.FullName }} {{ $url := printf "https://tangled.sh/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} {{ end }} {{ define "repoContent" }} {{ $repo := .RepoInfo.FullName }} {{ $commit := .Diff.Commit }}
{{ $messageParts := splitN $commit.Message "\n\n" 2 }}

{{ index $messageParts 0 }}

{{ if gt (len $messageParts) 1 }}

{{ nl2br (index $messageParts 1) }}

{{ end }}

{{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }} {{ if $didOrHandle }} {{ $didOrHandle }} {{ else }} {{ $commit.Author.Name }} {{ end }} {{ template "repo/fragments/time" $commit.Author.When }}

{{ slice $commit.This 0 8 }} {{ if $commit.Parent }} {{ i "arrow-left" "w-3 h-3 mx-1" }} {{ slice $commit.Parent 0 8 }} {{ end }}

{{ if .VerifiedCommit.IsVerified $commit.This }}
{{ i "shield-check" "w-4 h-4" }} verified
{{ end }}
{{ if $.Pipeline }} {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $.Pipeline "RepoInfo" $.RepoInfo) }} {{ end }}
{{end}} {{ define "topbarLayout" }}
{{ template "layouts/topbar" . }}
{{ end }} {{ define "mainLayout" }}
{{ block "contentLayout" . }} {{ block "content" . }}{{ end }} {{ end }} {{ block "contentAfterLayout" . }}
{{ block "contentAfterLeft" . }} {{ end }}
{{ block "contentAfter" . }}{{ end }}
{{ end }}
{{ end }} {{ define "footerLayout" }} {{ end }} {{ define "contentAfter" }} {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} {{end}} {{ define "contentAfterLeft" }}
{{ template "repo/fragments/diffOpts" .DiffOpts }}
{{ template "repo/fragments/diffChangedFiles" .Diff }}
{{end}}