{{ define "repo/fragments/lastCommitPanel" }}
  {{ $messageParts := splitN .LastCommitInfo.Message "\n\n" 2 }}
  <div class="pb-2 mb-3 border-b border-gray-200 dark:border-gray-700 flex items-center justify-between flex-wrap text-sm gap-2">
    <div class="flex flex-wrap items-center gap-1">
      {{ if .LastCommitInfo.Author }}
        {{ $authorDid := index .EmailToDid .LastCommitInfo.Author.Email }}
        <span class="flex items-center gap-1">
            {{ if $authorDid }}
                {{ template "user/fragments/picHandleLink" $authorDid }}
            {{ else }}
                {{ placeholderAvatar "tiny" }}
                <a href="mailto:{{ .LastCommitInfo.Author.Email }}" class="no-underline hover:underline">{{ .LastCommitInfo.Author.Name }}</a>
            {{ end }}
        </span>
        <span class="px-1 select-none before:content-['\00B7'] text-gray-400 dark:text-gray-500"></span>
      {{ end }}
      <a href="/{{ .RepoInfo.FullName }}/commit/{{ .LastCommitInfo.Hash }}"
        class="inline no-underline hover:underline dark:text-white">
        {{ index $messageParts 0 }}
      </a>
      <span class="px-1 select-none before:content-['\00B7'] text-gray-400 dark:text-gray-500"></span>
      <span class="text-gray-400 dark:text-gray-500">{{ template "repo/fragments/shortTimeAgo" .LastCommitInfo.When }}</span>
    </div>
    <a href="/{{ .RepoInfo.FullName }}/commit/{{ .LastCommitInfo.Hash.String }}"
       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 w-fit">
        {{ slice .LastCommitInfo.Hash.String 0 8 }}
    </a>
  </div>
{{ end }}
