text-browser improvements
for links, lynx, w3m, dil[dl]o etc: - set oldschool align attribute. - apply bold markup to table header.
1 files changed, 18 insertions(+), 12 deletions(-) | |||
---|---|---|---|
M | stagit.c | +18 | -12 |
1@@ -556,11 +556,11 @@ writelogline(FILE *fp, struct commitinfo *ci)
2 fputs("</td><td>", fp);
3 if (ci->author)
4 xmlencode(fp, ci->author->name, strlen(ci->author->name));
5- fputs("</td><td class=\"num\">", fp);
6+ fputs("</td><td class=\"num\" align=\"right\">", fp);
7 fprintf(fp, "%zu", ci->filecount);
8- fputs("</td><td class=\"num\">", fp);
9+ fputs("</td><td class=\"num\" align=\"right\">", fp);
10 fprintf(fp, "+%zu", ci->addcount);
11- fputs("</td><td class=\"num\">", fp);
12+ fputs("</td><td class=\"num\" align=\"right\">", fp);
13 fprintf(fp, "-%zu", ci->delcount);
14 fputs("</td></tr>\n", fp);
15 }
16@@ -835,7 +835,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
17 fputs(filemode(git_tree_entry_filemode(entry)), fp);
18 fprintf(fp, "</td><td><a href=\"%s%s\">", relpath, filepath);
19 xmlencode(fp, entrypath, strlen(entrypath));
20- fputs("</a></td><td class=\"num\">", fp);
21+ fputs("</a></td><td class=\"num\" align=\"right\">", fp);
22 if (showlinecount && lc > 0)
23 fprintf(fp, "%dL", lc);
24 else
25@@ -847,7 +847,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
26 relpath);
27 xmlencode(fp, entrypath, strlen(entrypath));
28 git_submodule_free(module);
29- fputs("</a></td><td class=\"num\"></td></tr>\n", fp);
30+ fputs("</a></td><td class=\"num\" align=\"right\"></td></tr>\n", fp);
31 }
32 }
33
34@@ -862,7 +862,8 @@ writefiles(FILE *fp, const git_oid *id)
35 int ret = -1;
36
37 fputs("<table id=\"files\"><thead>\n<tr>"
38- "<td>Mode</td><td>Name</td><td class=\"num\">Size</td>"
39+ "<td><b>Mode</b></td><td><b>Name</b></td>"
40+ "<td class=\"num\" align=\"right\"><b>Size</b></td>"
41 "</tr>\n</thead><tbody>\n", fp);
42
43 if (!git_commit_lookup(&commit, repo, id) &&
44@@ -946,9 +947,12 @@ writerefs(FILE *fp)
45
46 /* print header if it has an entry (first). */
47 if (++count == 1) {
48- fprintf(fp, "<h2>%s</h2><table id=\"%s\"><thead>\n<tr><td>Name</td>"
49- "<td>Last commit date</td><td>Author</td>\n</tr>\n</thead><tbody>\n",
50- titles[j], ids[j]);
51+ fprintf(fp, "<h2>%s</h2><table id=\"%s\">"
52+ "<thead>\n<tr><td><b>Name</b></td>"
53+ "<td><b>Last commit date</b></td>"
54+ "<td><b>Author</b></td>\n</tr>\n"
55+ "</thead><tbody>\n",
56+ titles[j], ids[j]);
57 }
58
59 relpath = "";
60@@ -1102,9 +1106,11 @@ main(int argc, char *argv[])
61 relpath = "";
62 mkdir("commit", 0755);
63 writeheader(fp, "Log");
64- fputs("<table id=\"log\"><thead>\n<tr><td>Date</td><td>Commit message</td>"
65- "<td>Author</td><td class=\"num\">Files</td><td class=\"num\">+</td>"
66- "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
67+ fputs("<table id=\"log\"><thead>\n<tr><td><b>Date</b></td>"
68+ "<td><b>Commit message</b></td>"
69+ "<td><b>Author</b></td><td class=\"num\" align=\"right\"><b>Files</b></td>"
70+ "<td class=\"num\" align=\"right\"><b>+</b></td>"
71+ "<td class=\"num\" align=\"right\"><b>-</b></td></tr>\n</thead><tbody>\n", fp);
72
73 if (cachefile) {
74 /* read from cache file (does not need to exist) */