💄 Mejora alineación del texto en ejemplos

This commit is contained in:
Manuel Cillero 2025-11-30 11:14:08 +01:00
parent 0b60957935
commit f6ff7f59f9
2 changed files with 10 additions and 2 deletions

View file

@ -14,7 +14,11 @@ async fn hello_name(
) -> ResultPage<Markup, ErrorPage> {
let name = path.into_inner();
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()
}

View file

@ -10,7 +10,11 @@ impl Extension for HelloWorld {
async fn hello_world(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
Page::new(request)
.add_child(Html::with(|_| html! { h1 { "Hello World!" } }))
.add_child(Html::with(|_| {
html! {
h1 style="text-align: center;" { "Hello World!" }
}
}))
.render()
}