Added current block info and skeleton of website

This commit is contained in:
2024-07-14 19:08:38 +01:00
parent 0fbd04e791
commit cc7678ec18
5 changed files with 147 additions and 18 deletions

View File

@@ -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)
}