logo

stagit

STAtic GIT web view generator (in C) git clone https://hacktivis.me/git/stagit.git
commit: 917feccaa284ac5f34acb1e403782b7a268773d3
parent 09d0cb26b113a942c3cb42d188ac4e800d32f30b
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 17 Mar 2019 01:20:06 +0100

stagit{-index}.c: Add a bunch of classes for styling

Diffstat:

Mstagit-index.c6+++---
Mstagit.c12++++++------
2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -129,14 +129,14 @@ writelog(FILE *fp) if (!strcmp(p, ".git")) *p = '\0'; - fputs("<tr><td><a href=\"", fp); + fputs("<tr><td class=\"text index-name\"><a href=\"", fp); xmlencode(fp, stripped_name, strlen(stripped_name)); /*fputs("/log.html\">", fp); Let http server set default index */ fputs("/\">", fp); xmlencode(fp, stripped_name, strlen(stripped_name)); - fputs("</a></td><td>", fp); + fputs("</a></td><td class=\"text index-description\">", fp); xmlencode(fp, description, strlen(description)); - fputs("</td><td>", fp); + fputs("</td><td class=\"date index-author-date\">", fp); if (author) printtimeshort(fp, &(author->when)); fputs("</td></tr>", fp); diff --git a/stagit.c b/stagit.c @@ -715,23 +715,23 @@ printshowfile(FILE *fp, struct commitinfo *ci) void writelogline(FILE *fp, struct commitinfo *ci) { - fputs("<tr><td>", fp); + fputs("<tr><td class=\"date log-author-date\">", fp); if (ci->author) printtimeshort(fp, &(ci->author->when)); - fputs("</td><td>", fp); + fputs("</td><td class=\"text log-summary\">", fp); if (ci->summary) { fprintf(fp, "<a href=\"%scommit/%s.html\">", relpath, ci->oid); xmlencode(fp, ci->summary, strlen(ci->summary)); fputs("</a>", fp); } - fputs("</td><td>", fp); + fputs("</td><td class=\"text log-author\">", fp); if (ci->author) xmlencode(fp, ci->author->name, strlen(ci->author->name)); - fputs("</td><td class=\"num\" align=\"right\">", fp); + fputs("</td><td class=\"num log-filecount\">", fp); fprintf(fp, "%zu", ci->filecount); - fputs("</td><td class=\"num\" align=\"right\">", fp); + fputs("</td><td class=\"num log-addcount\">", fp); fprintf(fp, "+%zu", ci->addcount); - fputs("</td><td class=\"num\" align=\"right\">", fp); + fputs("</td><td class=\"num log-delcount\">", fp); fprintf(fp, "-%zu", ci->delcount); fputs("</td></tr>\n", fp); }