mirror of
https://git.zx2c4.com/cgit
synced 2024-11-23 17:08:41 +00:00
ui-tree.c: cleanup printing of blobs in tree view
Signed-off-by: Lars Hjemli <larsh@hjemli.net>
This commit is contained in:
parent
fdfb6a6d80
commit
8a53f9dd6d
12
cgit.css
12
cgit.css
@ -270,8 +270,7 @@ div#cgit td.ls-mode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div#cgit table.blob {
|
div#cgit table.blob {
|
||||||
margin-top: 0.5em;
|
margin-top: 0px;
|
||||||
border-top: solid 1px black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div#cgit table.blob td.lines {
|
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;
|
margin: 0; padding: 0 0.5em 0 0.5em;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
border-right: 1px solid gray;
|
color: #eee;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#cgit table.blob pre {
|
div#cgit table.blob pre {
|
||||||
@ -302,21 +301,20 @@ div#cgit table.blob a.no a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
div#cgit table.bin-blob {
|
div#cgit table.bin-blob {
|
||||||
margin-top: 0.5em;
|
border: solid 1px #ccc;
|
||||||
border: solid 1px black;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
div#cgit table.bin-blob th {
|
div#cgit table.bin-blob th {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
border: solid 1px #777;
|
border: solid 1px #ccc;
|
||||||
padding: 0.5em 1em;
|
padding: 0.5em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div#cgit table.bin-blob td {
|
div#cgit table.bin-blob td {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
border-left: solid 1px #777;
|
border-left: solid 1px #ccc;
|
||||||
padding: 0em 1em;
|
padding: 0em 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -939,6 +939,13 @@ void cgit_print_pageheader(struct cgit_context *ctx)
|
|||||||
html("<div class='path'>");
|
html("<div class='path'>");
|
||||||
html("path: ");
|
html("path: ");
|
||||||
cgit_print_path_crumbs(ctx, ctx->qry.vpath);
|
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>");
|
||||||
}
|
}
|
||||||
html("<div class='content'>");
|
html("<div class='content'>");
|
||||||
|
@ -104,11 +104,6 @@ static void print_object(const unsigned char *sha1, char *path, const char *base
|
|||||||
return;
|
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) {
|
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>",
|
htmlf("<div class='error'>blob size (%ldKB) exceeds display size limit (%dKB).</div>",
|
||||||
size / 1024, ctx.cfg.max_blob_size);
|
size / 1024, ctx.cfg.max_blob_size);
|
||||||
|
Loading…
Reference in New Issue
Block a user