From 019961ed77d1ec5f9674d11232e4a49812d59c54 Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Sun, 31 May 2026 00:51:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Actualiza=20rutas=20de=20assets?= =?UTF-8?q?=20est=C3=A1ticos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Los CSS e imágenes propios de PageTop se sirven bajo `/pagetop/`, por lo que las referencias a `/css/` e `/img/` deben incluir ese prefijo. --- extensions/pagetop-aliner/src/lib.rs | 4 ++-- src/base/component/intro.rs | 2 +- src/base/theme/basic.rs | 4 ++-- static/css/intro.css | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/extensions/pagetop-aliner/src/lib.rs b/extensions/pagetop-aliner/src/lib.rs index e88a9142..42a89e48 100644 --- a/extensions/pagetop-aliner/src/lib.rs +++ b/extensions/pagetop-aliner/src/lib.rs @@ -117,12 +117,12 @@ impl Extension for Aliner { impl Theme for Aliner { fn before_render_page_body(&self, page: &mut Page) { page.alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/normalize.css") + StyleSheet::from("/pagetop/css/normalize.css") .with_version("8.0.1") .with_weight(-99), )) .alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/basic.css") + StyleSheet::from("/pagetop/css/basic.css") .with_version(PAGETOP_VERSION) .with_weight(-99), )) diff --git a/src/base/component/intro.rs b/src/base/component/intro.rs index a7ccb2c4..63902f10 100644 --- a/src/base/component/intro.rs +++ b/src/base/component/intro.rs @@ -114,7 +114,7 @@ impl Component for Intro { fn prepare(&self, cx: &mut Context) -> Result { cx.alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/intro.css").with_version(PAGETOP_VERSION), + StyleSheet::from("/pagetop/css/intro.css").with_version(PAGETOP_VERSION), )); if *self.opening() == IntroOpening::PageTop { cx.alter_assets(AssetsOp::AddJavaScript(JavaScript::on_load_async("intro-js", |cx| diff --git a/src/base/theme/basic.rs b/src/base/theme/basic.rs index 34f9088b..3e6e99e9 100644 --- a/src/base/theme/basic.rs +++ b/src/base/theme/basic.rs @@ -13,12 +13,12 @@ impl Extension for Basic { impl Theme for Basic { fn before_render_page_body(&self, page: &mut Page) { page.alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/normalize.css") + StyleSheet::from("/pagetop/css/normalize.css") .with_version("8.0.1") .with_weight(-99), )) .alter_assets(AssetsOp::AddStyleSheet( - StyleSheet::from("/css/basic.css") + StyleSheet::from("/pagetop/css/basic.css") .with_version(PAGETOP_VERSION) .with_weight(-99), )) diff --git a/static/css/intro.css b/static/css/intro.css index 1cc03ffc..00fe0d21 100644 --- a/static/css/intro.css +++ b/static/css/intro.css @@ -1,8 +1,8 @@ :root { - --intro-bg-img: url('/img/intro-header.jpg'); - --intro-bg-img-set: image-set(url('/img/intro-header.avif') type('image/avif'), url('/img/intro-header.webp') type('image/webp'), var(--intro-bg-img) type('image/jpeg')); - --intro-bg-img-sm: url('/img/intro-header-sm.jpg'); - --intro-bg-img-sm-set: image-set(url('/img/intro-header-sm.avif') type('image/avif'), url('/img/intro-header-sm.webp') type('image/webp'), var(--intro-bg-img-sm) type('image/jpeg')); + --intro-bg-img: url('/pagetop/img/intro-header.jpg'); + --intro-bg-img-set: image-set(url('/pagetop/img/intro-header.avif') type('image/avif'), url('/pagetop/img/intro-header.webp') type('image/webp'), var(--intro-bg-img) type('image/jpeg')); + --intro-bg-img-sm: url('/pagetop/img/intro-header-sm.jpg'); + --intro-bg-img-sm-set: image-set(url('/pagetop/img/intro-header-sm.avif') type('image/avif'), url('/pagetop/img/intro-header-sm.webp') type('image/webp'), var(--intro-bg-img-sm) type('image/jpeg')); --intro-bg-color: #7a430e; --intro-bg-block-1: #ffb84b; --intro-bg-block-2: #ffc66f;