🚧 Retoca nomenclatura
This commit is contained in:
parent
f87b236659
commit
dc3a1d240b
7 changed files with 15 additions and 15 deletions
|
|
@ -114,7 +114,7 @@ impl ComponentsBundle {
|
||||||
.filter(move |&c| c.read().unwrap().handle() == handle)
|
.filter(move |&c| c.read().unwrap().handle() == handle)
|
||||||
}
|
}
|
||||||
|
|
||||||
// ComponentsBundle RENDER.
|
// ComponentsBundle PREPARE.
|
||||||
|
|
||||||
pub fn prepare(&self, rcx: &mut RenderContext) -> Markup {
|
pub fn prepare(&self, rcx: &mut RenderContext) -> Markup {
|
||||||
let mut components = self.0.clone();
|
let mut components = self.0.clone();
|
||||||
|
|
|
||||||
|
|
@ -109,12 +109,12 @@ impl RenderContext {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Context RENDER.
|
/// Context PREPARE.
|
||||||
|
|
||||||
pub fn render(&mut self) -> Markup {
|
pub fn prepare(&mut self) -> Markup {
|
||||||
html! {
|
html! {
|
||||||
(self.stylesheets.render())
|
(self.stylesheets.prepare())
|
||||||
(self.javascripts.render())
|
(self.javascripts.prepare())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,11 +51,11 @@ pub trait ThemeTrait: ModuleTrait + Send + Sync {
|
||||||
meta property=(property) content=(content) {}
|
meta property=(property) content=(content) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
@if let Some(f) = page.favicon() {
|
@if let Some(favicon) = page.favicon() {
|
||||||
(f.render())
|
(favicon.prepare())
|
||||||
}
|
}
|
||||||
|
|
||||||
(page.context().render())
|
(page.context().prepare())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ pub trait AssetsTrait {
|
||||||
|
|
||||||
fn weight(&self) -> isize;
|
fn weight(&self) -> isize;
|
||||||
|
|
||||||
fn render(&self) -> Markup;
|
fn prepare(&self) -> Markup;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
|
@ -39,12 +39,12 @@ impl<T: AssetsTrait> Assets<T> {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn render(&mut self) -> Markup {
|
pub fn prepare(&mut self) -> Markup {
|
||||||
let assets = &mut self.0;
|
let assets = &mut self.0;
|
||||||
assets.sort_by_key(|a| a.weight());
|
assets.sort_by_key(|a| a.weight());
|
||||||
html! {
|
html! {
|
||||||
@for a in assets {
|
@for a in assets {
|
||||||
(a.render())
|
(a.prepare())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ impl AssetsTrait for JavaScript {
|
||||||
self.weight
|
self.weight
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render(&self) -> Markup {
|
fn prepare(&self) -> Markup {
|
||||||
html! {
|
html! {
|
||||||
script type="text/javascript"
|
script type="text/javascript"
|
||||||
src=(crate::concat_string!(self.source, self.prefix, self.version))
|
src=(crate::concat_string!(self.source, self.prefix, self.version))
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ impl AssetsTrait for StyleSheet {
|
||||||
self.weight
|
self.weight
|
||||||
}
|
}
|
||||||
|
|
||||||
fn render(&self) -> Markup {
|
fn prepare(&self) -> Markup {
|
||||||
html! {
|
html! {
|
||||||
link
|
link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
|
|
|
||||||
|
|
@ -80,9 +80,9 @@ impl Favicon {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
// Favicon RENDER.
|
// Favicon PREPARE.
|
||||||
|
|
||||||
pub(crate) fn render(&self) -> Markup {
|
pub(crate) fn prepare(&self) -> Markup {
|
||||||
html! {
|
html! {
|
||||||
@for item in &self.0 {
|
@for item in &self.0 {
|
||||||
(item)
|
(item)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue