stagit

personal fork of stagit (rnpnr branch)
git clone anongit@rnpnr.xyz:stagit.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 4cd8e029171ed72b4933a95abb539baa6ac2a2a8
Parent: 72d04a9b5840d9a2f56db1bb96a60f69cd369ea1
Author: Randy Palamar
Date:   Sat,  4 Nov 2023 14:08:57 -0600

add footer

Diffstat:
Mconfig.h | 2++
Mstagit-index.c | 10+++++++++-
Mstagit.c | 9++++++++-
3 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/config.h b/config.h @@ -5,3 +5,5 @@ static const char *navbar[][2] = { { "[git]", "git" }, { "[setup]", "setup.html" }, }; + +static const char siteurl[] = "https://rnpnr.xyz/"; diff --git a/stagit-index.c b/stagit-index.c @@ -121,7 +121,15 @@ writeheader(FILE *fp) void writefooter(FILE *fp) { - fputs("</tbody>\n</table>\n</div>\n</body>\n</html>\n", fp); + fputs("</tbody>\n</table>\n</div>\n", fp); + fputs("<footer>\n\t<hr>\n\t<p><a href=\"/\">", fp); + fputs(siteurl, fp); + fputs("</a></p>\n\t<div>\n\t<img src=\"/assets/xmr.svg\" " + "style=\"max-height:1.5em;border-radius: 10px\" alt=\"XMR\"> " + "Monero (XMR): <div class=\"crypto\" style=\"display: inline-block;\"><code>" + "866mNUnXQr32FhZ9SFgfmedr2KjYQnhCwbmAxzqJ1nteCVsv8eifyn6E6cuQvyhRAVY5arYznUiUtBBbzBpiGqKCSrEqVxS" + "</code></div>\n\t</div>\n</footer>", fp); + fputs("</body>\n</html>\n", fp); } int diff --git a/stagit.c b/stagit.c @@ -557,7 +557,14 @@ writeheader(FILE *fp, const char *title) void writefooter(FILE *fp) { - fputs("</div>\n</body>\n</html>\n", fp); + fputs("</div>\n<footer>\n\t<hr>\n\t<p><a href=\"/\">", fp); + fputs(siteurl, fp); + fputs("</a></p>\n\t<div>\n\t<img src=\"/assets/xmr.svg\" " + "style=\"max-height:1.5em;border-radius: 10px\" alt=\"XMR\"> " + "Monero (XMR): <div class=\"crypto\" style=\"display: inline-block;\"><code>" + "866mNUnXQr32FhZ9SFgfmedr2KjYQnhCwbmAxzqJ1nteCVsv8eifyn6E6cuQvyhRAVY5arYznUiUtBBbzBpiGqKCSrEqVxS" + "</code></div>\n\t</div>\n</footer>", fp); + fputs("</body>\n</html>\n", fp); } size_t