🧑‍💻 Mejora funcionalidad del componente Html

- Amplía la documentación del componente.
- Aplica la nueva funcionalidad en la página de bienvenida usando el
  nuevo renderizado dinámico con contexto.
- Añade pruebas unitarias para el componente.
This commit is contained in:
Manuel Cillero 2025-08-02 20:26:39 +02:00
parent 3a3e3b810f
commit ef8d16f41f
7 changed files with 155 additions and 27 deletions

View file

@ -24,11 +24,11 @@ impl ExtensionTrait for Welcome {
async fn homepage(request: HttpRequest) -> ResultPage<Markup, ErrorPage> {
let app = &global::SETTINGS.app.name;
Page::new(request)
Page::new(Some(request))
.with_title(L10n::l("welcome_page"))
.with_theme("Basic")
.with_assets(AssetsOp::AddStyleSheet(StyleSheet::from("/css/welcome.css")))
.with_component(Html::with(html! {
.with_component(Html::with(move |_| html! {
div id="main-header" {
header {
h1 id="header-title" aria-label=(L10n::l("welcome_aria").with_arg("app", app)) {