aboutsummaryrefslogtreecommitdiff
path: root/src/Routes/Home.c
diff options
context:
space:
mode:
authorfrosty <gabriel@bwaaa.monster>2026-05-10 00:00:08 -0400
committerfrosty <gabriel@bwaaa.monster>2026-05-10 00:00:08 -0400
commit3c856f93ed3d1362a8b6190d9ce44b2939fca717 (patch)
treef98a84d341b7b1739b573441e29cd366e04ea7b4 /src/Routes/Home.c
parentba6dae676a5c268d6b4265d26b9556ba1cfa6923 (diff)
downloadomnisearch-3c856f93ed3d1362a8b6190d9ce44b2939fca717.tar.gz
feat(wip): load themes dynamically from static/themes/*.css
Diffstat (limited to 'src/Routes/Home.c')
-rw-r--r--src/Routes/Home.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Routes/Home.c b/src/Routes/Home.c
index 0534517..bf85fe1 100644
--- a/src/Routes/Home.c
+++ b/src/Routes/Home.c
@@ -2,12 +2,17 @@
#include "../Utility/Utility.h"
#include <beaker.h>
#include <stdlib.h>
+#include <string.h>
int home_handler(UrlParams *params) {
(void)params;
char *theme = get_theme("");
char *locale = get_locale(NULL);
+ char **themes = NULL;
+ int themes_count = 0;
+ get_available_themes(&themes, &themes_count);
+
TemplateContext ctx = new_context();
context_set(&ctx, "theme", theme);
context_set(&ctx, "version", VERSION);