aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Ortlepp <post@ortlepp.eu>2020-02-29 15:42:35 +0100
committerThorsten Ortlepp <post@ortlepp.eu>2020-02-29 15:42:35 +0100
commit4c8ab994c313a4cc218b2578c0d123bb67244df5 (patch)
tree67892fe85f54855d50079f90b27e68929094e6bf
parentd7f3d4c4faf2c1defc7f3c1534c1bf550c99387d (diff)
downloadstagit-fork-4c8ab994c313a4cc218b2578c0d123bb67244df5.zip
Fix HTML: use <th> instead of <td><b>
-rw-r--r--stagit-index.c4
-rw-r--r--stagit.c20
-rw-r--r--style.css8
3 files changed, 18 insertions, 14 deletions
diff --git a/stagit-index.c b/stagit-index.c
index 2b243ec..832b61a 100644
--- a/stagit-index.c
+++ b/stagit-index.c
@@ -77,8 +77,8 @@ writeheader(FILE *fp)
fputs("</span></td></tr><tr><td></td><td>\n"
"</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n"
"<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
index 3c26252..8327ca3 100644
--- a/stagit.c
+++ b/stagit.c
@@ -919,8 +919,8 @@ writefiles(FILE *fp, const git_oid *id)
int ret = -1;
fputs("<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) &&
@@ -1005,9 +1005,9 @@ writerefs(FILE *fp)
/* print header if it has an entry (first). */
if (++count == 1) {
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>\n<tr><th>Name</th>"
+ "<th>Last commit date</th>"
+ "<th>Author</th>\n</tr>\n"
"</thead><tbody>\n",
titles[j], ids[j]);
}
@@ -1187,11 +1187,11 @@ main(int argc, char *argv[])
relpath = "";
mkdir("commit", S_IRWXU | S_IRWXG | S_IRWXO);
writeheader(fp, "Log");
- 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>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("<table id=\"log\"><thead>\n<tr><th>Date</th>"
+ "<th>Commit message</th>"
+ "<th>Author</th><th class=\"num\" align=\"right\">Files</th>"
+ "<th class=\"num\" align=\"right\">+</th>"
+ "<th class=\"num\" align=\"right\">-</th></tr>\n</thead><tbody>\n", fp);
if (cachefile && head) {
/* read from cache file (does not need to exist) */
diff --git a/style.css b/style.css
index d1cd6d3..1760c49 100644
--- a/style.css
+++ b/style.css
@@ -37,7 +37,7 @@ a.line {
text-decoration: none;
}
-table thead td {
+table th {
font-weight: bold;
}
@@ -45,7 +45,7 @@ table td {
padding: 0 0.4em;
}
-#content table td {
+#content table td, #content table th {
vertical-align: top;
white-space: nowrap;
}
@@ -69,6 +69,10 @@ td.num {
text-align: right;
}
+th.num {
+ text-align: right;
+}
+
.desc {
color: #777;
}