1{{ define "title" }}{{ .RepoInfo.FullName }}{{ end }}
2
3{{ define "extrameta" }}
4 {{ template "repo/fragments/meta" . }}
5 {{ template "repo/fragments/og" (dict "RepoInfo" .RepoInfo) }}
6{{ end }}
7
8{{ define "repoContent" }}
9 <main>
10 {{ if gt (len .BranchesTrunc) 0 }}
11 <div class="flex flex-col items-center">
12 <p class="text-center pt-5 text-gray-400 dark:text-gray-500">
13 This branch is empty. Other branches in this repository are populated:
14 </p>
15 <div class="mt-4 grid grid-cols-1 divide-y divide-gray-200 dark:divide-gray-700 rounded border border-gray-200 dark:border-gray-700 w-full md:w-1/2">
16 {{ range $br := .BranchesTrunc }}
17 <a href="/{{ $.RepoInfo.FullName }}/tree/{{$br.Name | urlquery }}" class="no-underline hover:no-underline">
18 <div class="flex items-center justify-between p-2">
19 {{ $br.Name }}
20 <span class="text-gray-500 dark:text-gray-400">{{ template "repo/fragments/time" $br.Commit.Committer.When }}</span>
21 </div>
22 </a>
23 {{ end }}
24 </div>
25 </div>
26 {{ else if (and .LoggedInUser (eq .LoggedInUser.Did .RepoInfo.OwnerDid)) }}
27 {{ $knot := .RepoInfo.Knot }}
28 {{ if eq $knot "knot1.tangled.sh" }}
29 {{ $knot = "tangled.sh" }}
30 {{ end }}
31 <div class="w-full flex place-content-center">
32 <div class="py-6 w-fit flex flex-col gap-4">
33 <p>This is an empty repository. To get started:</p>
34 {{ $bullet := "mx-2 text-xs bg-gray-200 dark:bg-gray-600 rounded-full size-5 flex items-center justify-center font-mono inline-flex align-middle" }}
35
36 <p><span class="{{$bullet}}">1</span>First, generate a new <a href="https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key" class="underline">SSH key pair</a>.</p>
37 <p><span class="{{$bullet}}">2</span>Then add the public key to your account from the <a href="/settings" class="underline">settings</a> page.</p>
38 <p><span class="{{$bullet}}">3</span>Configure your remote to <code>git@{{ $knot }}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code></p>
39 <p><span class="{{$bullet}}">4</span>Push!</p>
40 </div>
41 </div>
42 {{ else }}
43 <p class="text-gray-400 dark:text-gray-500 py-6 text-center">This is an empty repository.</p>
44 {{ end }}
45 </main>
46{{ end }}
47
48{{ define "repoAfter" }}
49 {{ template "repo/fragments/cloneInstructions" . }}
50{{ end }}