all repos — cgit @ 81509a228c7428abeb56ecacb45ccd8dc8fc6209

a hyperfast web frontend for git written in c

css: highlight even table rows and skip empty rows

This is stolen from kernel.org css [0].

[0] https://git.kernel.org/cgit-korg-0.10.1.css
Christian Hesse mail@eworm.de
Wed, 06 Jul 2016 22:42:36 +0200
commit

81509a228c7428abeb56ecacb45ccd8dc8fc6209

parent

44f8c11c8d6edadedb9b83baf6f6a786c0bd8c30

3 files changed, 24 insertions(+), 3 deletions(-)

jump to
M cgit.csscgit.css

@@ -134,11 +134,31 @@ div#cgit table.list tr.logheader {

background: #eee; } +div#cgit table.list tr:nth-child(even) { + background: #f7f7f7; +} + +div#cgit table.list tr:nth-child(odd) { + background: white; +} + div#cgit table.list tr:hover { background: #eee; } +div#cgit table.list tr.nohover { + background: white; +} + div#cgit table.list tr.nohover:hover { + background: white; +} + +div#cgit table.list tr.nohover-highlight:hover:nth-child(even) { + background: #f7f7f7; +} + +div#cgit table.list tr.nohover-highlight:hover:nth-child(odd) { background: white; }
M ui-log.cui-log.c

@@ -263,8 +263,9 @@ "<span class='insertions'>+%d</span>", rem_lines, add_lines);

html("</td></tr>\n"); - if (revs->graph || ctx.qry.showmsg) { /* Print a second table row */ - html("<tr class='nohover'>"); + if ((revs->graph && !graph_is_commit_finished(revs->graph)) + || ctx.qry.showmsg) { /* Print a second table row */ + html("<tr class='nohover-highlight'>"); if (ctx.qry.showmsg) { /* Concatenate commit message + notes in msgbuf */
M ui-repolist.cui-repolist.c

@@ -321,7 +321,7 @@ ((last_section == NULL && section != NULL) ||

(last_section != NULL && section == NULL) || (last_section != NULL && section != NULL && strcmp(section, last_section)))) { - htmlf("<tr class='nohover'><td colspan='%d' class='reposection'>", + htmlf("<tr class='nohover-highlight'><td colspan='%d' class='reposection'>", columns); html_txt(section); html("</td></tr>");