diff --git a/style.css b/style.css index 701e8ad..8fcf30c 100644 --- a/style.css +++ b/style.css @@ -21,6 +21,15 @@ a:hover { text-decoration: underline; } +#blob a { + color: #777; +} + +#blob a:hover { + color: blue; + text-decoration: none; +} + table thead td { font-weight: bold; } @@ -29,10 +38,14 @@ table td { padding: 0 0.4em; } -#content table tr:hover td { +#log tr:hover td, #files tr:hover td { background-color: #eee; } +td.num { + text-align: right; +} + .desc { color: #777; } diff --git a/urmoms.c b/urmoms.c index d4b3b9f..0b0cbe6 100644 --- a/urmoms.c +++ b/urmoms.c @@ -241,7 +241,28 @@ printtimeshort(FILE *fp, const git_time *intime) void writeblobhtml(FILE *fp, const git_blob *blob) { - xmlencode(fp, git_blob_rawcontent(blob), (size_t)git_blob_rawsize(blob)); + off_t i = 0; + size_t n = 1; + char *nfmt = "%d\n"; + const char *s = git_blob_rawcontent(blob); + git_off_t len = git_blob_rawsize(blob); + + fputs("
\n", fp); + + if (len) { + fprintf(fp, nfmt, n, n, n); + while (i < len - 1) { + if (s[i] == '\n') { + n++; + fprintf(fp, nfmt, n, n, n); + } + i++; + } + } + + fputs(" | \n", fp); + xmlencode(fp, s, (size_t)len); + fputs(" |
Age | Commit message | Author | " + fputs("
Age | Commit message | Author | " "Files | + | - |
Mode | Name | Size |