stagit.diff (3222B)


      1 diff --git a/stagit-index.c b/stagit-index.c
      2 index 6402296..0e90b16 100644
      3 --- a/stagit-index.c
      4 +++ b/stagit-index.c
      5 @@ -12,7 +12,9 @@ static git_repository *repo;
      6  
      7  static const char *relpath = "";
      8  
      9 -static char description[255] = "Repositories";
     10 +/* TODO: Take these as arguments instead of hardcoding them */
     11 +static char title[255] = "MonasTech Repositories";
     12 +static char description[255] = "Making technology in the world, not of the world.";
     13  static char *name = "";
     14  static char owner[255];
     15  
     16 @@ -100,12 +102,14 @@ writeheader(FILE *fp)
     17  		"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n"
     18  		"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n"
     19  		"<title>", fp);
     20 -	xmlencode(fp, description, strlen(description));
     21 -	fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath);
     22 -	fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
     23 +	xmlencode(fp, title, strlen(title));
     24 +	fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"/logo.svg\" />\n", relpath);
     25 +	fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />\n", relpath);
     26  	fputs("</head>\n<body>\n", fp);
     27 -	fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n"
     28 -	        "<td><span class=\"desc\">", relpath);
     29 +	fprintf(fp, "<table id=\"header\">\n<tr><td><img src=\"/logo.svg\" alt=\"\" width=\"32\" height=\"32\" /></td>\n"
     30 +	        "<td><h1>", relpath);
     31 +	xmlencode(fp, title, strlen(title));
     32 +	fputs("</h1><span class=\"desc\">", fp);
     33  	xmlencode(fp, description, strlen(description));
     34  	fputs("</span></td></tr><tr><td></td><td>\n"
     35  		"</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n"
     36 diff --git a/stagit.c b/stagit.c
     37 index 409714b..7174246 100644
     38 --- a/stagit.c
     39 +++ b/stagit.c
     40 @@ -511,16 +511,16 @@ writeheader(FILE *fp, const char *title)
     41  	if (description[0])
     42  		fputs(" - ", fp);
     43  	xmlencode(fp, description, strlen(description));
     44 -	fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath);
     45 +	fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"/logo.svg\" />\n", relpath);
     46  	fputs("<link rel=\"alternate\" type=\"application/atom+xml\" title=\"", fp);
     47  	xmlencode(fp, name, strlen(name));
     48  	fprintf(fp, " Atom Feed\" href=\"%satom.xml\" />\n", relpath);
     49  	fputs("<link rel=\"alternate\" type=\"application/atom+xml\" title=\"", fp);
     50  	xmlencode(fp, name, strlen(name));
     51  	fprintf(fp, " Atom Feed (tags)\" href=\"%stags.xml\" />\n", relpath);
     52 -	fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
     53 -	fputs("</head>\n<body>\n<table><tr><td>", fp);
     54 -	fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
     55 +	fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"/style.css\" />\n", relpath);
     56 +	fputs("</head>\n<body>\n<table id=\"header\"><tr><td>", fp);
     57 +	fprintf(fp, "<a href=\"../%s\"><img src=\"/logo.svg\" alt=\"\" width=\"32\" height=\"32\" /></a>",
     58  	        relpath, relpath);
     59  	fputs("</td><td><h1>", fp);
     60  	xmlencode(fp, strippedname, strlen(strippedname));