forked from tangled.org/core
Monorepo for Tangled

unify clone instructions in repo templates

Changed files
+35 -52
appview
pages
templates
+33
appview/pages/templates/fragments/cloneInstructions.html
··· 1 + {{ define "fragments/cloneInstructions" }} 2 + <section class="mt-4 p-6 rounded bg-white dark:bg-gray-800 dark:text-white w-full mx-auto overflow-auto flex flex-col gap-4"> 3 + <div class="flex flex-col gap-2"> 4 + <strong>push</strong> 5 + <div class="md:pl-4 overflow-x-auto whitespace-nowrap"> 6 + <code class="dark:text-gray-100">git remote add origin git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code> 7 + </div> 8 + </div> 9 + 10 + <div class="flex flex-col gap-2"> 11 + <strong>clone</strong> 12 + <div class="md:pl-4 flex flex-col gap-2"> 13 + 14 + <div class="flex items-center gap-3"> 15 + <span class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-white">HTTP</span> 16 + <div class="overflow-x-auto whitespace-nowrap flex-1"> 17 + <code class="dark:text-gray-100">git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }}</code> 18 + </div> 19 + </div> 20 + 21 + <div class="flex items-center gap-3"> 22 + <span class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-white">SSH</span> 23 + <div class="overflow-x-auto whitespace-nowrap flex-1"> 24 + <code class="dark:text-gray-100">git clone git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code> 25 + </div> 26 + </div> 27 + </div> 28 + </div> 29 + 30 + 31 + <p class="py-2 text-gray-500 dark:text-gray-400">Note that for self-hosted knots, clone URLs may be different based on your setup.</p> 32 + </section> 33 + {{ end }}
+1 -20
appview/pages/templates/repo/empty.html
··· 9 9 {{ end }} 10 10 11 11 {{ define "repoAfter" }} 12 - <section class="mt-4 p-6 rounded bg-white dark:bg-gray-800 dark:text-white w-full mx-auto overflow-auto"> 13 - <strong>push</strong> 14 - <div class="py-2"> 15 - <code class="dark:text-gray-300">git remote add origin git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code> 16 - </div> 17 - <strong>clone</strong> 18 - 19 - 20 - <div class="flex flex-col gap-2"> 21 - <div class="pt-2 flex flex-row gap-2"> 22 - <span class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-gray-300">HTTP</span> 23 - <code class="dark:text-gray-300">git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }}</code> 24 - </div> 25 - <div class="pt-2 flex flex-row gap-2"> 26 - <span class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-gray-300">SSH</span><code class="dark:text-gray-300">git clone git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code> 27 - </div> 28 - </div> 29 - <p class="py-2 text-gray-500 dark:text-gray-400">Note that for self-hosted knots, clone URLs may be different based on your setup.</p> 30 - </section> 31 - 12 + {{ template "fragments/cloneInstructions" . }} 32 13 {{ end }}
+1 -32
appview/pages/templates/repo/index.html
··· 207 207 </section> 208 208 {{- end -}} 209 209 210 - 211 - <section class="mt-4 p-6 rounded bg-white dark:bg-gray-800 dark:text-white w-full mx-auto overflow-auto flex flex-col gap-4"> 212 - <div class="flex flex-col gap-2"> 213 - <strong>push</strong> 214 - <div class="md:pl-4 overflow-x-auto whitespace-nowrap"> 215 - <code class="dark:text-gray-100">git remote add origin git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code> 216 - </div> 217 - </div> 218 - 219 - <div class="flex flex-col gap-2"> 220 - <strong>clone</strong> 221 - <div class="md:pl-4 flex flex-col gap-2"> 222 - 223 - <div class="flex items-center gap-3"> 224 - <span class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-white">HTTP</span> 225 - <div class="overflow-x-auto whitespace-nowrap flex-1"> 226 - <code class="dark:text-gray-100">git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }}</code> 227 - </div> 228 - </div> 229 - 230 - <div class="flex items-center gap-3"> 231 - <span class="bg-gray-100 dark:bg-gray-700 p-1 mr-1 font-mono text-sm rounded select-none dark:text-white">SSH</span> 232 - <div class="overflow-x-auto whitespace-nowrap flex-1"> 233 - <code class="dark:text-gray-100">git clone git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }}</code> 234 - </div> 235 - </div> 236 - </div> 237 - </div> 238 - 239 - 240 - <p class="py-2 text-gray-500 dark:text-gray-400">Note that for self-hosted knots, clone URLs may be different based on your setup.</p> 241 - </section> 210 + {{ template "fragments/cloneInstructions" . }} 242 211 {{ end }}