feat: added version to homepage
This commit is contained in:
@@ -10,6 +10,7 @@ int home_handler(UrlParams *params) {
|
||||
|
||||
TemplateContext ctx = new_context();
|
||||
context_set(&ctx, "theme", theme);
|
||||
context_set(&ctx, "version", VERSION);
|
||||
beaker_set_locale(&ctx, locale);
|
||||
char *rendered_html = render_template("home.html", &ctx);
|
||||
send_response(rendered_html);
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <beaker.h>
|
||||
|
||||
#ifndef VERSION
|
||||
#define VERSION "unknown"
|
||||
#endif
|
||||
|
||||
#define LINK_FIELD_COUNT 3
|
||||
|
||||
int hex_to_int(char c);
|
||||
|
||||
Reference in New Issue
Block a user