-rw-r--r-- | cgit.css | 15 | ||||
-rw-r--r-- | ui-log.c | 14 |
2 files changed, 21 insertions, 8 deletions
@@ -121,4 +121,8 @@ table.list tr { } +table.list tr.logheader { + background: #eee; +} + table.list tr:hover { background: #eee; @@ -144,4 +148,15 @@ table.list td { } +table.list td.logsubject { + font-family: monospace; + font-weight: bold; +} + +table.list td.logmsg { + font-family: monospace; + white-space: pre; + padding: 1em 0em 2em 0em; +} + table.list td a { color: black; @@ -39,5 +39,6 @@ void print_commit(struct commit *commit) info = cgit_parse_commit(commit); - html("<tr><td>"); + htmlf("<tr%s><td>", + ctx.qry.showmsg ? " class='logheader'" : ""); tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1)); tmp = cgit_pageurl(ctx.repo->url, "commit", tmp); @@ -45,11 +46,8 @@ void print_commit(struct commit *commit) cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); html_link_close(); - html("</td><td>"); - if (ctx.qry.showmsg) - html("<u>"); + htmlf("</td><td%s>", + ctx.qry.showmsg ? " class='logsubject'" : ""); cgit_commit_link(info->subject, NULL, NULL, ctx.qry.head, sha1_to_hex(commit->object.sha1)); - if (ctx.qry.showmsg) - html("</u>"); html("</td><td>"); html_txt(info->author); @@ -73,8 +71,8 @@ void print_commit(struct commit *commit) cols++; } - htmlf("<tr class='nohover'><td></td><td colspan='%d'><div class='commit-msg'>", + htmlf("<tr class='nohover'><td/><td colspan='%d' class='logmsg'>", cols); html_txt(info->msg); - html("</div><br/></td></tr>\n"); + html("</td></tr>\n"); } cgit_free_commitinfo(info); |