this repo has no description
1{{ define "title" }} 2 commit {{ .Diff.Commit.This }} &middot; {{ .RepoInfo.FullName }} 3{{ end }} 4 5{{ define "extrameta" }} 6 {{ $title := printf "commit %s &middot; %s" .Diff.Commit.This .RepoInfo.FullName }} 7 {{ $url := printf "https://tangled.sh/%s/commit/%s" .RepoInfo.FullName .Diff.Commit.This }} 8 9 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo "Title" $title "Url" $url) }} 10{{ end }} 11 12{{ define "repoContent" }} 13 14 {{ $repo := .RepoInfo.FullName }} 15 {{ $commit := .Diff.Commit }} 16 17 18 <section class="commit dark:text-white"> 19 <div id="commit-message"> 20 {{ $messageParts := splitN $commit.Message "\n\n" 2 }} 21 <div> 22 <p class="pb-2">{{ index $messageParts 0 }}</p> 23 {{ if gt (len $messageParts) 1 }} 24 <p class="mt-1 cursor-text pb-2 text-sm"> 25 {{ nl2br (index $messageParts 1) }} 26 </p> 27 {{ end }} 28 </div> 29 </div> 30 31 <div class="flex items-center space-x-2"> 32 <p class="text-sm text-gray-500 dark:text-gray-300"> 33 {{ $didOrHandle := index $.EmailToDidOrHandle $commit.Author.Email }} 34 35 {{ if $didOrHandle }} 36 <a 37 href="/{{ $didOrHandle }}" 38 class="no-underline hover:underline text-gray-500 dark:text-gray-300"> 39 {{ $didOrHandle }} 40 </a> 41 {{ else }} 42 <a 43 href="mailto:{{ $commit.Author.Email }}" 44 class="no-underline hover:underline text-gray-500 dark:text-gray-300"> 45 {{ $commit.Author.Name }} 46 </a> 47 {{ end }} 48 <span class="px-1 select-none before:content-['\00B7']"></span> 49 {{ template "repo/fragments/time" $commit.Author.When }} 50 <span class="px-1 select-none before:content-['\00B7']"></span> 51 </p> 52 53 <p class="flex items-center text-sm text-gray-500 dark:text-gray-300"> 54 <a 55 href="/{{ $repo }}/commit/{{ $commit.This }}" 56 class="no-underline hover:underline text-gray-500 dark:text-gray-300"> 57 {{ slice $commit.This 0 8 }} 58 </a> 59 {{ if $commit.Parent }} 60 {{ i "arrow-left" "w-3 h-3 mx-1" }} 61 <a 62 href="/{{ $repo }}/commit/{{ $commit.Parent }}" 63 class="no-underline hover:underline text-gray-500 dark:text-gray-300"> 64 {{ slice $commit.Parent 0 8 }} 65 </a> 66 {{ end }} 67 </p> 68 69 {{ if .VerifiedCommit.IsVerified $commit.This }} 70 <div class="group relative inline-block text-sm"> 71 <div 72 class="bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 px-2 py-1 rounded cursor-pointer"> 73 <div class="flex items-center gap-2"> 74 {{ i "shield-check" "w-4 h-4" }} 75 verified 76 </div> 77 </div> 78 <div 79 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"> 80 <div class="mb-1"> 81 This commit was signed with the committer's 82 <span class="text-green-600 font-semibold">known signature</span> 83 . 84 </div> 85 <div class="flex items-center gap-2 my-2"> 86 {{ i "user" "w-4 h-4" }} 87 {{ $committerDidOrHandle := index $.EmailToDidOrHandle $commit.Committer.Email }} 88 <a href="/{{ $committerDidOrHandle }}"> 89 {{ template "user/fragments/picHandleLink" $committerDidOrHandle }} 90 </a> 91 </div> 92 <div class="my-1 pt-2 text-xs border-t"> 93 <div class="text-gray-600 dark:text-gray-300"> 94 SSH Key Fingerprint: 95 </div> 96 <div class="break-all"> 97 {{ .VerifiedCommit.Fingerprint $commit.This }} 98 </div> 99 </div> 100 </div> 101 </div> 102 {{ end }} 103 104 105 <div class="text-sm"> 106 {{ if $.Pipeline }} 107 {{ template "repo/pipelines/fragments/pipelineSymbolLong" (dict "Pipeline" $.Pipeline "RepoInfo" $.RepoInfo) }} 108 {{ end }} 109 </div> 110 </div> 111 </section> 112{{ end }} 113 114{{ define "topbarLayout" }} 115 <header class="px-1 col-span-full" style="z-index: 20;"> 116 {{ template "layouts/topbar" . }} 117 </header> 118{{ end }} 119 120{{ define "mainLayout" }} 121 <div class="px-1 col-span-full flex flex-col gap-4"> 122 {{ block "contentLayout" . }} 123 {{ block "content" . }}{{ end }} 124 {{ end }} 125 126 {{ block "contentAfterLayout" . }} 127 <div class="flex-grow grid grid-cols-1 md:grid-cols-12 gap-4"> 128 <div class="flex flex-col gap-4 col-span-1 md:col-span-2"> 129 {{ block "contentAfterLeft" . }}{{ end }} 130 </div> 131 <main class="col-span-1 md:col-span-10"> 132 {{ block "contentAfter" . }}{{ end }} 133 </main> 134 </div> 135 {{ end }} 136 </div> 137{{ end }} 138 139{{ define "footerLayout" }} 140 <footer class="px-1 col-span-full mt-12"> 141 {{ template "layouts/footer" . }} 142 </footer> 143{{ end }} 144 145{{ define "contentAfter" }} 146 {{ template "repo/fragments/diff" (list .RepoInfo.FullName .Diff .DiffOpts) }} 147{{ end }} 148 149{{ define "contentAfterLeft" }} 150 <div class="flex flex-col gap-4 col-span-1 md:col-span-2"> 151 {{ template "repo/fragments/diffOpts" .DiffOpts }} 152 </div> 153 <div class="sticky top-0 flex-grow max-h-screen"> 154 {{ template "repo/fragments/diffChangedFiles" .Diff }} 155 </div> 156{{ end }}