diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs
index 98e19bd1d4..3fcb6d2705 100644
--- a/src/subcommand/server.rs
+++ b/src/subcommand/server.rs
@@ -1026,7 +1026,12 @@ mod tests {
".*
Ordinals.*Ordinals
.*
-Recent Blocks
+Latest Blocks
+
+ - cycle
- 0
+ - epoch
- 0
+ - period
- 0
+
- [[:xdigit:]]{64}
- 000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f
diff --git a/src/subcommand/server/templates/home.rs b/src/subcommand/server/templates/home.rs
index e6300ea24b..c75644375a 100644
--- a/src/subcommand/server/templates/home.rs
+++ b/src/subcommand/server/templates/home.rs
@@ -4,11 +4,15 @@ use super::*;
pub(crate) struct HomeHtml {
last: u64,
blocks: Vec<(Rarity, BlockHash)>,
+ starting_ordinal: Option,
}
impl HomeHtml {
pub(crate) fn new(blocks: Vec<(u64, BlockHash)>) -> Self {
Self {
+ starting_ordinal: blocks
+ .get(0)
+ .map(|(height, _)| Height(*height).starting_ordinal()),
last: blocks
.get(0)
.map(|(height, _)| height)
@@ -37,13 +41,13 @@ mod tests {
assert_regex_match!(
&HomeHtml::new(vec![
(
- 1,
+ 1260001,
"1111111111111111111111111111111111111111111111111111111111111111"
.parse()
.unwrap()
),
(
- 0,
+ 1260000,
"0000000000000000000000000000000000000000000000000000000000000000"
.parse()
.unwrap()
@@ -54,10 +58,15 @@ mod tests {
Search
-Recent Blocks
-
+Latest Blocks
+
+ - cycle
- 1
+ - epoch
- 6
+ - period
- 625
+
+
- 1{64}
- - 0{64}
+ - 0{64}
",
);
diff --git a/templates/home.html b/templates/home.html
index 35aef87283..acb0247085 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -13,7 +13,14 @@ Search
-Recent Blocks
+Latest Blocks
+%% if let Some(starting_ordinal) = self.starting_ordinal {
+
+ - cycle
- {{starting_ordinal.cycle()}}
+ - epoch
- {{starting_ordinal.epoch()}}
+ - period
- {{starting_ordinal.period()}}
+
+%% }
%% for (rarity, hash) in &self.blocks {
- {{hash}}