📝 Añade no_run a doctests ilustrativos

This commit is contained in:
Manuel Cillero 2026-06-13 00:31:36 +02:00
parent 41c4379bc3
commit 511149caa7
26 changed files with 57 additions and 57 deletions

View file

@ -10,7 +10,7 @@ use std::sync::Arc;
///
/// # Ejemplo
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let component = Html::with(|_| {
/// html! {
@ -23,7 +23,7 @@ use std::sync::Arc;
///
/// Para renderizar contenido que dependa del contexto, se puede acceder a él dentro del *closure*:
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let component = Html::with(|cx| {
/// let user = cx.param_or("username", "visitor".to_string());

View file

@ -34,14 +34,14 @@ pub enum IntroOpening {
///
/// **Intro mínima por defecto**
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default();
/// ```
///
/// **Título, eslogan y botón personalizados**
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default()
/// .with_title(L10n::l("intro_custom_title"))
@ -54,7 +54,7 @@ pub enum IntroOpening {
///
/// **Sin botón y en modo *Custom* (sin *badges* predefinidos)**
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default()
/// .with_button(None::<(L10n, FnPathByContext)>)
@ -63,7 +63,7 @@ pub enum IntroOpening {
///
/// **Añadir contenidos hijo**
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default()
/// .with_child(
@ -221,7 +221,7 @@ impl Intro {
///
/// # Ejemplo
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default().with_title(L10n::n("Intro title"));
/// ```
@ -235,7 +235,7 @@ impl Intro {
///
/// # Ejemplo
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default().with_slogan(L10n::n("A short slogan"));
/// ```
@ -253,7 +253,7 @@ impl Intro {
///
/// # Ejemplo
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// // Define un botón con texto y una URL fija.
/// let intro = Intro::default().with_button(Some((L10n::n("Start"), |_| "/start".into())));
@ -274,7 +274,7 @@ impl Intro {
///
/// # Ejemplo
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let intro = Intro::default().with_opening(IntroOpening::Custom);
/// ```

View file

@ -47,7 +47,7 @@ impl PoweredBy {
/// Al pasar `Some(valor)` se sobrescribe el texto de copyright por defecto. Al pasar `None` se
/// eliminará, pero en este caso es necesario especificar el tipo explícitamente:
///
/// ```rust
/// ```rust,no_run
/// # use pagetop::prelude::*;
/// let p1 = PoweredBy::default().with_copyright(Some("2001 © Foo Inc."));
/// let p2 = PoweredBy::new().with_copyright(None::<String>);