From 52520a4289cb5a74381d4dbaf22deff01d00c67c Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Mon, 7 Dec 2015 23:54:31 +0100 Subject: [PATCH] prettification --- style.css | 6 +++--- urmoms.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/style.css b/style.css index bbd67b5..970ac99 100644 --- a/style.css +++ b/style.css @@ -1,5 +1,5 @@ body { - font-family: sans-serif; + font-family: monospace, sans-serif; color: #333; background-color: #fff; } @@ -20,8 +20,8 @@ table td { padding: 0 3px; } -table tr:hover td { - background-color: #ddd; +#content table tr:hover td { + background-color: #eee; } h1, h2, h3, h4, h5, h6 { diff --git a/urmoms.c b/urmoms.c index 98343b1..8bccb8b 100644 --- a/urmoms.c +++ b/urmoms.c @@ -116,8 +116,9 @@ writeheader(FILE *fp) fprintf(fp, "\n", name, relpath); fprintf(fp, "\n", relpath); - fputs("\n\n
\n", fp); - fprintf(fp, "

\"\" %s %s

\n", + fputs("\n\n\n", fp); + fprintf(fp, "" + "
\"\"

%s

%s
\n", relpath, name, description); fprintf(fp, "Log | ", relpath); fprintf(fp, "Files", relpath); @@ -125,7 +126,7 @@ writeheader(FILE *fp) fprintf(fp, " | README", relpath); if (haslicense) fprintf(fp, " | LICENSE", relpath); - fputs("\n\n
\n
", fp);
+	fputs("
\n
\n", fp); return 0; } @@ -133,7 +134,7 @@ writeheader(FILE *fp) int writefooter(FILE *fp) { - return !fputs("\n\n", fp); + return !fputs("
\n", fp); } FILE * @@ -284,6 +285,7 @@ printshowfile(struct commitinfo *ci) fp = efopen(path, "w+b"); writeheader(fp); + fputs("
\n", fp);
 	printcommit(fp, ci);
 
 	memset(&statsbuf, 0, sizeof(statsbuf));
@@ -347,6 +349,7 @@ printshowfile(struct commitinfo *ci)
 	}
 	git_buf_free(&statsbuf);
 
+	fputs( "
\n", fp); writefooter(fp); fclose(fp); return; @@ -584,9 +587,11 @@ main(int argc, char *argv[]) if (!git_revparse_single(&obj, repo, "HEAD:LICENSE")) { fp = efopen("license.html", "w+b"); writeheader(fp); + fputs("
\n", fp);
 		writeblobhtml(fp, (git_blob *)obj);
 		if (ferror(fp))
 			err(1, "fwrite");
+		fputs("
\n", fp); writefooter(fp); fclose(fp); @@ -596,9 +601,11 @@ main(int argc, char *argv[]) if (!git_revparse_single(&obj, repo, "HEAD:README")) { fp = efopen("readme.html", "w+b"); writeheader(fp); + fputs("
\n", fp);
 		writeblobhtml(fp, (git_blob *)obj);
 		if (ferror(fp))
 			err(1, "fwrite");
+		fputs("
\n", fp); writefooter(fp); fclose(fp); } -- libgit2 1.1.1