From db02c4cc8028606fa57fd50424491008990ef6fd Mon Sep 17 00:00:00 2001 From: frosty Date: Fri, 3 Apr 2026 15:15:41 -0400 Subject: feat: added version to homepage --- src/Routes/Home.c | 1 + src/Utility/Utility.h | 4 ++++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/Routes/Home.c b/src/Routes/Home.c index bbd53b7..1e5c3df 100644 --- a/src/Routes/Home.c +++ b/src/Routes/Home.c @@ -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); diff --git a/src/Utility/Utility.h b/src/Utility/Utility.h index 2002307..8d13306 100644 --- a/src/Utility/Utility.h +++ b/src/Utility/Utility.h @@ -3,6 +3,10 @@ #include +#ifndef VERSION +#define VERSION "unknown" +#endif + #define LINK_FIELD_COUNT 3 int hex_to_int(char c); -- cgit v1.2.3