stagit

static git page - forked from git.codemadness.org/stagit
git clone git://src.gearsix.net/stagit
Log | Files | Refs | Atom | README | LICENSE

commit 15045de0c1b81961f12295e28ff642a75b65758b
parent 467dfeb8f4bf2dd1ddb69e5c9592147acb425aab
Author: gearsix@tuta.io <gearsix@tuta.io>
Date:   Wed, 17 Jun 2020 00:56:55 +0100

favicon.png->logo.png; style.css, logo.css serve from rootpath; updated stagit-index description

Diffstat:
Mstagit-index.c | 11++++++-----
Mstagit.c | 9+++++----
2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -10,9 +10,10 @@ static git_repository *repo; +static const char *rootpath = "/"; static const char *relpath = ""; -static char description[255] = "Repositories"; +static char description[255] = "GeaRSiX's git repos"; static char *name = ""; static char owner[255]; @@ -68,11 +69,11 @@ writeheader(FILE *fp) "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" "<title>", fp); xmlencode(fp, description, strlen(description)); - fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); - fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); + fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%slogo.png\" />\n", rootpath); + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", rootpath); fputs("</head>\n<body>\n", fp); - fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" - "<td><span class=\"desc\">", relpath); + fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"50\" height=\"50\" /></td>\n" + "<td><span class=\"desc\">", rootpath); 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" diff --git a/stagit.c b/stagit.c @@ -50,6 +50,7 @@ struct commitinfo { static git_repository *repo; +static const char *rootpath = "/"; static const char *relpath = ""; static const char *repodir; @@ -352,13 +353,13 @@ writeheader(FILE *fp, const char *title) if (description[0]) fputs(" - ", fp); xmlencode(fp, description, strlen(description)); - fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); + fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%slogo.png\" />\n", rootpath); 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); + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", rootpath); fputs("</head>\n<body>\n<table><tr><td>", fp); - fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", - relpath, relpath); + fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"50\" height=\"50\" /></a>", + relpath, rootpath); fputs("</td><td><h1>", fp); xmlencode(fp, strippedname, strlen(strippedname)); fputs("</h1><span class=\"desc\">", fp);