Something went wrong. Try again.
Monorepo for Tangled
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788{{ 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 }}
<section class="commit dark:text-white"> <div id="commit-message"> {{ $messageParts := splitN $commit.Message "\n\n" 2 }} <div> <p class="pb-2">{{ index $messageParts 0 }}</p> {{ if gt (len $messageParts) 1 }} <p class="mt-1 cursor-text pb-2 text-sm">{{ nl2br (index $messageParts 1) }}</p> {{ end }} </div> </div>
<div class="flex items-center space-x-2"> <p class="text-sm text-gray-500 dark:text-gray-300"> {{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }}
{{ if $didOrHandle }} <a href="/{{ $didOrHandle }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $didOrHandle }}</a> {{ else }} <a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a> {{ end }} <span class="px-1 select-none before:content-['\00B7']"></span> {{ timeFmt $commit.Author.When }} <span class="px-1 select-none before:content-['\00B7']"></span> </p>
<p class="flex items-center text-sm text-gray-500 dark:text-gray-300"> <a href="/{{ $repo }}/commit/{{ $commit.This }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ slice $commit.This 0 8 }}</a> {{ if $commit.Parent }} {{ i "arrow-left" "w-3 h-3 mx-1" }} <a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ slice $commit.Parent 0 8 }}</a> {{ end }} </p>
{{ if .VerifiedCommit.IsVerified $commit.This }} <div class="group relative inline-block text-sm"> <div class="bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 py-1 rounded cursor-pointer"> <div class="flex items-center gap-2"> {{ i "shield-check" "w-4 h-4" }} verified </div> </div> <div class="absolute z-[9999] hidden group-hover:block bg-white dark:bg-gray-900 text-sm text-black dark:text-white rounded-md shadow-md p-4 w-80 top-full mt-2"> <div class="mb-1">This commit was signed with the committer's <span class="text-green-600 font-semibold">known signature</span>.</div> <div class="flex items-center gap-2 my-2"> {{ i "user" "w-4 h-4" }} {{ $committerDidOrHandle := index $.EmailToDidOrHandle $commit.Committer.Email }} <a href="/{{ $committerDidOrHandle }}">{{ $committerDidOrHandle }}</a> </div> <div class="my-1 pt-2 text-xs border-t"> <div class="text-gray-600 dark:text-gray-300">SSH Key Fingerprint:</div> <div class="break-all">{{ .VerifiedCommit.Fingerprint $commit.This }}</div> </div> </div> </div> {{ end }}
<div class="text-sm"> {{ if $.Pipeline }} {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $.Pipeline "RepoInfo" $.RepoInfo) }} {{ end }} </div> </div>
</section>
{{end}}
{{ define "repoAfter" }}<div class="-z-[9999]">{{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff) }}</div>{{end}}