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