💄 Mejora alineación del texto en ejemplos
This commit is contained in:
parent
12e617f35b
commit
76b980017d
2 changed files with 10 additions and 2 deletions
|
|
@ -14,7 +14,11 @@ async fn hello_name(
|
||||||
) -> ResultPage<Markup, ErrorPage> {
|
) -> ResultPage<Markup, ErrorPage> {
|
||||||
let name = path.into_inner();
|
let name = path.into_inner();
|
||||||
Page::new(request)
|
Page::new(request)
|
||||||
.add_child(Html::with(move |_| html! { h1 { "Hello " (name) "!" } }))
|
.add_child(Html::with(move |_| {
|
||||||
|
html! {
|
||||||
|
h1 style="text-align: center;" { "Hello " (name) "!" }
|
||||||
|
}
|
||||||
|
}))
|
||||||
.render()
|
.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,11 @@ impl Extension for HelloWorld {
|
||||||
|
|
||||||
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
|
||||||
Page::new(request)
|
Page::new(request)
|
||||||
.add_child(Html::with(|_| html! { h1 { "Hello World!" } }))
|
.add_child(Html::with(|_| {
|
||||||
|
html! {
|
||||||
|
h1 style="text-align: center;" { "Hello World!" }
|
||||||
|
}
|
||||||
|
}))
|
||||||
.render()
|
.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue