From: Lars Hjemli Date: Tue, 27 Jan 2009 19:21:56 +0000 (+0100) Subject: Merge branch 'og/tree-view-selection' X-Git-Url: https://gitweb.ps.run/ps-cgit/commitdiff_plain/1fdde95a5a169ad2240460b1d3f25bae606527f5?ds=sidebyside;hp=-c Merge branch 'og/tree-view-selection' Signed-off-by: Lars Hjemli --- 1fdde95a5a169ad2240460b1d3f25bae606527f5 diff --combined cgit.css index e8214de,068c37b..f844efa --- a/cgit.css +++ b/cgit.css @@@ -236,26 -236,31 +236,31 @@@ table.blob border-top: solid 1px black; } - table.blob td.no { - border-right: solid 1px black; + table.blob td.lines { + margin: 0; padding: 0; + vertical-align: top; color: black; + } + + table.blob td.linenumbers { + margin: 0; padding: 0; + vertical-align: top; + border-right: 1px solid gray; background-color: #eee; - text-align: right; } - table.blob td.no a { - color: black; + table.blob pre { + padding: 0; margin: 0; } - table.blob td.no a:hover { - color: black; + table.blob a.no { + color: gray; + text-align: right; text-decoration: none; } - table.blob td.txt { - white-space: pre; - font-family: monospace; - padding-left: 0.5em; + table.blob a.no a:hover { + color: black; } table.nowrap td { @@@ -471,103 -476,3 +476,103 @@@ div.footer font-size: 80%; color: #ccc; } +a.branch-deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #88ff88; + border: solid 1px #007700; +} +a.tag-deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ffff88; + border: solid 1px #777700; +} +a.remote-deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ccccff; + border: solid 1px #000077; +} +a.deco { + margin: 0px 0.5em; + padding: 0px 0.25em; + background-color: #ff8888; + border: solid 1px #770000; +} +table.stats { + border: solid 1px black; + border-collapse: collapse; +} + +table.stats th { + text-align: left; + padding: 1px 0.5em; + background-color: #eee; + border: solid 1px black; +} + +table.stats td { + text-align: right; + padding: 1px 0.5em; + border: solid 1px black; +} + +table.stats td.total { + font-weight: bold; + text-align: left; +} + +table.stats td.sum { + color: #c00; + font-weight: bold; +/* background-color: #eee; */ +} + +table.stats td.left { + text-align: left; +} + +table.vgraph { + border-collapse: separate; + border: solid 1px black; + height: 200px; +} + +table.vgraph th { + background-color: #eee; + font-weight: bold; + border: solid 1px white; + padding: 1px 0.5em; +} + +table.vgraph td { + vertical-align: bottom; + padding: 0px 10px; +} + +table.vgraph div.bar { + background-color: #eee; +} + +table.hgraph { + border: solid 1px black; + width: 800px; +} + +table.hgraph th { + background-color: #eee; + font-weight: bold; + border: solid 1px black; + padding: 1px 0.5em; +} + +table.hgraph td { + vertical-align: center; + padding: 2px 2px; +} + +table.hgraph div.bar { + background-color: #eee; + height: 1em; +} diff --combined ui-tree.c index 4b8e7a0,2a8625c..c26ba4c --- a/ui-tree.c +++ b/ui-tree.c @@@ -18,8 -18,8 +18,8 @@@ static void print_object(const unsigne { enum object_type type; char *buf; - unsigned long size, lineno, start, idx; - const char *linefmt = "%1$d"; + unsigned long size, lineno, idx; + const char *numberfmt = "%1$d\n"; type = sha1_object_info(sha1, &size); if (type == OBJ_BAD) { @@@ -38,27 -38,28 +38,28 @@@ html(" ("); cgit_plain_link("plain", NULL, NULL, ctx.qry.head, curr_rev, path); - htmlf(")
blob: %s", sha1_to_hex(sha1)); + htmlf(")
blob: %s\n", sha1_to_hex(sha1)); html("\n"); + html("\n"); + + html("\n"); - start = idx + 1; + htmlf(numberfmt, ++lineno); } idx++; } - if (start < idx) { - htmlf(linefmt, ++lineno); - html_txt(buf + start); - } - html("\n"); + html("\n"); + + html("\n"); + + html("\n"); html("
");
  	idx = 0;
- 	start = 0;
  	lineno = 0;
- 	while(idx < size) {
+ 	htmlf(numberfmt, ++lineno);
+ 	while(idx < size - 1) { // skip absolute last newline
  		if (buf[idx] == '\n') {
- 			buf[idx] = '\0';
- 			htmlf(linefmt, ++lineno);
- 			html_txt(buf + start);
- 			html("
");
+ 	html_txt(buf);
+ 	html("
\n"); } @@@ -109,9 -110,6 +110,9 @@@ static int ls_item(const unsigned char html(""); cgit_log_link("log", NULL, "button", ctx.qry.head, curr_rev, fullpath, 0, NULL, NULL, ctx.qry.showmsg); + if (ctx.repo->max_stats) + cgit_stats_link("stats", NULL, "button", ctx.qry.head, + fullpath); html("\n"); free(name); return 0;