Introduction
Introduction Statistics Contact Development Disclaimer Help
ttext-browser improvements - stagit - static git page generator
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 980fa8ea9bce704c9e44cfea47860e82cffec161
parent dc49505153f1a52bf12adee39aa63bda2bafefe4
Author: Hiltjo Posthuma <[email protected]>
Date: Sun, 16 Apr 2017 20:36:17 +0200
ttext-browser improvements
for links, lynx, w3m, dil[dl]o etc:
- set oldschool align attribute.
- apply bold markup to table header.
Diffstat:
M stagit.c | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -556,11 +556,11 @@ writelogline(FILE *fp, struct commitinfo *ci)
fputs("</td><td>", fp);
if (ci->author)
xmlencode(fp, ci->author->name, strlen(ci->author->name));
- fputs("</td><td class=\"num\">", fp);
+ fputs("</td><td class=\"num\" align=\"right\">", fp);
fprintf(fp, "%zu", ci->filecount);
- fputs("</td><td class=\"num\">", fp);
+ fputs("</td><td class=\"num\" align=\"right\">", fp);
fprintf(fp, "+%zu", ci->addcount);
- fputs("</td><td class=\"num\">", fp);
+ fputs("</td><td class=\"num\" align=\"right\">", fp);
fprintf(fp, "-%zu", ci->delcount);
fputs("</td></tr>\n", fp);
}
t@@ -835,7 +835,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
fputs(filemode(git_tree_entry_filemode(entry)), fp);
fprintf(fp, "</td><td><a href=\"%s%s\">", relpath, fil…
xmlencode(fp, entrypath, strlen(entrypath));
- fputs("</a></td><td class=\"num\">", fp);
+ fputs("</a></td><td class=\"num\" align=\"right\">", f…
if (showlinecount && lc > 0)
fprintf(fp, "%dL", lc);
else
t@@ -847,7 +847,7 @@ writefilestree(FILE *fp, git_tree *tree, const char *path)
relpath);
xmlencode(fp, entrypath, strlen(entrypath));
git_submodule_free(module);
- fputs("</a></td><td class=\"num\"></td></tr>\n", fp);
+ fputs("</a></td><td class=\"num\" align=\"right\"></td…
}
}
t@@ -862,7 +862,8 @@ writefiles(FILE *fp, const git_oid *id)
int ret = -1;
fputs("<table id=\"files\"><thead>\n<tr>"
- "<td>Mode</td><td>Name</td><td class=\"num\">Size</td>"
+ "<td><b>Mode</b></td><td><b>Name</b></td>"
+ "<td class=\"num\" align=\"right\"><b>Size</b></td>"
"</tr>\n</thead><tbody>\n", fp);
if (!git_commit_lookup(&commit, repo, id) &&
t@@ -946,9 +947,12 @@ writerefs(FILE *fp)
/* print header if it has an entry (first). */
if (++count == 1) {
- fprintf(fp, "<h2>%s</h2><table id=\"%s\"><thea…
- "<td>Last commit date</td><td>Author</td…
- titles[j], ids[j]);
+ fprintf(fp, "<h2>%s</h2><table id=\"%s\">"
+ "<thead>\n<tr><td><b>Name</b></td>"
+ "<td><b>Last commit date</b></td>"
+ "<td><b>Author</b></td>\n</tr>\n"
+ "</thead><tbody>\n",
+ titles[j], ids[j]);
}
relpath = "";
t@@ -1102,9 +1106,11 @@ main(int argc, char *argv[])
relpath = "";
mkdir("commit", 0755);
writeheader(fp, "Log");
- fputs("<table id=\"log\"><thead>\n<tr><td>Date</td><td>Commit message<…
- "<td>Author</td><td class=\"num\">Files</td><td class=\"num\…
- "<td class=\"num\">-</td></tr>\n</thead><tbody>\n", fp);
+ fputs("<table id=\"log\"><thead>\n<tr><td><b>Date</b></td>"
+ "<td><b>Commit message</b></td>"
+ "<td><b>Author</b></td><td class=\"num\" align=\"right\"><b>File…
+ "<td class=\"num\" align=\"right\"><b>+</b></td>"
+ "<td class=\"num\" align=\"right\"><b>-</b></td></tr>\n</thead><…
if (cachefile) {
/* read from cache file (does not need to exist) */
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.