Added current block info and skeleton of website
This commit is contained in:
11
src/main.rs
11
src/main.rs
@@ -1,9 +1,18 @@
|
||||
#[macro_use] extern crate rocket;
|
||||
use rocket_dyn_templates::{context, Template};
|
||||
use blockchain_time::{BlockchainInfo, BlockchainSupported};
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> Template {
|
||||
let context = context! {};
|
||||
let blockchain_infos: Vec<(String, BlockchainInfo)> = vec!{
|
||||
("BSV".to_string(), BlockchainSupported::BSV.into()),
|
||||
("BTC".to_string(), BlockchainSupported::BTC.into()),
|
||||
("XMR".to_string(), BlockchainSupported::XMR.into()),
|
||||
("ETH".to_string(), BlockchainSupported::ETH.into()),
|
||||
};
|
||||
let context = context! {
|
||||
blockchain_infos
|
||||
};
|
||||
Template::render("index", context)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user