commit c3bcdfd5079e63b840d5dc9ee58515a3144502a5 from: Tracey Emery date: Wed Jan 29 15:10:47 2020 UTC alternate color of tree lines to prepare for blob/blame conversion commit - 4bec75396a2266383964555b169c36d7beb339ff commit + c3bcdfd5079e63b840d5dc9ee58515a3144502a5 blob - 904494067b5f5c6bdff5f638a4c883259989e2e2 blob + 146401086ad20321034b022c7c92af5563e98331 --- gotweb/files/htdocs/gotweb/gotweb.css +++ gotweb/files/htdocs/gotweb/gotweb.css @@ -48,6 +48,13 @@ body { } .diff_directory { color: blue; +} + +.back_white { + background-color: #ffffff; +} +.back_lightgray { + background-color: #d8f3ef; } #dotted_line { @@ -631,7 +638,8 @@ body { } #tree_line { clear: left; - float:left ; + float: left; + width: 20em; } /* tag.tmpl */ blob - 8f338a00535faf44919cedec286b595dfee1a46d blob + 6c89bc761dfa6a56a8b3d2a63f102d06e125c8af --- gotweb/gotweb.c +++ gotweb/gotweb.c @@ -2456,8 +2456,8 @@ gw_get_repo_tree(struct gw_trans *gw_trans) struct buf *diffbuf = NULL; size_t newsize; char *tree_html = NULL, *path = NULL, *in_repo_path = NULL, - *tree_row = NULL, *id_str; - int nentries, i; + *tree_row = NULL, *id_str, *class = NULL; + int nentries, i, class_flip = 0; error = buf_alloc(&diffbuf, 0); if (error) @@ -2534,6 +2534,14 @@ gw_get_repo_tree(struct gw_trans *gw_trans) modestr = "/"; else if (mode & S_IXUSR) modestr = "*"; + + if (class_flip == 0) { + class = strdup("back_lightgray"); + class_flip = 1; + } else { + class = strdup("back_white"); + class_flip = 0; + } char *build_folder = NULL; if (S_ISDIR(got_tree_entry_get_mode(te))) { @@ -2582,7 +2590,7 @@ gw_get_repo_tree(struct gw_trans *gw_trans) if (error) goto done; - if (asprintf(&tree_row, tree_line, url_html) == -1) { + if ((asprintf(&tree_row, tree_line, class, url_html)) == -1) { error = got_error_from_errno("asprintf"); goto done; } blob - cd26c41f83e9dce1d5ef3944e847611d36f909e3 blob + 683c22af5b6a77f2b21948233534ad7ab911b4d3 --- gotweb/gotweb_ui.h +++ gotweb/gotweb_ui.h @@ -249,7 +249,7 @@ char *tree_header = char *tree_line = "
" \ - "
%s
" \ + "
%s
" \ "
"; /* tag.tmpl */