0019-stagit-index-.c-Add-a-bunch-of-classes-for-styling.patch (2415B)
- From bdd0f2f3dee07deb3ab9b340335e1d3e70a38ebf Mon Sep 17 00:00:00 2001
- From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
- Date: Sun, 17 Mar 2019 01:20:06 +0100
- Subject: [PATCH 19/22] stagit{-index}.c: Add a bunch of classes for styling
- ---
- stagit-index.c | 6 +++---
- stagit.c | 12 ++++++------
- 2 files changed, 9 insertions(+), 9 deletions(-)
- diff --git a/stagit-index.c b/stagit-index.c
- index 19eb047..b31b088 100644
- --- a/stagit-index.c
- +++ b/stagit-index.c
- @@ -133,14 +133,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
- index fd5873a..f6282fa 100644
- --- a/stagit.c
- +++ b/stagit.c
- @@ -584,23 +584,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);
- }
- --
- 2.26.2