♻️ Major code restructuring
This commit is contained in:
parent
a96e203bb3
commit
fa66d628a0
221 changed files with 228 additions and 315 deletions
32
src/base/theme/chassis.rs
Normal file
32
src/base/theme/chassis.rs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
use crate::prelude::*;
|
||||
use crate::BaseHandle;
|
||||
|
||||
#[derive(BaseHandle)]
|
||||
pub struct Chassis;
|
||||
|
||||
impl PackageTrait for Chassis {
|
||||
fn name(&self) -> L10n {
|
||||
L10n::n("Chassis")
|
||||
}
|
||||
|
||||
fn theme(&self) -> Option<ThemeRef> {
|
||||
Some(&Chassis)
|
||||
}
|
||||
}
|
||||
|
||||
impl ThemeTrait for Chassis {
|
||||
fn after_prepare_body(&self, page: &mut Page) {
|
||||
page.alter_favicon(Some(Favicon::new().with_icon("/base/favicon.ico")))
|
||||
.alter_context(ContextOp::AddStyleSheet(
|
||||
StyleSheet::at("/base/css/normalize.min.css")
|
||||
.with_version("8.0.1")
|
||||
.with_weight(-90),
|
||||
))
|
||||
.alter_context(ContextOp::AddBaseAssets)
|
||||
.alter_context(ContextOp::AddStyleSheet(
|
||||
StyleSheet::at("/base/css/chassis.css")
|
||||
.with_version("0.0.1")
|
||||
.with_weight(-90),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue