From ab67164d6217fcda5ef3e07aefa3dd6eee6b65a3 Mon Sep 17 00:00:00 2001 From: Lars Hjemli Date: Sat, 29 Nov 2008 18:11:26 +0000 Subject: ui-log: use css to make full-log prettier Signed-off-by: Lars Hjemli --- diff --git a/cgit.css b/cgit.css index a37d218..7928c2f 100644 --- a/cgit.css +++ b/cgit.css @@ -120,6 +120,10 @@ table.list tr { background: white; } +table.list tr.logheader { + background: #eee; +} + table.list tr:hover { background: #eee; } @@ -143,6 +147,17 @@ table.list td { padding: 0.1em 0.5em 0.1em 0.5em; } +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; } diff --git a/ui-log.c b/ui-log.c index adc9a66..00ecd4e 100644 --- a/ui-log.c +++ b/ui-log.c @@ -38,19 +38,17 @@ void print_commit(struct commit *commit) int cols = 2; info = cgit_parse_commit(commit); - html(""); + htmlf("", + ctx.qry.showmsg ? " class='logheader'" : ""); tmp = fmt("id=%s", sha1_to_hex(commit->object.sha1)); tmp = cgit_pageurl(ctx.repo->url, "commit", tmp); html_link_open(tmp, NULL, NULL); cgit_print_age(commit->date, TM_WEEK * 2, FMT_SHORTDATE); html_link_close(); - html(""); - if (ctx.qry.showmsg) - html(""); + htmlf("", + 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(""); html(""); html_txt(info->author); if (ctx.repo->enable_log_filecount) { @@ -72,10 +70,10 @@ void print_commit(struct commit *commit) if (ctx.repo->enable_log_linecount) cols++; } - htmlf("
", + htmlf("", cols); html_txt(info->msg); - html("

\n"); + html("\n"); } cgit_free_commitinfo(info); } -- cgit v0.9.0.2