♻️ (theme): Refactoriza renderizado de temas base
This commit is contained in:
parent
9657672ffd
commit
a2fe2114cd
8 changed files with 79 additions and 47 deletions
|
|
@ -117,7 +117,7 @@ impl Extension for Bootsier {
|
|||
}
|
||||
|
||||
impl Theme for Bootsier {
|
||||
fn after_render_page_body(&self, page: &mut Page) {
|
||||
fn before_render_page_body(&self, page: &mut Page) {
|
||||
page.alter_assets(ContextOp::AddStyleSheet(
|
||||
StyleSheet::from("/bootsier/bs/bootstrap.min.css")
|
||||
.with_version(BOOTSTRAP_VERSION)
|
||||
|
|
@ -129,4 +129,14 @@ impl Theme for Bootsier {
|
|||
.with_weight(-90),
|
||||
));
|
||||
}
|
||||
|
||||
fn render_page_body(&self, page: &mut Page) -> Markup {
|
||||
theme::Container::new()
|
||||
.with_id("container-wrapper")
|
||||
.with_width(theme::container::Width::FluidMax(
|
||||
config::SETTINGS.bootsier.max_width,
|
||||
))
|
||||
.add_child(Template::named(page.template()))
|
||||
.render(page.context())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue