commit: 779127e4874d41b182d8e6784081a3d19753093d
parent f9e586bb8dfa020256d704fffe70df91478c4b93
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Thu, 21 Mar 2019 11:32:07 +0100
stagit.c: Move atom links next to their associated pages for discoverability
Diffstat:
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/stagit.c b/stagit.c
@@ -515,12 +515,6 @@ writeheader(FILE *fp, const char *title)
if(strlen(faviconurl) > 0) {
fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%s\" />\n", faviconurl);
}
- fputs("<link rel=\"alternate\" type=\"application/atom+xml\" title=\"", fp);
- xmlencode(fp, name, strlen(name));
- fprintf(fp, " Atom Feed\" href=\"%satom.xml\" />\n", relpath);
- fputs("<link rel=\"alternate\" type=\"application/atom+xml\" title=\"", fp);
- xmlencode(fp, name, strlen(name));
- fprintf(fp, " Atom Feed (tags)\" href=\"%stags.xml\" />\n", relpath);
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", assetpath);
fputs("</head>\n<body>\n<header>", fp);
fprintf(fp, "<a href=\"..\"><img src=\"%slogo.png\" alt=\"logo\" width=\"32\" height=\"32\" /></a>",
@@ -538,9 +532,19 @@ writeheader(FILE *fp, const char *title)
fputs("</a></code>", fp);
}
fputs("</header><nav>\n", fp);
+
fprintf(fp, " <a rel=\"version-history\" href=\"%slog.html\">Log</a>", relpath);
+ fprintf(fp, " (<a rel=\"alternate\" type=\"application/atom+xml\" title=\"");
+ xmlencode(fp, name, strlen(name));
+ fprintf(fp, "Atom Feed\" href=\"%satom.xml\">RSS/Atom</a>)", relpath);
+
fprintf(fp, " <a rel=\"index\" href=\"%sfiles.html\">Files</a>", relpath);
+
fprintf(fp, " <a href=\"%srefs.html\">Refs</a>", relpath);
+ fprintf(fp, " (<a rel=\"alternate\" type=\"application/atom+xml\" title=\"");
+ xmlencode(fp, name, strlen(name));
+ fprintf(fp, "Atom Feed (tags)\" href=\"%stags.xml\">RSS/Atom</a>)", relpath);
+
if (submodules)
fprintf(fp, " <a href=\"%sfile/%s.html\">Submodules</a>",
relpath, submodules);