Include 'running since' in the footer
This commit is contained in:
13
routes.c
13
routes.c
@ -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");
|
||||
|
Reference in New Issue
Block a user