,
}
diff --git a/src/html/page/block.rs b/src/html/page/block.rs
index bab40e3..1cf23b8 100644
--- a/src/html/page/block.rs
+++ b/src/html/page/block.rs
@@ -40,7 +40,6 @@ pub async fn block_page_with_value(
.map_err(|e| not_found_html_response(State(state.clone()), Some(e.to_string())))?;
let header = HeaderHtml {
- site_name: "Neptune Explorer".to_string(),
state: state.clone(),
};
diff --git a/src/html/page/not_found.rs b/src/html/page/not_found.rs
index a1c04ee..3040a9e 100644
--- a/src/html/page/not_found.rs
+++ b/src/html/page/not_found.rs
@@ -24,7 +24,6 @@ pub fn not_found_page(
}
let header = HeaderHtml {
- site_name: "Neptune Explorer".to_string(),
state: state.clone(),
};
diff --git a/src/html/page/utxo.rs b/src/html/page/utxo.rs
index 8096f7d..9d02ff0 100644
--- a/src/html/page/utxo.rs
+++ b/src/html/page/utxo.rs
@@ -44,7 +44,6 @@ pub async fn utxo_page(
};
let header = HeaderHtml {
- site_name: "Neptune Explorer".to_string(),
state: state.clone(),
};
diff --git a/src/model/config.rs b/src/model/config.rs
index e7cf162..3964d97 100644
--- a/src/model/config.rs
+++ b/src/model/config.rs
@@ -2,6 +2,10 @@
#[derive(Debug, clap::Parser, Clone)]
#[clap(name = "neptune-explorer", about = "Neptune Block Explorer")]
pub struct Config {
+ /// Sets the website name
+ #[clap(long, default_value = "Neptune Explorer", value_name = "site-name")]
+ pub site_name: String,
+
/// Sets the server address to connect to.
#[clap(long, default_value = "9799", value_name = "PORT")]
pub port: u16,
diff --git a/templates/web/html/components/header.html b/templates/web/html/components/header.html
index 6b4087e..8aff913 100644
--- a/templates/web/html/components/header.html
+++ b/templates/web/html/components/header.html
@@ -1,3 +1,3 @@
-{{self.site_name}} : {{self.state.network}}
+{{self.state.config.site_name}} : {{self.state.network}}
\ No newline at end of file
diff --git a/templates/web/html/page/block_info.html b/templates/web/html/page/block_info.html
index a876c4c..1e71a3a 100644
--- a/templates/web/html/page/block_info.html
+++ b/templates/web/html/page/block_info.html
@@ -2,7 +2,7 @@
- Neptune Block Explorer: Block Height {{self.block_info.height}}
+ {{self.header.state.config.site_name}}: Block Height {{self.block_info.height}}
{{html_escaper::Trusted(include_str!(concat!(env!("CARGO_MANIFEST_DIR"),"/templates/web/html/components/head.html")))}}
@@ -16,10 +16,10 @@
%% if self.block_info.is_genesis {
- This is the Genesis Block
+ This is the genesis block
%% }
%% if self.block_info.is_tip {
- This is the Latest Block (tip)
+ This is the latest block (tip)
%% }
diff --git a/templates/web/html/page/not_found.html b/templates/web/html/page/not_found.html
index a69b7ed..5f497d5 100644
--- a/templates/web/html/page/not_found.html
+++ b/templates/web/html/page/not_found.html
@@ -1,7 +1,7 @@
- Neptune Block Explorer: Not Found
+ {{self.header.state.config.site_name}}: Not Found
{{html_escaper::Trusted(include_str!( concat!(env!("CARGO_MANIFEST_DIR"), "/templates/web/html/components/head.html")))}}
diff --git a/templates/web/html/page/root.html b/templates/web/html/page/root.html
index 872196d..213c282 100644
--- a/templates/web/html/page/root.html
+++ b/templates/web/html/page/root.html
@@ -1,6 +1,6 @@
- Neptune Block Explorer: (network: {{self.state.network}})
+ {{self.state.config.site_name}}: (network: {{self.state.network}})
{{ html_escaper::Trusted(include_str!( concat!(env!("CARGO_MANIFEST_DIR"), "/templates/web/html/components/head.html"))) }}