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