forked from tangled.org/core
this repo has no description
at interdiff 1.9 kB view raw
1{{ define "title" }} commit {{ .Diff.Commit.This }} &middot; {{ .RepoInfo.FullName }} {{ end }} 2 3{{ define "repoContent" }} 4 5{{ $repo := .RepoInfo.FullName }} 6{{ $commit := .Diff.Commit }} 7 8<section class="commit dark:text-white"> 9 <div id="commit-message"> 10 {{ $messageParts := splitN $commit.Message "\n\n" 2 }} 11 <div> 12 <p class="pb-2">{{ index $messageParts 0 }}</p> 13 {{ if gt (len $messageParts) 1 }} 14 <p class="mt-1 cursor-text pb-2 text-sm">{{ nl2br (index $messageParts 1) }}</p> 15 {{ end }} 16 </div> 17 </div> 18 19 <div class="flex items-center"> 20 <p class="text-sm text-gray-500 dark:text-gray-300"> 21 {{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }} 22 23 {{ if $didOrHandle }} 24 <a href="/{{ $didOrHandle }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $didOrHandle }}</a> 25 {{ else }} 26 <a href="mailto:{{ $commit.Author.Email }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ $commit.Author.Name }}</a> 27 {{ end }} 28 <span class="px-1 select-none before:content-['\00B7']"></span> 29 {{ timeFmt $commit.Author.When }} 30 <span class="px-1 select-none before:content-['\00B7']"></span> 31 </p> 32 33 <p class="flex items-center text-sm text-gray-500 dark:text-gray-300"> 34 <a href="/{{ $repo }}/commit/{{ $commit.This }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ slice $commit.This 0 8 }}</a> 35 {{ if $commit.Parent }} 36 {{ i "arrow-left" "w-3 h-3 mx-1" }} 37 <a href="/{{ $repo }}/commit/{{ $commit.Parent }}" class="no-underline hover:underline text-gray-500 dark:text-gray-300">{{ slice $commit.Parent 0 8 }}</a> 38 {{ end }} 39 </p> 40 </div> 41 42</section> 43 44{{end}} 45 46{{ define "repoAfter" }} 47{{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff) }} 48{{end}}