mylloon.fr/src/routes/web3.rs
Mylloon de2b9bb45a
Some checks are pending
ci/woodpecker/push/publish Pipeline is pending
WIP: Web3 files
2023-04-14 17:57:10 +02:00

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()),
},
)
}