stagit

[fork] HTML git frontend
Log | Files | Refs | README | LICENSE

commit 951fef5d716803a9d35c46d45f1ef280aea81341
parent 70541c5e2cbdc141ba94e76899aba5f07047cecf
Author: hhvn <dev@hhvn.uk>
Date:   Fri, 18 Nov 2022 16:47:40 +0000

Embed hhvn.uk stuff into stagit-index

Diffstat:
Mstagit-index.c | 22+++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -95,22 +95,26 @@ printtimeshort(FILE *fp, const git_time *intime) void writeheader(FILE *fp) { - fputs("<!DOCTYPE html>\n" + fprintf(fp, "<!DOCTYPE html>\n" "<html>\n<head>\n" "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n" "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n" - "<title>", fp); - xmlencode(fp, description, strlen(description)); - fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath); + "<title>hhvn's website</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); 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); - xmlencode(fp, description, strlen(description)); + fprintf(fp, "<h1>hhvn's website</h1>\n" + "<hr />\n" + "<p>CSS? What's that?</p>\n" + "Mail me if you can: hayden<span><b><!---</b>--->@</b></span>hhvn<i><!---span <div>--->.</i>uk<br />\n" + "Spam me if you prefer: spamtrap@hhvn.uk<br />\n" + "<a href="./pgp.asc">PGP key</a> &amp; <a href=\"./ssh.pub\">SSH key</a>" + "<hr />\n" + "<p>Anyway, here's some code:\n"); fputs("</span></td></tr><tr><td></td><td>\n" - "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n" + "</td></tr>\n</table>\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>" + "<tr><td><b>Name</b></td><td><b>Description</b></td><td></td>" "<td><b>Last commit</b></td></tr>" "</thead><tbody>\n", fp); }