Include 'running since' in the footer

This commit is contained in:
kamkow1
2025-06-18 02:00:52 +02:00
parent a90517c4da
commit e9a95c2c54
9 changed files with 56 additions and 3 deletions

View File

@ -7,6 +7,7 @@
#include "baked.h"
#include "clonestr.h"
#include "commit.h"
#include "timer.h"
#define INTERNAL_SERVER_ERROR_MSG "Internal server error ;(. Try again later..."
@ -108,6 +109,9 @@ ROUTE_HANDLER(page_not_found)
}
list_append(&env, fmt("-DCOMMIT=%s", COMMIT_STRING));
char timer[100];
get_timer_string(timer, sizeof(timer));
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
#if DEBUG
list_append(&env, "-DHOTRELOAD=1");
@ -197,6 +201,9 @@ ROUTE_HANDLER(home)
}
list_append(&env, fmt("-DCOMMIT=%s", COMMIT_STRING));
char timer[100];
get_timer_string(timer, sizeof(timer));
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
#if DEBUG
list_append(&env, "-DHOTRELOAD=1");
@ -231,6 +238,9 @@ ROUTE_HANDLER(generic_blog)
}
list_append(&env, fmt("-DCOMMIT=%s", COMMIT_STRING));
char timer[100];
get_timer_string(timer, sizeof(timer));
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
#if DEBUG
list_append(&env, "-DHOTRELOAD=1");
@ -319,6 +329,9 @@ ROUTE_HANDLER(blog)
}
list_append(&env, fmt("-DCOMMIT=%s", COMMIT_STRING));
char timer[100];
get_timer_string(timer, sizeof(timer));
list_append(&env, fmt("-DRUNNING_SINCE=%s", timer));
#if DEBUG
list_append(&env, "-DHOTRELOAD=1");