stagit-responsive

My mobile friendly fork of stagit
Log | Files | Refs | README | LICENSE

commit 5099b4388220ef1605da407e3199e9b1d783517e
parent aaedd13bc9efbca4521b86fb911be2d692e23b31
Author: Yohanes Bandung <bandungpenting@gmail.com>
Date:   Sun, 17 May 2020 04:14:02 +0700

refactor: use <th> instead of <td><b>

Diffstat:
Mstagit-index.c | 4++--
Mstagit.c | 20++++++++++----------

2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c
@@ -79,8 +79,8 @@ writeheader(FILE *fp)
 	fputs("</span></td></tr><tr><td></td><td>\n"
 		"</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n"
 		"<div id=\"table-scroll\"><table id=\"index\"><thead>\n"
-		"<tr><td><b>Name</b></td><td><b>Description</b></td><td><b>Owner</b></td>"
-		"<td><b>Last commit</b></td></tr>"
+		"<tr><th>Name</th><th>Description</th><th>Owner</th>"
+		"<th>Last commit</th></tr>"
 		"</thead><tbody>\n", fp);
 }
 
diff --git a/stagit.c b/stagit.c
@@ -921,8 +921,8 @@ writefiles(FILE *fp, const git_oid *id)
 	int ret = -1;
 
 	fputs("<div id=\"table-scroll\"><table id=\"files\"><thead>\n<tr>"
-	      "<td><b>Mode</b></td><td><b>Name</b></td>"
-	      "<td class=\"num\" align=\"right\"><b>Size</b></td>"
+	      "<th>Mode</th><th>Name</th>"
+	      "<th class=\"num\" align=\"right\">Size</th>"
 	      "</tr>\n</thead><tbody>\n", fp);
 
 	if (!git_commit_lookup(&commit, repo, id) &&
@@ -1007,9 +1007,9 @@ writerefs(FILE *fp)
 			/* print header if it has an entry (first). */
 			if (++count == 1) {
 				fprintf(fp, "<h2>%s</h2><div id=\"table-scroll\"><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>\n<tr><th>Name</th>"
+				        "<th>Last commit date</th>"
+				        "<th>Author</th>\n</tr>\n"
 				        "</thead><tbody>\n",
 				         titles[j], ids[j]);
 			}
@@ -1189,11 +1189,11 @@ main(int argc, char *argv[])
 	relpath = "";
 	mkdir("commit", S_IRWXU | S_IRWXG | S_IRWXO);
 	writeheader(fp, "Log");
-	fputs("<div id=\"table-scroll\"><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>Files</b></td>"
-	      "<td class=\"num\" align=\"right\"><b>+</b></td>"
-	      "<td class=\"num\" align=\"right\"><b>-</b></td></tr>\n</thead><tbody>\n", fp);
+	fputs("<div id=\"table-scroll\"><table id=\"log\"><thead>\n<tr><th>Date</th>"
+	      "<th>Commit message</th>"
+	      "<th>Author</th><td class=\"num\" align=\"right\"><b>Files</th>"
+	      "<td class=\"num\" align=\"right\"><b>+</th>"
+	      "<td class=\"num\" align=\"right\"><b>-</th></tr>\n</thead><tbody>\n", fp);
 
 	if (cachefile && head) {
 		/* read from cache file (does not need to exist) */