diff options
author | Lars Hjemli <hjemli@gmail.com> | 2009-12-08 19:32:48 +0100 |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-12-08 19:32:48 +0100 |
commit | f4f6210b4f9c214dc247567bbd06b1135c9ecd06 (patch) | |
tree | 432b3dc327e05220c6ac0aff9ca81cf38a47524c /cgit.c | |
parent | 57bb4fdb8419d7c250d4c6146910df3263943951 (diff) | |
parent | 735e15e38a484bf0daa98776fa7cde270a271cda (diff) | |
download | cgit-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.tar.gz cgit-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.tar.bz2 cgit-f4f6210b4f9c214dc247567bbd06b1135c9ecd06.zip |
Merge branch 'ro/ssdiff'
Diffstat (limited to '')
-rw-r--r-- | cgit.c | 5 | ||||
-rw-r--r-- | cgit.css | 99 |
2 files changed, 104 insertions, 0 deletions
@@ -184,6 +184,8 @@ void config_cb(const char *name, const char *value) ctx.cfg.summary_branches = atoi(value); else if (!strcmp(name, "summary-tags")) ctx.cfg.summary_tags = atoi(value); + else if (!strcmp(name, "side-by-side-diffs")) + ctx.cfg.ssdiff = atoi(value); else if (!strcmp(name, "agefile")) ctx.cfg.agefile = xstrdup(value); else if (!strcmp(name, "renamelimit")) @@ -242,6 +244,8 @@ static void querystring_cb(const char *name, const char *value) ctx.qry.showmsg = atoi(value); } else if (!strcmp(name, "period")) { ctx.qry.period = xstrdup(value); + } else if (!strcmp(name, "ss")) { + ctx.qry.ssdiff = atoi(value); } } @@ -284,6 +288,7 @@ static void prepare_context(struct cgit_context *ctx) ctx->cfg.summary_branches = 10; ctx->cfg.summary_log = 10; ctx->cfg.summary_tags = 10; + ctx->cfg.ssdiff = 0; ctx->env.cgit_config = xstrdupn(getenv("CGIT_CONFIG")); ctx->env.http_host = xstrdupn(getenv("HTTP_HOST")); ctx->env.https = xstrdupn(getenv("HTTPS")); @@ -606,3 +606,102 @@ table.hgraph div.bar { background-color: #eee; height: 1em; } + +table.ssdiff { + width: 100%; +} + +table.ssdiff td { + font-size: 75%; + font-family: monospace; + white-space: pre; + padding: 1px 4px 1px 4px; + border-left: solid 1px #aaa; + border-right: solid 1px #aaa; +} + +table.ssdiff td.add { + color: black; + background: #cfc; + min-width: 50%; +} + +table.ssdiff td.add_dark { + color: black; + background: #aca; + min-width: 50%; +} + +table.ssdiff span.add { + background: #cfc; + font-weight: bold; +} + +table.ssdiff td.del { + color: black; + background: #fcc; + min-width: 50%; +} + +table.ssdiff td.del_dark { + color: black; + background: #caa; + min-width: 50%; +} + +table.ssdiff span.del { + background: #fcc; + font-weight: bold; +} + +table.ssdiff td.changed { + color: black; + background: #ffc; + min-width: 50%; +} + +table.ssdiff td.changed_dark { + color: black; + background: #cca; + min-width: 50%; +} + +table.ssdiff td.lineno { + color: black; + background: #eee; + text-align: right; + width: 3em; + min-width: 3em; +} + +table.ssdiff td.hunk { + color: #black; + background: #ccf; + border-top: solid 1px #aaa; + border-bottom: solid 1px #aaa; +} + +table.ssdiff td.head { + border-top: solid 1px #aaa; + border-bottom: solid 1px #aaa; +} + +table.ssdiff td.head div.head { + font-weight: bold; + color: black; +} + +table.ssdiff td.foot { + border-top: solid 1px #aaa; + border-left: none; + border-right: none; + border-bottom: none; +} + +table.ssdiff td.space { + border: none; +} + +table.ssdiff td.space div { + min-height: 3em; +}
\ No newline at end of file |