Monorepo for Tangled
at 74318eac9fdd72cf69e916276814351931ed0dcb 29 lines 1.6 kB view raw
1{{ define "repo/fragments/lastCommitPanel" }} 2 {{ $messageParts := splitN .LastCommitInfo.Message "\n\n" 2 }} 3 <div class="pb-2 mb-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between text-sm"> 4 <div class="flex items-center gap-1"> 5 {{ if .LastCommitInfo.Author }} 6 {{ $authorDid := index .EmailToDid .LastCommitInfo.Author.Email }} 7 <span class="flex items-center gap-1"> 8 {{ if $authorDid }} 9 {{ template "user/fragments/picHandleLink" $authorDid }} 10 {{ else }} 11 {{ placeholderAvatar "tiny" }} 12 <a href="mailto:{{ .LastCommitInfo.Author.Email }}" class="no-underline hover:underline">{{ .LastCommitInfo.Author.Name }}</a> 13 {{ end }} 14 </span> 15 <span class="px-1 select-none before:content-['\00B7']"></span> 16 {{ end }} 17 <a href="/{{ .RepoInfo.FullName }}/commit/{{ .LastCommitInfo.Hash }}" 18 class="inline no-underline hover:underline dark:text-white"> 19 {{ index $messageParts 0 }} 20 </a> 21 <span class="px-1 select-none before:content-['\00B7']"></span> 22 <span class="text-gray-400 dark:text-gray-500">{{ template "repo/fragments/time" .LastCommitInfo.When }}</span> 23 </div> 24 <a href="/{{ .RepoInfo.FullName }}/commit/{{ .LastCommitInfo.Hash.String }}" 25 class="no-underline hover:underline text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-900 px-2 py-1 rounded font-mono text-xs"> 26 {{ slice .LastCommitInfo.Hash.String 0 8 }} 27 </a> 28 </div> 29{{ end }}