diff options
context:
space:
mode:
authorBryce Kwon <bryce@brycekwon.com>
committerBryce Kwon <bryce@brycekwon.com>
commit
parent
tree
download
Give the stub and tag rows their full width
-rw-r--r--source/ui-log.c10
-rw-r--r--source/ui-refs.c4
-rw-r--r--source/ui-tag.c14
-rw-r--r--source/ui-tree.c6
4 files changed, 20 insertions, 14 deletions
diff --git a/source/ui-log.c b/source/ui-log.c
index 4bd17fa..9e9e31f 100644
--- a/source/ui-log.c
+++ b/source/ui-log.c
@@ -152,7 +152,9 @@ static void print_graph_above(struct rev_info *revs, struct strbuf *graph,
while (!graph_next_line(revs->graph, graph)) {
html("<tr class='nohover'><td class='commitgraph'>");
html(graph->buf);
- htmlf("</td><td colspan='%d' /></tr>\n", columns);
+ // The graph cell is one of the columns, so the filler spans
+ // the rest.
+ htmlf("</td><td colspan='%d'></td></tr>\n", columns - 1);
strbuf_setlen(graph, 0);
}
}
@@ -301,9 +303,11 @@ static void print_commit(struct commit *commit, struct rev_info *revs)
print_graph_padding(revs, &graphbuf, msg_lines);
}
else
- html("<td/>");
+ html("<td></td>");
- htmlf("<td colspan='%d'%s>\n", columns - (revs->graph ? 1 : 0),
+ // Either way one cell is already on the row, so the message
+ // spans the remaining columns.
+ htmlf("<td colspan='%d'%s>\n", columns - 1,
ctx.qry.showmsg ? " class='logmsg'" : "");
html_txt(msgbuf.buf);
html("</td></tr>\n");
diff --git a/source/ui-refs.c b/source/ui-refs.c
index 9897839..8490417 100644
--- a/source/ui-refs.c
+++ b/source/ui-refs.c
@@ -109,8 +109,10 @@ static int print_branch(struct refinfo *ref)
html("</td><td colspan='2'>");
cgit_print_age(info->committer_date, info->committer_tz, -1);
} else {
- html("</td><td></td><td>");
+ // The object link sits in the message column, and the empty
+ // tail cells keep the row as wide as the header.
cgit_object_link(ref->object);
+ html("</td><td class='col-author'></td><td colspan='2'>");
}
html("</td></tr>\n");
return 0;
diff --git a/source/ui-tag.c b/source/ui-tag.c
index c384f91..656280e 100644
--- a/source/ui-tag.c
+++ b/source/ui-tag.c
@@ -19,7 +19,7 @@
static void print_object_row(struct object *obj)
{
- html("<tr><td>tagged object</td><td class='oid'>");
+ html("<tr><th>tagged object</th><td class='oid'>");
cgit_object_link(obj);
html("</td></tr>\n");
}
@@ -27,8 +27,8 @@ static void print_object_row(struct object *obj)
static void print_download_row(const char *revname)
{
html("<tr><th>download</th><td class='oid'>");
- cgit_print_snapshot_links(ctx.repo, revname, "<br/>");
- html("</td></tr>");
+ cgit_print_snapshot_links(ctx.repo, revname, "<br>");
+ html("</td></tr>\n");
}
/*
@@ -71,17 +71,17 @@ static void print_annotated_tag(const char *revname,
cgit_print_layout_start();
html("<table class='commit-info'>\n");
- html("<tr><td>tag name</td><td>");
+ html("<tr><th>tag name</th><td>");
html_txt(revname);
htmlf(" (<span class='oid'>%s</span>)</td></tr>\n", oid_to_hex(oid));
if (info->tagger_date > 0) {
- html("<tr><td>tag date</td><td>");
+ html("<tr><th>tag date</th><td>");
html_txt(show_date(info->tagger_date, info->tagger_tz,
cgit_date_mode(DATE_ISO8601)));
html("</td></tr>\n");
}
if (info->tagger) {
- html("<tr><td>tagged by</td><td>");
+ html("<tr><th>tagged by</th><td>");
cgit_open_filter(ctx.repo->email_filter, info->tagger_email,
"tag");
html_txt(info->tagger);
@@ -105,7 +105,7 @@ static void print_lightweight_tag(const char *revname, struct object *obj)
{
cgit_print_layout_start();
html("<table class='commit-info'>\n");
- html("<tr><td>tag name</td><td>");
+ html("<tr><th>tag name</th><td>");
html_txt(revname);
html("</td></tr>\n");
print_object_row(obj);
diff --git a/source/ui-tree.c b/source/ui-tree.c
index 21b9547..7d24d53 100644
--- a/source/ui-tree.c
+++ b/source/ui-tree.c
@@ -293,9 +293,9 @@ static void print_ls_row(const struct object_id *oid, const char *pathname,
if (type == OBJ_BAD) {
// The name comes from the tree, so it can hold
// anything a commit was allowed to record.
- html("<tr><td colspan='3'>Bad object: ");
+ html("<tr><td colspan='4'>Bad object: ");
html_txt(name);
- htmlf(" %s</td></tr>", oid_to_hex(oid));
+ htmlf(" %s</td></tr>\n", oid_to_hex(oid));
goto cleanup;
}
}
@@ -408,7 +408,7 @@ static void ls_head(void)
html("<th class='left ls-mode'>Mode</th>");
html("<th class='left'>Name</th>");
html("<th class='right'>Size</th>");
- html("<th class='ls-links'/>");
+ html("<th class='ls-links'></th>");
html("</tr>\n");
}