1{{ define "repo/fragments/cloneInstructions" }}
2 {{ $knot := .RepoInfo.Knot }}
3 {{ if eq $knot "knot1.tangled.sh" }}
4 {{ $knot = "tangled.sh" }}
5 {{ end }}
6 <section
7 class="mt-4 p-6 rounded drop-shadow-sm bg-white dark:bg-gray-800 dark:text-white w-full mx-auto overflow-auto flex flex-col gap-4"
8 >
9 <div class="flex flex-col gap-2">
10 <strong>push</strong>
11 <div class="md:pl-4 overflow-x-auto whitespace-nowrap">
12 <code class="dark:text-gray-100"
13 >git remote add origin
14 git@{{ $knot }}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code
15 >
16 </div>
17 </div>
18
19 <div class="flex flex-col gap-2">
20 <strong>clone</strong>
21 <div class="md:pl-4 flex flex-col gap-2">
22 <div class="flex items-center gap-3">
23 <span
24 class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-white"
25 >HTTP</span
26 >
27 <div class="overflow-x-auto whitespace-nowrap flex-1">
28 <code class="dark:text-gray-100"
29 >git clone
30 https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }}</code
31 >
32 </div>
33 </div>
34
35 <div class="flex items-center gap-3">
36 <span
37 class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-white"
38 >SSH</span
39 >
40 <div class="overflow-x-auto whitespace-nowrap flex-1">
41 <code class="dark:text-gray-100"
42 >git clone
43 git@{{ $knot }}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code
44 >
45 </div>
46 </div>
47 </div>
48 </div>
49
50 <p class="py-2 text-gray-500 dark:text-gray-400">
51 Note that for self-hosted knots, clone URLs may be different based
52 on your setup.
53 </p>
54 </section>
55{{ end }}