logo

stagit

STAtic GIT web view generator (in C) git clone https://hacktivis.me/git/stagit.git
commit: 1d72b22c47f34762f10d62fe5f33fc3491edab38
parent 16cfec4fba0837841406f546cd71612274ad7c9c
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  6 Jun 2024 06:10:51 +0200

stagit-index.c: Use sorttable

Diffstat:

Mstagit-index.c4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -109,6 +109,7 @@ writeheader(FILE *fp) fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", assetpath); } fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); + fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%ssorttable.css\" />\n", relpath); fputs("</head>\n<body>\n<header>", fp); fprintf(fp, "<img src=\"%slogo.png\" alt=\"logo\" width=\"32\" height=\"32\" />", assetpath); @@ -118,7 +119,7 @@ writeheader(FILE *fp) xmlencode(fp, repo_description, strlen(repo_description)); fputs("</span></header>", fp); fputs("<main>\n" - "<table id=\"index\"><thead>\n" + "<table class=\"sortable\" id=\"index\"><thead>\n" "<tr><th>Name</th><th>Description</th>" "<th>Last commit</th></tr>" "</thead><tbody>\n", fp); @@ -129,6 +130,7 @@ writefooter(FILE *fp) { fputs("</tbody>\n</table>\n",fp); fputs("</main>\n", fp); + fprintf(fp, "<script src=\"%ssorttable.js\"></script>\n", relpath); fputs("\t<footer>Here's my <a href=\"https://hacktivis.me/about\">contacts</a> for <a href=\"https://git-send-email.io/\">patches</a>, issues (tracker will maybe be added oneday), …\n", fp); fputs("</body>\n</html>\n", fp); }