Port test page to Page

This commit is contained in:
Joscha 2024-05-13 14:59:17 +02:00
parent d7c6a5beee
commit a931f00df3

View file

@ -4,7 +4,7 @@ use maud::html;
use crate::{
config::ServerConfig,
server::web::{
base::{Base, Tab},
page::{Page, Tab},
paths::PathTest,
},
somehow,
@ -14,14 +14,14 @@ pub async fn get_test(
_path: PathTest,
State(config): State<&'static ServerConfig>,
) -> somehow::Result<impl IntoResponse> {
let base = Base::new(config, Tab::Index);
Ok(base.html(
"test",
html! {},
html! {
let html = Page::new(config)
.title("test")
.tab(Tab::Index)
.body(html! {
h2 { "Test" }
p { "Hello world!" }
},
))
})
.build();
Ok(html)
}