stagit

Fork of stagit - for personal repository
git clone git://git.dimitrijedobrota.com/stagit.git
Log | Files | Refs | README | LICENSE

commit edf839d48e7db9693e8226b060f82330a0aa83d9
parent 68557480fcafcb478cfceb5cf40bbd75c72175da
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date:   Sun,  8 Aug 2021 15:40:34 +0200

Add the theme switch to the html template

Diffstat:
Mstagit-index.c | 1+
Mstagit.c | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -73,6 +73,7 @@ writeheader(FILE *fp) fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%scolors.css\" />\n", relpath); fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); fputs("</head>\n<body>\n", fp); + fputs("</head>\n<body>\n<input type=\"checkbox\" id=\"theme-switch\" class=\"theme-switch\">\n<div id=\"page\">\n<label for=\"theme-switch\" class=\"switch-label\"></label>\n", fp); fprintf(fp, "<table>\n<tr><td><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></td>\n" "<td><span class=\"desc\">", relpath); xmlencode(fp, description, strlen(description)); diff --git a/stagit.c b/stagit.c @@ -486,7 +486,7 @@ writeheader(FILE *fp, const char *title) name, relpath); fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%scolors.css\" />\n", relpath); fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath); - fputs("</head>\n<body>\n<table><tr><td>", fp); + fputs("</head>\n<body>\n<input type=\"checkbox\" id=\"theme-switch\" class=\"theme-switch\">\n<div id=\"page\">\n<label for=\"theme-switch\" class=\"switch-label\"></label>\n<table><tr><td>", fp); fprintf(fp, "<a href=\"../%s\"><img src=\"%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>", relpath, relpath); fputs("</td><td><h1>", fp);