|
diff --git a/cgit.css b/cgit.css index a37d218..7928c2f 100644 --- a/ cgit.css+++ b/ cgit.css |
|
@@ -111,47 +111,62 @@ div.content { |
111 | |
111 | |
112 | |
112 | |
113 | table.list { |
113 | table.list { |
114 | width: 100%; |
114 | width: 100%; |
115 | border: none; |
115 | border: none; |
116 | border-collapse: collapse; |
116 | border-collapse: collapse; |
117 | } |
117 | } |
118 | |
118 | |
119 | table.list tr { |
119 | table.list tr { |
120 | background: white; |
120 | background: white; |
121 | } |
121 | } |
122 | |
122 | |
| |
123 | table.list tr.logheader { |
| |
124 | background: #eee; |
| |
125 | } |
| |
126 | |
123 | table.list tr:hover { |
127 | table.list tr:hover { |
124 | background: #eee; |
128 | background: #eee; |
125 | } |
129 | } |
126 | |
130 | |
127 | table.list tr.nohover:hover { |
131 | table.list tr.nohover:hover { |
128 | background: white; |
132 | background: white; |
129 | } |
133 | } |
130 | |
134 | |
131 | table.list th { |
135 | table.list th { |
132 | font-weight: bold; |
136 | font-weight: bold; |
133 | /* color: #888; |
137 | /* color: #888; |
134 | border-top: dashed 1px #888; |
138 | border-top: dashed 1px #888; |
135 | border-bottom: dashed 1px #888; |
139 | border-bottom: dashed 1px #888; |
136 | */ |
140 | */ |
137 | padding: 0.1em 0.5em 0.05em 0.5em; |
141 | padding: 0.1em 0.5em 0.05em 0.5em; |
138 | vertical-align: baseline; |
142 | vertical-align: baseline; |
139 | } |
143 | } |
140 | |
144 | |
141 | table.list td { |
145 | table.list td { |
142 | border: none; |
146 | border: none; |
143 | padding: 0.1em 0.5em 0.1em 0.5em; |
147 | padding: 0.1em 0.5em 0.1em 0.5em; |
144 | } |
148 | } |
145 | |
149 | |
| |
150 | table.list td.logsubject { |
| |
151 | font-family: monospace; |
| |
152 | font-weight: bold; |
| |
153 | } |
| |
154 | |
| |
155 | table.list td.logmsg { |
| |
156 | font-family: monospace; |
| |
157 | white-space: pre; |
| |
158 | padding: 1em 0em 2em 0em; |
| |
159 | } |
| |
160 | |
146 | table.list td a { |
161 | table.list td a { |
147 | color: black; |
162 | color: black; |
148 | } |
163 | } |
149 | |
164 | |
150 | table.list td a:hover { |
165 | table.list td a:hover { |
151 | color: #00f; |
166 | color: #00f; |
152 | } |
167 | } |
153 | |
168 | |
154 | img { |
169 | img { |
155 | border: none; |
170 | border: none; |
156 | } |
171 | } |
157 | |
172 | |
|
|
diff --git a/ui-log.c b/ui-log.c index adc9a66..00ecd4e 100644 --- a/ ui-log.c+++ b/ ui-log.c |
|
@@ -29,62 +29,60 @@ void inspect_files(struct diff_filepair *pair) |
29 | files++; |
29 | files++; |
30 | if (ctx.repo->enable_log_linecount) |
30 | if (ctx.repo->enable_log_linecount) |
31 | cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); |
31 | cgit_diff_files(pair->one->sha1, pair->two->sha1, count_lines); |
32 | } |
32 | } |
33 | |
33 | |
34 | void print_commit(struct commit *commit) |
34 | void print_commit(struct commit *commit) |
35 | { |
35 | { |
36 | struct commitinfo *info; |
36 | struct commitinfo *info; |
37 | char *tmp; |
37 | char *tmp; |
38 | int cols = 2; |
38 | int cols = 2; |
39 | |
39 | |
40 | info = cgit_parse_commit(commit); |
40 | info = cgit_parse_commit(commit); |
41 | html("<tr><td>"); |
41 | htmlf("<tr%s><td>", |
| |
42 | ctx.qry.showmsg ? " class='logheader'" : ""); |
42 | tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1)); |
43 | tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1)); |
43 | tmp = cgit_pageurl(ctx.repo->url, "commit", tmp); |
44 | tmp = cgit_pageurl(ctx.repo->url, "commit", tmp); |
44 | html_link_open(tmp, NULL, NULL); |
45 | html_link_open(tmp, NULL, NULL); |
45 | cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); |
46 | cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); |
46 | html_link_close(); |
47 | html_link_close(); |
47 | html("</td><td>"); |
48 | htmlf("</td><td%s>", |
48 | if (ctx.qry.showmsg) |
49 | ctx.qry.showmsg ? " class='logsubject'" : ""); |
49 | html("<u>"); |
| |
50 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
50 | cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, |
51 | sha1_to_hex(commit->object.sha1)); |
51 | sha1_to_hex(commit->object.sha1)); |
52 | if (ctx.qry.showmsg) |
| |
53 | html("</u>"); |
| |
54 | html("</td><td>"); |
52 | html("</td><td>"); |
55 | html_txt(info->author); |
53 | html_txt(info->author); |
56 | if (ctx.repo->enable_log_filecount) { |
54 | if (ctx.repo->enable_log_filecount) { |
57 | files = 0; |
55 | files = 0; |
58 | add_lines = 0; |
56 | add_lines = 0; |
59 | rem_lines = 0; |
57 | rem_lines = 0; |
60 | cgit_diff_commit(commit, inspect_files); |
58 | cgit_diff_commit(commit, inspect_files); |
61 | html("</td><td>"); |
59 | html("</td><td>"); |
62 | htmlf("%d", files); |
60 | htmlf("%d", files); |
63 | if (ctx.repo->enable_log_linecount) { |
61 | if (ctx.repo->enable_log_linecount) { |
64 | html("</td><td>"); |
62 | html("</td><td>"); |
65 | htmlf("-%d/+%d", rem_lines, add_lines); |
63 | htmlf("-%d/+%d", rem_lines, add_lines); |
66 | } |
64 | } |
67 | } |
65 | } |
68 | html("</td></tr>\n"); |
66 | html("</td></tr>\n"); |
69 | if (ctx.qry.showmsg) { |
67 | if (ctx.qry.showmsg) { |
70 | if (ctx.repo->enable_log_filecount) { |
68 | if (ctx.repo->enable_log_filecount) { |
71 | cols++; |
69 | cols++; |
72 | if (ctx.repo->enable_log_linecount) |
70 | if (ctx.repo->enable_log_linecount) |
73 | cols++; |
71 | cols++; |
74 | } |
72 | } |
75 | htmlf("<tr class='nohover'><td></td><td colspan='%d'><div class='commit-msg'>", |
73 | htmlf("<tr class='nohover'><td/><td colspan='%d' class='logmsg'>", |
76 | cols); |
74 | cols); |
77 | html_txt(info->msg); |
75 | html_txt(info->msg); |
78 | html("</div><br/></td></tr>\n"); |
76 | html("</td></tr>\n"); |
79 | } |
77 | } |
80 | cgit_free_commitinfo(info); |
78 | cgit_free_commitinfo(info); |
81 | } |
79 | } |
82 | |
80 | |
83 | |
81 | |
84 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, |
82 | void cgit_print_log(const char *tip, int ofs, int cnt, char *grep, char *pattern, |
85 | char *path, int pager) |
83 | char *path, int pager) |
86 | { |
84 | { |
87 | struct rev_info rev; |
85 | struct rev_info rev; |
88 | struct commit *commit; |
86 | struct commit *commit; |
89 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
87 | const char *argv[] = {NULL, tip, NULL, NULL, NULL}; |
90 | int argc = 2; |
88 | int argc = 2; |
|