diff --git a/src/page.h b/src/page.h index c4bd42b..7b1c342 100644 --- a/src/page.h +++ b/src/page.h @@ -81,6 +81,7 @@ namespace xmreg { {"height" , fmt::format("{:d}", height)}, {"server_timestamp", xmreg::timestamp_to_str(server_timestamp)}, {"blocks" , mstch::array()}, + {"age_format" , "[h:m:d]"}, {"page_no" , fmt::format("{:d}", page_no)}, {"total_page_no" , fmt::format("{:d}", height / (no_of_last_blocks))}, {"is_page_zero" , bool(page_no)}, @@ -133,12 +134,14 @@ namespace xmreg { age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}:{:02d}", delta_time[0], delta_time[1], delta_time[2], delta_time[3], delta_time[4]); + context["age_format"] = "[y:d:h:m:s]"; } else if (delta_time[1] > 0) { age_str = fmt::format("{:02d}:{:02d}:{:02d}:{:02d}", delta_time[1], delta_time[2], delta_time[3], delta_time[4]); + context["age_format"] = "[d:h:m:s]"; } // get xmr in the block reward diff --git a/src/templates/index.html b/src/templates/index.html index 310ea8b..241241c 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -26,7 +26,7 @@ - +
heightage [h:m:s]age {{age_format}}} block hash reward/fees txs