summaryrefslogtreecommitdiffabout
path: root/ui-shared.c
Side-by-side diff
Diffstat (limited to 'ui-shared.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-shared.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c
index 3e13c86..ece041c 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -462,2 +462,3 @@ void cgit_print_pageheader(char *title, int show_search)
int header = 0;
+ char *url;
@@ -494,2 +495,18 @@ void cgit_print_pageheader(char *title, int show_search)
+ if (cgit_repo->clone_url || cgit_clone_prefix) {
+ html("<h1>clone</h1>\n");
+ if (cgit_repo->clone_url)
+ url = cgit_repo->clone_url;
+ else
+ url = fmt("%s%s", cgit_clone_prefix,
+ cgit_repo->url);
+ html("<a class='menu' href='");
+ html_attr(url);
+ html("' title='");
+ html_attr(url);
+ html("'>\n");
+ html_txt(strrpart(url, 20));
+ html("</a>\n");
+ }
+
html("<h1>branch</h1>\n");