stagit

My fork of stagit

git clone git://git.shimmy1996.com/stagit.git
commit f48d472ffa33281aa74bd5a826ac5797636f4e15
parent 4901c341a7836121a3d30b0c8bc514df3760a19b
Author: Shimmy Xu <shimmy.xu@shimmy1996.com>
Date:   Sat,  4 Apr 2020 12:54:40 -0500

Group navigation links together

Diffstat:
Mstagit.c | 31+++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/stagit.c b/stagit.c
@@ -356,21 +356,8 @@ writeheader(FILE *fp, const char *title)
 	fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n",
 		name, relpath);
 	fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
-	fputs("</head>\n<body>\n", fp);
-	fprintf(fp, "<a href=\"../%s\">←Back</a>", relpath);
-	fputs("<h1>", fp);
-	xmlencode(fp, strippedname, strlen(strippedname));
-	fputs("</h1><span class=\"desc\">", fp);
-	xmlencode(fp, description, strlen(description));
-	fputs("</span><br/>", fp);
-	if (cloneurl[0]) {
-		fputs("git clone <a href=\"", fp);
-		xmlencode(fp, cloneurl, strlen(cloneurl));
-		fputs("\">", fp);
-		xmlencode(fp, cloneurl, strlen(cloneurl));
-		fputs("</a><br/>", fp);
-	}
-	fputs("\n", fp);
+	fputs("</head>\n<body>\n<nav>", fp);
+	fprintf(fp, "<a href=\"../%s\">←Back</a> |", relpath);
 	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);
@@ -383,7 +370,19 @@ writeheader(FILE *fp, const char *title)
 	if (license)
 		fprintf(fp, " | <a href=\"%sfile/%s.html\">LICENSE</a>",
 		        relpath, license);
-	fputs("\n<hr/>\n<div id=\"content\">\n", fp);
+	fputs("</nav>\n<h1>", fp);
+	xmlencode(fp, strippedname, strlen(strippedname));
+	fputs("</h1><span class=\"desc\">", fp);
+	xmlencode(fp, description, strlen(description));
+	fputs("</span><br/>", fp);
+	if (cloneurl[0]) {
+		fputs("git clone <a href=\"", fp);
+		xmlencode(fp, cloneurl, strlen(cloneurl));
+		fputs("\">", fp);
+		xmlencode(fp, cloneurl, strlen(cloneurl));
+		fputs("</a><br/>", fp);
+	}
+	fputs("\n<div id=\"content\">\n", fp);
 }
 
 void