Port test page to Page
This commit is contained in:
parent
d7c6a5beee
commit
a931f00df3
1 changed files with 9 additions and 9 deletions
|
|
@ -4,7 +4,7 @@ use maud::html;
|
||||||
use crate::{
|
use crate::{
|
||||||
config::ServerConfig,
|
config::ServerConfig,
|
||||||
server::web::{
|
server::web::{
|
||||||
base::{Base, Tab},
|
page::{Page, Tab},
|
||||||
paths::PathTest,
|
paths::PathTest,
|
||||||
},
|
},
|
||||||
somehow,
|
somehow,
|
||||||
|
|
@ -14,14 +14,14 @@ pub async fn get_test(
|
||||||
_path: PathTest,
|
_path: PathTest,
|
||||||
State(config): State<&'static ServerConfig>,
|
State(config): State<&'static ServerConfig>,
|
||||||
) -> somehow::Result<impl IntoResponse> {
|
) -> somehow::Result<impl IntoResponse> {
|
||||||
let base = Base::new(config, Tab::Index);
|
let html = Page::new(config)
|
||||||
|
.title("test")
|
||||||
Ok(base.html(
|
.tab(Tab::Index)
|
||||||
"test",
|
.body(html! {
|
||||||
html! {},
|
|
||||||
html! {
|
|
||||||
h2 { "Test" }
|
h2 { "Test" }
|
||||||
p { "Hello world!" }
|
p { "Hello world!" }
|
||||||
},
|
})
|
||||||
))
|
.build();
|
||||||
|
|
||||||
|
Ok(html)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue