diff --git a/static/css/clif.css b/static/css/clif.css index f104018..5c82909 100644 --- a/static/css/clif.css +++ b/static/css/clif.css @@ -326,10 +326,73 @@ div.commit { } div.commit .message { - margin: 2rem 0; white-space: pre-wrap; } + div.commit details.diffstat { + } + + div.commit details.diffstat table { + width: 100%; + } + + div.commit details.diffstat table .filemode { + font-family: monospace; + font-size: 1rem; + white-space: nowrap; + width: 0; + } + + div.commit details.diffstat table .path { + font-family: monospace; + font-size: 1rem; + padding: 0 1rem; + white-space: nowrap; + width: 0; + } + + div.commit details.diffstat table .lines { + font-family: monospace; + font-size: 1rem; + text-align: right; + white-space: nowrap; + width:0; + } + + div.commit details.diffstat table .histogram { + max-width: 20%; + } + + div.commit details.diffstat table .histogram span { + display: inline-block; + height:1rem; + vertical-align: middle; + } + + div.commit details.diffstat table .histogram .insertions { + background: lightgreen; + } + + div.commit details.diffstat table .histogram .deletions { + background: red; + } + + div.commit details.diffstat .accumulated { + margin-top: .5rem; + } + + div.commit details.diffstat .accumulated .insertions { + color: darkgreen; + } + + div.commit details.diffstat .accumulated .deletions { + color: darkred; + } + + div.commit details.diff_options input[type=submit] { + margin-top: .5rem; + } + div.commit .diff { border: 1px solid #d4d4d4; border-collapse: collapse; @@ -349,6 +412,12 @@ div.commit { padding: .1rem .5rem; } + div.commit .diff .histogram { + border-bottom: .3rem solid; + display: inline-block; + vertical-align: middle; + } + div.commit .diff .header { background-color: #f0f9ff; color: darkblue; diff --git a/templates/repository/commit.html b/templates/repository/commit.html index f814f2d..e3de9bf 100644 --- a/templates/repository/commit.html +++ b/templates/repository/commit.html @@ -51,76 +51,99 @@ {% endfor %} -
{{ patch.delta.new_file.mode|filemode }} | +{{ patch.delta.new_file.path }} | +{{ patch.line_stats[1] + patch.line_stats[2] }} | ++ + | ++ |