Something went wrong. Try again.
forked from tangled.org/core
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849{{ define "title" }} commit {{ .Diff.Commit.This }} · {{ .RepoInfo.FullName }} {{ 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"> <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> </div>
</section>
{{end}}
{{ define "repoAfter" }}{{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff) }}{{end}}