diff options
| author | 2008-11-30 03:11:26 (JST) | |
|---|---|---|
| committer | 2008-11-30 21:01:44 (JST) | |
| commit | ab67164d6217fcda5ef3e07aefa3dd6eee6b65a3 (patch) | |
| tree | 1c5430d46e9edf9306178967266c6e6373f06b31 | |
| parent | 951f550b60befeacd7334aebd64c891e72be5ac4 (diff) | |
| download | cgit-ab67164d6217fcda5ef3e07aefa3dd6eee6b65a3.zip cgit-ab67164d6217fcda5ef3e07aefa3dd6eee6b65a3.tar.gz | |
ui-log: use css to make full-log prettier
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
| -rw-r--r-- | cgit.css | 15 | ||||
| -rw-r--r-- | ui-log.c | 14 |
2 files changed, 21 insertions, 8 deletions
| @@ -120,6 +120,10 @@ 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 | } |
| @@ -143,6 +147,17 @@ table.list td { | |||
| 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 | } |
| @@ -38,19 +38,17 @@ void print_commit(struct commit *commit) | |||
| 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) { |
| @@ -72,10 +70,10 @@ void print_commit(struct commit *commit) | |||
| 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 | } |
