commit: c14c1a8705285773f3da61a6ca49197bfa54528a
parent 4bfec03c0404c2c4acde4cd983d2a0a0601fae85
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date: Tue, 4 Apr 2017 18:56:41 +0200
Use common path for assets(style.css & logo.png)
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/config.h b/config.h
@@ -1,3 +1,4 @@
/* See LICENSE file for copyright and license details. */
static const unsigned summarylen = 70; /* summary length in the log */
static const int showlinecount = 1; /* display line count or file size in file tree index */
+static const char *assetpath = "/git/"; /* Where are the assets (example: assetpath/style.css ) */
diff --git a/stagit.c b/stagit.c
@@ -480,15 +480,15 @@ 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=\"%sfavicon.png\" />\n", assetpath);
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n",
name, relpath);
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);
+ fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", assetpath);
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=\"..\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
+ assetpath);
fputs("</td><td><h1>", fp);
xmlencode(fp, strippedname, strlen(strippedname));
fputs("</h1><span class=\"desc\">", fp);