feat: begin adding settings menu, move theme to settings
This commit is contained in:
@@ -1,14 +1,19 @@
|
||||
#include "Home.h"
|
||||
#include "../Utility/Utility.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
int home_handler(UrlParams *params) {
|
||||
(void)params;
|
||||
char *theme = get_theme("");
|
||||
|
||||
TemplateContext ctx = new_context();
|
||||
context_set(&ctx, "theme", theme);
|
||||
char *rendered_html = render_template("home.html", &ctx);
|
||||
send_response(rendered_html);
|
||||
|
||||
free(rendered_html);
|
||||
free_context(&ctx);
|
||||
free(theme);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user