From 90cab25602f27ce263c9bd4d9356bdb9ea67af41 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sat, 29 Mar 2025 17:05:04 +0000 Subject: [PATCH] unify clone instructions in repo templates --- .../fragments/cloneInstructions.html | 33 +++++++++++++++++++ appview/pages/templates/repo/empty.html | 21 +----------- appview/pages/templates/repo/index.html | 33 +------------------ 3 files changed, 35 insertions(+), 52 deletions(-) create mode 100644 appview/pages/templates/fragments/cloneInstructions.html diff --git a/appview/pages/templates/fragments/cloneInstructions.html b/appview/pages/templates/fragments/cloneInstructions.html new file mode 100644 index 00000000..bd399732 --- /dev/null +++ b/appview/pages/templates/fragments/cloneInstructions.html @@ -0,0 +1,33 @@ +{{ define "fragments/cloneInstructions" }} +
+
+ push +
+ git remote add origin git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} +
+
+ +
+ clone +
+ +
+ HTTP +
+ git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }} +
+
+ +
+ SSH +
+ git clone git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} +
+
+
+
+ + +

Note that for self-hosted knots, clone URLs may be different based on your setup.

+
+{{ end }} diff --git a/appview/pages/templates/repo/empty.html b/appview/pages/templates/repo/empty.html index 13b857ae..3d2be28b 100644 --- a/appview/pages/templates/repo/empty.html +++ b/appview/pages/templates/repo/empty.html @@ -9,24 +9,5 @@ {{ end }} {{ define "repoAfter" }} -
- push -
- git remote add origin git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} -
- clone - - -
-
- HTTP - git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }} -
-
- SSHgit clone git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} -
-
-

Note that for self-hosted knots, clone URLs may be different based on your setup.

-
- + {{ template "fragments/cloneInstructions" . }} {{ end }} diff --git a/appview/pages/templates/repo/index.html b/appview/pages/templates/repo/index.html index 50985860..ae84e194 100644 --- a/appview/pages/templates/repo/index.html +++ b/appview/pages/templates/repo/index.html @@ -207,36 +207,5 @@ {{- end -}} - -
-
- push -
- git remote add origin git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} -
-
- -
- clone -
- -
- HTTP -
- git clone https://tangled.sh/{{ .RepoInfo.OwnerWithAt }}/{{ .RepoInfo.Name }} -
-
- -
- SSH -
- git clone git@{{.RepoInfo.Knot}}:{{ .RepoInfo.OwnerHandle }}/{{ .RepoInfo.Name }} -
-
-
-
- - -

Note that for self-hosted knots, clone URLs may be different based on your setup.

-
+ {{ template "fragments/cloneInstructions" . }} {{ end }} -- 2.51.2