stagit

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

commit 636ecb298124f925bb9ddb2859d6c3ea3301ec46
parent e6c9bee2a8c8b79e1922975f6cb2451d692aae67
Author: Dimitrije Dobrota <mail@dimitrijedobrota.com>
Date:   Mon,  9 Aug 2021 12:12:07 +0200

Add main.js to handle theme switching state

The script is used to store the state of the theme switch to local
storage only

Diffstat:
Mcreate.sh | 1+
Mstagit-index.c | 2+-
Mstagit.c | 2+-
3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/create.sh b/create.sh @@ -37,6 +37,7 @@ for dir in "${reposdir}/"*/; do ln -sf log.html index.html ln -sf ../style.css style.css ln -sf ../colors.css colors.css + ln -sf ../main.js main.js ln -sf ../logo.png logo.png ln -sf ../favicon.png favicon.png diff --git a/stagit-index.c b/stagit-index.c @@ -87,7 +87,7 @@ writeheader(FILE *fp) void writefooter(FILE *fp) { - fputs("</tbody>\n</table>\n</div>\n</div>\n</body>\n</html>\n", fp); + fprintf(fp, "</tbody>\n</table>\n</div>\n</div>\n<script src=\"%smain.js\"></script>\n</body>\n</html>\n", relpath); } int diff --git a/stagit.c b/stagit.c @@ -520,7 +520,7 @@ writeheader(FILE *fp, const char *title) void writefooter(FILE *fp) { - fputs("</div>\n</div>\n</body>\n</html>\n", fp); + fprintf(fp, "</div>\n</div>\n<script src=\"%smain.js\"></script>\n</body>\n</html>\n", relpath); } size_t