stagit

personal fork of stagit (rnpnr branch)
git clone anongit@rnpnr.xyz:stagit.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 72d04a9b5840d9a2f56db1bb96a60f69cd369ea1
Parent: 60a5ed12b8fa55c414da6ceb2e75b5d7500ec4a6
Author: Randy Palamar
Date:   Sat,  4 Nov 2023 13:39:01 -0600

clean up header line

Diffstat:
Mstagit-index.c | 7++-----
Mstagit.c | 10+++-------
2 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -109,12 +109,9 @@ writeheader(FILE *fp) fputs("\t<div class=\"navbar\">\n", fp); for (int i = 0; i < (sizeof(navbar)/sizeof(*navbar)); i++) fprintf(fp, "\t\t<a href=\"/%s\">%s</a>\n", navbar[i][1], navbar[i][0]); - fputs("\t</div><hr>\n</nav>\n", fp); - fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" - "<td><span class=\"desc\">", relpath); + fputs("\t</div><hr>\n</nav>\n<h1>", fp); xmlencode(fp, description, strlen(description)); - fputs("</span></td></tr><tr><td></td><td>\n" - "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n" + fputs("</h1>\n<div id=\"content\">\n" "<table id=\"index\"><thead>\n" "<tr><td><b>Name</b></td><td><b>Description</b></td>" "<td><b>Last commit</b></td></tr>" diff --git a/stagit.c b/stagit.c @@ -525,13 +525,9 @@ writeheader(FILE *fp, const char *title) fputs("\t<div class=\"navbar\">\n", fp); for (int i = 0; i < LEN(navbar); i++) fprintf(fp, "\t\t<a href=\"/%s\">%s</a>\n", navbar[i][1], navbar[i][0]); - fputs("\t</div><hr>\n</nav>\n", fp); - fputs("<table><tr><td>", fp); - fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", - relpath, relpath); - fputs("</td><td><h1>", fp); + fputs("\t</div><hr>\n</nav>\n<h1>", fp); xmlencode(fp, strippedname, strlen(strippedname)); - fputs("</h1><span class=\"desc\">", fp); + fputs("</h1>\n<table><tr><td><span class=\"desc\">", fp); xmlencode(fp, description, strlen(description)); fputs("</span></td></tr>", fp); if (cloneurl[0]) { @@ -541,7 +537,7 @@ writeheader(FILE *fp, const char *title) xmlencode(fp, cloneurl, strlen(cloneurl)); fputs("</a></td></tr>", fp); } - fputs("<tr><td></td><td>\n", fp); + fputs("<tr><td>\n", fp); fprintf(fp, "<a href=\"%slog.html\">Log</a> | ", relpath); fprintf(fp, "<a href=\"%sfiles.html\">Files</a> | ", relpath); fprintf(fp, "<a href=\"%srefs.html\">Refs</a>", relpath);