use maud::html; use page::servable::{Page, PageMetadata}; use reqwest::StatusCode; use crate::pages::MAIN_TEMPLATE; pub fn notfound() -> Page { MAIN_TEMPLATE.derive( PageMetadata { title: "Page not found".into(), author:None, description: None, image: Some("/assets/img/icon.png".to_owned()), }, move |_page, _ctx| { Box::pin(async { html! { div class="wrapper" { div style="display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:100vh" { p style="font-weight:bold;font-size:50pt;margin:0;" { "404" } p style="font-size:13pt;margin:0;color:var(--grey);" { "(page not found)" } a style="font-size:12pt;margin:10pt;padding:5px;" href="/" {"<- Back to site"} } } } }) }, ).response_code(StatusCode::NOT_FOUND) }