timescale appearance improved

master
moneroexamples 9 years ago
parent bb362fe242
commit f6447f1e39

@ -654,12 +654,12 @@ namespace xmreg {
// get mixins in time scale for visual representation // get mixins in time scale for visual representation
pair<string, double> mixin_times_scale = xmreg::timestamps_time_scale( pair<string, double> mixin_times_scale = xmreg::timestamps_time_scale(
mixin_timestamps, mixin_timestamps,
server_timestamp, 100); server_timestamp, 140);
// add beginning and end to the mixin_times_scale // add beginning and end to the mixin_times_scale
string timescale_str = string("Genesis<") string timescale_str = string("|")
+ mixin_times_scale.first + mixin_times_scale.first
+ string(">") + server_time_str; + string(">");
timescale_scale = mixin_times_scale.second ; timescale_scale = mixin_times_scale.second ;
@ -667,6 +667,7 @@ namespace xmreg {
mixins_timescales.push_back(mstch::map {{"timescale", timescale_str}}); mixins_timescales.push_back(mstch::map {{"timescale", timescale_str}});
} }
context["server_time"] = server_time_str;
context["inputs"] = inputs; context["inputs"] = inputs;
context["timescales"] = mixins_timescales; context["timescales"] = mixins_timescales;
context["timescales_scale"] = fmt::format("{:0.2f}", context["timescales_scale"] = fmt::format("{:0.2f}",

@ -2,6 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
{{#refresh}} {{#refresh}}
<meta http-equiv="refresh" content="10"> <meta http-equiv="refresh" content="10">
{{/refresh}} {{/refresh}}
@ -26,7 +27,7 @@
padding: 10px;*/ padding: 10px;*/
} }
tr { tr, li {
font-family: "Lucida Console", Monaco, monospace; font-family: "Lucida Console", Monaco, monospace;
font-size : 12px; font-size : 12px;
height: 22px; height: 22px;
@ -64,4 +65,4 @@
<div class="center"> <div class="center">
<h1 class="center"><a href="/">Onion Monero Blockchain Explorer</a></h1> <h1 class="center"><a href="/">Onion Monero Blockchain Explorer</a></h1>
<h4 style="font-size: 15px; margin: 0px">(no javascript - no web analytics trackers - no images - open sourced)</h4> <h4 style="font-size: 15px; margin: 0px">(no javascript - no web analytics trackers - no images - open sourced)</h4>
</div> </div>

@ -74,10 +74,11 @@
<h3>Mixins time scale (resolution: {{timescales_scale}} days)</h3> <h3>Mixins time scale (resolution: {{timescales_scale}} days)</h3>
<h4>From Gensis till {{server_time}}</h4>
<div class="center"> <div class="center">
<ul class="center"> <ul class="center">
{{#timescales}} {{#timescales}}
<li class="center" style="list-style-type: none;">{{timescale}}</li> <li style="list-style-type: none; text-align: center;">{{timescale}}</li>
{{/timescales}} {{/timescales}}
</ul> </ul>
</div> </div>

Loading…
Cancel
Save