commit fdffb0f159d755cf44dd493562503bc2c0cf7659
parent df090c71b227fdf6bb7576e879101d13bcaeb4fe
Author: gearsix@tuta.io <gearsix@tuta.io>
Date: Wed, 17 Jun 2020 23:43:48 +0100
added the option for contact details in stagit-index
Diffstat:
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/stagit-index.c b/stagit-index.c
@@ -13,8 +13,9 @@ static git_repository *repo;
static const char *rootpath = "/";
static const char *relpath = "";
-static char description[255] = "GeaRSiX's repositories";
-static char *name = "";
+static char description[255] = "gearsix's repositories";
+static char *name = "gearsix";
+static char *contact; // obviously it's not recommended to add personal data
static char owner[255];
void
@@ -75,8 +76,10 @@ writeheader(FILE *fp)
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"
+ if (contact && strlen(contact) > 0) {
+ fprintf(fp, "<br/><span class=\"contact\">contact: %s</span>", contact);
+ }
+ fputs("</span></td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n"
"<table id=\"index\"><thead>\n"
"<tr><td><b>Name</b></td><td><b>Description</b></td><td><b>Owner</b></td>"
"<td><b>Last commit</b></td></tr>"