👽️ Aplica cambio de uso de estilos y javascripts

This commit is contained in:
Manuel Cillero 2023-06-26 22:28:28 +02:00
parent ea782f820d
commit bf356774f8
4 changed files with 15 additions and 20 deletions

View file

@ -45,13 +45,10 @@ impl ThemeTrait for Bootsier {
fn before_prepare_page(&self, page: &mut Page) { fn before_prepare_page(&self, page: &mut Page) {
page.alter_favicon(Some(Favicon::new().with_icon("/theme/favicon.ico"))) page.alter_favicon(Some(Favicon::new().with_icon("/theme/favicon.ico")))
.alter_context(ContextOp::AddStyleSheet( .alter_context(ContextOp::AddStyleSheet(
StyleSheet::located("/bootsier/css/bootstrap.min.css") StyleSheet::located("/bootsier/css/bootstrap.min.css?v=5.1.3").with_weight(-99),
.with_version("5.1.3")
.with_weight(-99),
)) ))
.alter_context(ContextOp::AddJavaScript( .alter_context(ContextOp::AddJavaScript(
JavaScript::located("/bootsier/js/bootstrap.bundle.min.js") JavaScript::located("/bootsier/js/bootstrap.bundle.min.js?v=5.1.3")
.with_version("5.1.3")
.with_weight(-99), .with_weight(-99),
)); ));
pagetop_jquery::JQuery::add_jquery(page.context()); pagetop_jquery::JQuery::add_jquery(page.context());

View file

@ -33,9 +33,7 @@ impl ThemeTrait for Bulmix {
fn before_prepare_page(&self, page: &mut Page) { fn before_prepare_page(&self, page: &mut Page) {
page.alter_favicon(Some(Favicon::new().with_icon("/theme/favicon.ico"))) page.alter_favicon(Some(Favicon::new().with_icon("/theme/favicon.ico")))
.alter_context(ContextOp::AddStyleSheet( .alter_context(ContextOp::AddStyleSheet(
StyleSheet::located("/bulmix/css/bulma.min.css") StyleSheet::located("/bulmix/css/bulma.min.css?v=0.9.4").with_weight(-99),
.with_version("0.9.4")
.with_weight(-99),
)); ));
pagetop_jquery::JQuery::add_jquery(page.context()); pagetop_jquery::JQuery::add_jquery(page.context());
} }

View file

@ -192,15 +192,15 @@ impl ComponentTrait for MegaMenu {
} }
fn prepare_component(&self, rcx: &mut RenderContext) -> PrepareMarkup { fn prepare_component(&self, rcx: &mut RenderContext) -> PrepareMarkup {
rcx.alter(ContextOp::AddStyleSheet( rcx.alter(ContextOp::AddStyleSheet(StyleSheet::located(
StyleSheet::located("/megamenu/css/menu.css").with_version("1.1.1"), "/megamenu/css/menu.css?v=1.1.1",
)) )))
.alter(ContextOp::AddStyleSheet( .alter(ContextOp::AddStyleSheet(StyleSheet::located(
StyleSheet::located("/megamenu/css/menu-clean.css").with_version("1.1.1"), "/megamenu/css/menu-clean.css?v=1.1.1",
)) )))
.alter(ContextOp::AddJavaScript( .alter(ContextOp::AddJavaScript(JavaScript::located(
JavaScript::located("/megamenu/js/menu.min.js").with_version("1.1.1"), "/megamenu/js/menu.min.js?v=1.1.1",
)); )));
pagetop_jquery::JQuery::add_jquery(rcx); pagetop_jquery::JQuery::add_jquery(rcx);
let id = rcx.required_id::<MegaMenu>(self.id()); let id = rcx.required_id::<MegaMenu>(self.id());

View file

@ -29,9 +29,9 @@ impl ComponentTrait for Icon {
} }
fn before_prepare_component(&mut self, rcx: &mut RenderContext) { fn before_prepare_component(&mut self, rcx: &mut RenderContext) {
rcx.alter(ContextOp::AddStyleSheet( rcx.alter(ContextOp::AddStyleSheet(StyleSheet::located(
StyleSheet::located("/minimal/icons/bootstrap-icons.css").with_version("1.8.2"), "/minimal/icons/bootstrap-icons.css?v=1.8.2",
)); )));
} }
fn prepare_component(&self, _: &mut RenderContext) -> PrepareMarkup { fn prepare_component(&self, _: &mut RenderContext) -> PrepareMarkup {