♻️ (pagetop): Sustituye StyleSheet::inline

- `StyleSheet::inline` se resuelve ahora con `ResponsiveStyles`.
- `StyleSheet` se simplifica a sólo hojas de estilo externas.
- `ResponsiveStyles` añade `add_styles()` para declarar varias
  propiedades en una sola llamada.
- `AssetsOp` gana un constructor por variante y conversiones
  "From<Favicon/Preload/StyleSheet/JavaScript>" para pasarlos
  directamente a `with_assets()`.
This commit is contained in:
Manuel Cillero 2026-09-12 20:44:17 +02:00
parent 0b8f3f3000
commit 64113aff09
21 changed files with 764 additions and 497 deletions

View file

@ -109,15 +109,15 @@ use std::ops::Deref;
/// impl Theme for MyTheme {
/// fn before_render_page_body(&self, page: &mut Page) {
/// page
/// .alter_assets(AssetsOp::AddStyleSheet(
/// StyleSheet::from("/pagetop/css/normalize.css").with_version("8.0.1"),
/// ))
/// .alter_assets(AssetsOp::AddStyleSheet(
/// .alter_assets(
/// StyleSheet::from("/pagetop/css/normalize.css").with_version("8.0.1")
/// )
/// .alter_assets(
/// StyleSheet::from("/pagetop/css/basic.css").with_version(PAGETOP_VERSION),
/// ))
/// .alter_assets(AssetsOp::AddStyleSheet(
/// )
/// .alter_assets(
/// StyleSheet::from("/mytheme/styles.css").with_version(env!("CARGO_PKG_VERSION")),
/// ));
/// );
/// }
/// }
/// ```