]> granicus.if.org Git - cgit/commitdiff
ui-tree.c: cleanup printing of blobs in tree view lh/pretty-blob-view
authorLars Hjemli <hjemli@gmail.com>
Tue, 20 Mar 2012 08:13:01 +0000 (08:13 +0000)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 16 Oct 2012 21:57:00 +0000 (23:57 +0200)
Signed-off-by: Lars Hjemli <larsh@hjemli.net>
cgit.css
ui-shared.c
ui-tree.c

index 54da076617aed6964d24b83e0f6ed1fcaea2e64f..ef1b536835dc9900aa6de705f295a617c7c83464 100644 (file)
--- a/cgit.css
+++ b/cgit.css
@@ -270,8 +270,7 @@ div#cgit td.ls-mode {
 }
 
 div#cgit table.blob {
-       margin-top: 0.5em;
-       border-top: solid 1px black;
+       margin-top: 0px;
 }
 
 div#cgit table.blob td.lines {
@@ -284,7 +283,7 @@ div#cgit table.blob td.linenumbers {
        margin: 0; padding: 0 0.5em 0 0.5em;
        vertical-align: top;
        text-align: right;
-       border-right: 1px solid gray;
+       color: #eee;
 }
 
 div#cgit table.blob pre {
@@ -302,21 +301,20 @@ div#cgit table.blob a.no a:hover {
 }
 
 div#cgit table.bin-blob {
-       margin-top: 0.5em;
-       border: solid 1px black;
+       border: solid 1px #ccc;
 }
 
 div#cgit table.bin-blob th {
        font-family: monospace;
        white-space: pre;
-       border: solid 1px #777;
+       border: solid 1px #ccc;
        padding: 0.5em 1em;
 }
 
 div#cgit table.bin-blob td {
        font-family: monospace;
        white-space: pre;
-       border-left: solid 1px #777;
+       border-left: solid 1px #ccc;
        padding: 0em 1em;
 }
 
index 43166af4d568125306ff3f88d2f6f97c54d2405e..d2ffc5b80dc30cedf3406c3baba2f119f38c6dc9 100644 (file)
@@ -939,6 +939,13 @@ void cgit_print_pageheader(struct cgit_context *ctx)
                html("<div class='path'>");
                html("path: ");
                cgit_print_path_crumbs(ctx, ctx->qry.vpath);
+               if (!strcmp(ctx->qry.page, "tree")) {
+                       html(" (");
+                       cgit_plain_link("plain", NULL, NULL, ctx->qry.head,
+                                       ctx->qry.has_sha1 ? ctx->qry.sha1 : NULL,
+                                       ctx->qry.vpath);
+                       html(")");
+               }
                html("</div>");
        }
        html("<div class='content'>");
index b1adcc7b21e5044f489f751c21852400a329f322..dd98701c671c3a89a8fc36f5e796b262c5e1b356 100644 (file)
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -104,11 +104,6 @@ static void print_object(const unsigned char *sha1, char *path, const char *base
                return;
        }
 
-       htmlf("blob: %s (", sha1_to_hex(sha1));
-       cgit_plain_link("plain", NULL, NULL, ctx.qry.head,
-                       curr_rev, path);
-       html(")\n");
-
        if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) {
                htmlf("<div class='error'>blob size (%ldKB) exceeds display size limit (%dKB).</div>",
                                size / 1024, ctx.cfg.max_blob_size);