]> git.cameronkatri.com Git - cgit.git/commitdiff
ui-log: use css to make full-log prettier
authorLars Hjemli <hjemli@gmail.com>
Sat, 29 Nov 2008 18:11:26 +0000 (19:11 +0100)
committerLars Hjemli <hjemli@gmail.com>
Sun, 30 Nov 2008 12:01:44 +0000 (13:01 +0100)
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
cgit.css
ui-log.c

index a37d21816cdbe213e1efb6b084ecece66aa4f0f3..7928c2f4f86f0b597a3b992ff7815adca1d4bef0 100644 (file)
--- 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;
 }
index adc9a66a5ddc673b6e13171efa735fd2aa95614f..00ecd4e3e0c8d3200a716c77daacb00b4a62da2b 100644 (file)
--- 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("<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);
        html_link_open(tmp, NULL, NULL);
        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);
        if (ctx.repo->enable_log_filecount) {
@@ -72,10 +70,10 @@ void print_commit(struct commit *commit)
                        if (ctx.repo->enable_log_linecount)
                                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);
 }