update
This commit is contained in:
parent
e02def6bc1
commit
f3880d77d2
8 changed files with 265 additions and 85 deletions
examples
|
@ -1,7 +1,7 @@
|
|||
use based::get_pg;
|
||||
use based::request::{RequestContext, StringResponse};
|
||||
use based::ui::components::Shell;
|
||||
use based::ui::render_page;
|
||||
use based::ui::prelude::Nothing;
|
||||
use maud::html;
|
||||
use rocket::get;
|
||||
use rocket::routes;
|
||||
|
@ -12,13 +12,9 @@ pub async fn index_page(ctx: RequestContext) -> StringResponse {
|
|||
h1 { "Hello World!" };
|
||||
);
|
||||
|
||||
render_page(
|
||||
content,
|
||||
"Hello World",
|
||||
ctx,
|
||||
&Shell::new(html! {}, html! {}, Some(String::new())),
|
||||
)
|
||||
.await
|
||||
Shell::new(Nothing(), Nothing(), Nothing())
|
||||
.render_page(content, "Hello World", ctx)
|
||||
.await
|
||||
}
|
||||
|
||||
#[rocket::launch]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue