Some checks failed
CI / Check typos (push) Successful in 1m3s
CI / Check links (push) Failing after 1m14s
CI / Clippy (push) Successful in 1m43s
CI / Build and test (push) Successful in 1m31s
CI / Build container (push) Successful in 1m45s
CI / Deploy on waypoint (push) Failing after 1m23s
30 lines
823 B
Rust
30 lines
823 B
Rust
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)
|
|
}
|