💥 Función located() pasa a at() en activos
This commit is contained in:
parent
a9a70fca46
commit
44550edafa
10 changed files with 13 additions and 13 deletions
|
|
@ -24,7 +24,7 @@ impl ThemeTrait for Aliner {
|
||||||
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("/aliner/css/styles.css").with_weight(-99),
|
StyleSheet::at("/aliner/css/styles.css").with_weight(-99),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,12 +46,12 @@ 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::at("/bootsier/css/bootstrap.min.css")
|
||||||
.with_version("5.1.3")
|
.with_version("5.1.3")
|
||||||
.with_weight(-99),
|
.with_weight(-99),
|
||||||
))
|
))
|
||||||
.alter_context(ContextOp::AddJavaScript(
|
.alter_context(ContextOp::AddJavaScript(
|
||||||
JavaScript::located("/bootsier/js/bootstrap.bundle.min.js")
|
JavaScript::at("/bootsier/js/bootstrap.bundle.min.js")
|
||||||
.with_version("5.1.3")
|
.with_version("5.1.3")
|
||||||
.with_weight(-99),
|
.with_weight(-99),
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,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::at("/bulmix/css/bulma.min.css")
|
||||||
.with_version("0.9.4")
|
.with_version("0.9.4")
|
||||||
.with_weight(-99),
|
.with_weight(-99),
|
||||||
));
|
));
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ impl ModuleTrait for HomeDemo {
|
||||||
async fn demo(request: service::HttpRequest) -> ResultPage<Markup, FatalError> {
|
async fn demo(request: service::HttpRequest) -> ResultPage<Markup, FatalError> {
|
||||||
Page::new(request)
|
Page::new(request)
|
||||||
.with_title(L10n::t("page_title", &LOCALE_HOMEDEMO))
|
.with_title(L10n::t("page_title", &LOCALE_HOMEDEMO))
|
||||||
.with_context(ContextOp::AddStyleSheet(StyleSheet::located(
|
.with_context(ContextOp::AddStyleSheet(StyleSheet::at(
|
||||||
"/homedemo/css/styles.css",
|
"/homedemo/css/styles.css",
|
||||||
)))
|
)))
|
||||||
.with_body_classes(ClassesOp::AddFirst, "default-homepage")
|
.with_body_classes(ClassesOp::AddFirst, "default-homepage")
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ impl JQuery {
|
||||||
fn before_render_page(page: &mut Page) {
|
fn before_render_page(page: &mut Page) {
|
||||||
if let Some(true) = page.context().get_param::<bool>(PARAM_JQUERY) {
|
if let Some(true) = page.context().get_param::<bool>(PARAM_JQUERY) {
|
||||||
page.context().alter(ContextOp::AddJavaScript(
|
page.context().alter(ContextOp::AddJavaScript(
|
||||||
JavaScript::located("/jquery/jquery.min.js")
|
JavaScript::at("/jquery/jquery.min.js")
|
||||||
.with_version("3.6.0")
|
.with_version("3.6.0")
|
||||||
.with_weight(isize::MIN)
|
.with_weight(isize::MIN)
|
||||||
.with_mode(ModeJS::Normal),
|
.with_mode(ModeJS::Normal),
|
||||||
|
|
|
||||||
|
|
@ -194,13 +194,13 @@ impl ComponentTrait for MegaMenu {
|
||||||
|
|
||||||
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
|
fn prepare_component(&self, cx: &mut Context) -> PrepareMarkup {
|
||||||
cx.alter(ContextOp::AddStyleSheet(
|
cx.alter(ContextOp::AddStyleSheet(
|
||||||
StyleSheet::located("/megamenu/css/menu.css").with_version("1.1.1"),
|
StyleSheet::at("/megamenu/css/menu.css").with_version("1.1.1"),
|
||||||
))
|
))
|
||||||
.alter(ContextOp::AddStyleSheet(
|
.alter(ContextOp::AddStyleSheet(
|
||||||
StyleSheet::located("/megamenu/css/menu-clean.css").with_version("1.1.1"),
|
StyleSheet::at("/megamenu/css/menu-clean.css").with_version("1.1.1"),
|
||||||
))
|
))
|
||||||
.alter(ContextOp::AddJavaScript(
|
.alter(ContextOp::AddJavaScript(
|
||||||
JavaScript::located("/megamenu/js/menu.min.js").with_version("1.1.1"),
|
JavaScript::at("/megamenu/js/menu.min.js").with_version("1.1.1"),
|
||||||
));
|
));
|
||||||
JQuery.enable_jquery(cx);
|
JQuery.enable_jquery(cx);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ impl ComponentTrait for Icon {
|
||||||
|
|
||||||
fn before_prepare_component(&mut self, cx: &mut Context) {
|
fn before_prepare_component(&mut self, cx: &mut Context) {
|
||||||
cx.alter(ContextOp::AddStyleSheet(
|
cx.alter(ContextOp::AddStyleSheet(
|
||||||
StyleSheet::located("/minimal/icons/bootstrap-icons.css").with_version("1.8.2"),
|
StyleSheet::at("/minimal/icons/bootstrap-icons.css").with_version("1.8.2"),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ impl ThemeTrait for Basic {
|
||||||
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("/theme/css/normalize.min.css").with_version("8.0.1"),
|
StyleSheet::at("/theme/css/normalize.min.css").with_version("8.0.1"),
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ impl AssetsTrait for JavaScript {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl JavaScript {
|
impl JavaScript {
|
||||||
pub fn located<S>(path: S) -> Self
|
pub fn at<S>(path: S) -> Self
|
||||||
where
|
where
|
||||||
S: Into<String>,
|
S: Into<String>,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ impl AssetsTrait for StyleSheet {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl StyleSheet {
|
impl StyleSheet {
|
||||||
pub fn located<S>(path: S) -> Self
|
pub fn at<S>(path: S) -> Self
|
||||||
where
|
where
|
||||||
S: Into<String>,
|
S: Into<String>,
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue