Introduction
Introduction Statistics Contact Development Disclaimer Help
tAdd "Back to index" links from repository pages - stagit - static git page gen…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit 8e6633b64f13aba222eab8996f83366ab12dc7c7
parent 4e31f0fbbe6bf3b7836bf3e0f4a7087dbbf91e9c
Author: Anders Damsgaard <[email protected]>
Date: Fri, 3 Jan 2020 10:27:50 +0100
Add "Back to index" links from repository pages
Diffstat:
M stagit.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/stagit.c b/stagit.c
t@@ -51,6 +51,7 @@ static git_repository *repo;
static const char *relpath = "";
static const char *repodir;
+static char index_link[255] = "<a href=\"..\">Back to index</a>";
static char *name = "";
static char *strippedname = "";
t@@ -355,10 +356,10 @@ writeheader(FILE *fp, const char *title)
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" tit…
name, relpath);
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle…
- fputs("</head>\n<body>\n<table><tr><td>", fp);
+ fputs("</head>\n<body>\n<table style=\"width:100%\"><tr><td>", fp);
fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=…
relpath, relpath);
- fputs("</td><td><h1>", fp);
+ fputs("</td><td style=\"width:99%\"><h1>", fp);
xmlencode(fp, strippedname, strlen(strippedname));
fputs("</h1><span class=\"desc\">", fp);
xmlencode(fp, description, strlen(description));
t@@ -383,7 +384,9 @@ writeheader(FILE *fp, const char *title)
if (license)
fprintf(fp, " | <a href=\"%sfile/%s.html\">LICENSE</a>",
relpath, license);
- fputs("</td></tr></table>\n<hr/>\n<div id=\"content\">\n", fp);
+ fputs("</td>\n", fp);
+ fprintf(fp, "<td style=\"text-align:right;white-space:nowrap\">%s</td>…
+ fputs("</tr></table>\n<hr/>\n<div id=\"content\">\n", fp);
}
void
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.