2022-02-27 10:09:48 (UTC-03:00)
Marcel Rodrigues <marcelgmr@gmail.com>
more colors in diffs
diff --git a/app.lua b/app.lua index ec39964..9edb269 100644 --- a/app.lua +++ b/app.lua @@ -34,11 +34,11 @@ local function diff_cb(line_type, line) elseif line_type == "-" then line = '-<span class="diff_del">' .. line .. '</span>' elseif line_type == "=" then - line = ' <span class="diff_ctx_nonl">' .. line .. '</span>' + line = ' <span class="diff_nonl diff_ctx_nonl">' .. line .. '</span>' elseif line_type == ">" then - line = ' <span class="diff_old_nonl">' .. line .. '</span>' + line = ' <span class="diff_nonl diff_old_nonl">' .. line .. '</span>' elseif line_type == "<" then - line = ' <span class="diff_new_nonl">' .. line .. '</span>' + line = ' <span class="diff_nonl diff_new_nonl">' .. line .. '</span>' elseif line_type == "F" then line = '\n<span class="diff_file_hdr">' .. line .. '</span>' elseif line_type == "H" then diff --git a/view/commit.html b/view/commit.html index 9cdf66d..7921631 100644 --- a/view/commit.html +++ b/view/commit.html @@ -5,9 +5,11 @@ <title>cogit - {{$gname}} - {{$rname}} - {{$cid}}</title> <style> .diff_file_hdr { font-weight: bold; } - .diff_hunk_hdr { font-weight: bold; color: blue;} + .diff_hunk_hdr { font-weight: bold; color: blue; } .diff_add { color: green; } .diff_del { color: red; } + .diff_bin { color: purple; } + .diff_nonl { color: purple; } </style> </head> <body>