Mercurial > sci
diff scid/page-index.c @ 28:4c16bb25e4f1
scid: implement themes in javascript
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 04 Aug 2022 06:09:54 +0200 |
parents | dae2de19ca5d |
children | 695637f1d8a7 |
line wrap: on
line diff
--- a/scid/page-index.c Wed Aug 03 15:18:09 2022 +0200 +++ b/scid/page-index.c Thu Aug 04 06:09:54 2022 +0200 @@ -23,7 +23,9 @@ #include "config.h" #include "db.h" #include "page.h" +#include "scid.h" #include "util.h" +#include "theme.h" #if 0 @@ -106,8 +108,6 @@ #endif static void - -static void get(struct kreq *r) { #if 0 @@ -128,7 +128,6 @@ page(r, KHTTP_200, KMIME_TEXT_HTML, "pages/index.html", json_pack("{so}", "projects", array )); -#endif json_t *array; if (!(db_project_list())) { @@ -136,6 +135,12 @@ page(); } else render(array); +#endif + khttp_head(r, kresps[KRESP_CONTENT_TYPE], "%s", kmimetypes[KMIME_TEXT_HTML]); + khttp_head(r, kresps[KRESP_STATUS], "%s", khttps[KHTTP_200]); + khttp_body(r); + khttp_printf(r, "%s", theme_render_index(scid.theme, "{}")); + khttp_free(r); } void