stagit

My fork of stagit

git clone git://git.shimmy1996.com/stagit.git
commit dff7e67b9c026304ed7097ef30e7cccc41791d64
parent 11446a512fa07464b986461ff6a9018fbe0225bd
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
@@ -462,21 +462,8 @@ writeheader(FILE *fp, const char *title)
 	fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed (tags)\" href=\"%stags.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);
@@ -489,7 +476,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