logo

stagit

STAtic GIT web view generator (in C) git clone https://hacktivis.me/git/stagit.git
commit: f9e586bb8dfa020256d704fffe70df91478c4b93
parent 57fc8ce5d7cbf1314389a66f5c338a0bdad486f7
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 @@ -161,13 +161,13 @@ 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); percentencode(fp, stripped_name, strlen(stripped_name)); 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 @@ -750,23 +750,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); }