24 lines
617 B
Rust
24 lines
617 B
Rust
use actix_web::{get, web, HttpResponse, Responder};
|
|
use cached::proc_macro::once;
|
|
use ramhorns::Content;
|
|
|
|
use crate::{config::Config, template::Infos};
|
|
|
|
#[get("/web3")]
|
|
pub async fn page(config: web::Data<Config>) -> impl Responder {
|
|
HttpResponse::Ok().body(get_page(config.get_ref().clone()))
|
|
}
|
|
|
|
#[derive(Content)]
|
|
struct Web3Template {}
|
|
|
|
pub fn get_page(config: Config) -> String {
|
|
config.tmpl.render(
|
|
"web3.html",
|
|
Web3Template {},
|
|
Infos {
|
|
page_title: Some("Mylloon".to_string()),
|
|
page_desc: Some("Coin reculé de l'internet".to_string()),
|
|
},
|
|
)
|
|
}
|