Commit 8f4f4517bee9ecb92c491bb86aa17009b5645d89

Parents: 907134b7a29177cb45aa461c549c004b1ae875af

From: Andy Green <andy@warmcat.com>
Date: Sun Jun 24 16:19:35 2018 +0700

ui-shared: add now-dynamic age to footer
Now ages advance at the client, we can add one
to the generated footer.

Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Christian Hesse <mail@eworm.de>

Stats

ui-shared.c +3/-1

Changeset

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
diff --git a/ui-shared.c b/ui-shared.c
index 11aed19a80e882c6999eecb32250cd206fee5210..1bac2763b97425ecf4df4a7791e39f0db273ce73 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -870,7 +870,9 @@ 	else {
 		htmlf("<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit %s</a> "
 			"(<a href='https://git-scm.com/'>git %s</a>) at ", cgit_version, git_version_string);
 		html_txt(show_date(time(NULL), 0, cgit_date_mode(DATE_ISO8601)));
-		html("</div>\n");
+		html(" (");
+		cgit_print_age(time(NULL), 0, -1);
+		html(" ago)</div>\n");
 	}
 	html("</div> <!-- id=cgit -->\n");
 	html("</body>\n</html>\n");