diff --git a/packages/pagetop-bootsier/src/lib.rs b/packages/pagetop-bootsier/src/lib.rs index 24b01c34..ceb1abd0 100644 --- a/packages/pagetop-bootsier/src/lib.rs +++ b/packages/pagetop-bootsier/src/lib.rs @@ -32,6 +32,14 @@ impl ThemeTrait for Bootsier { ] } + #[rustfmt::skip] + fn builtin_classes(&self, builtin: ThemeBuiltInClasses) -> Option<&str> { + match builtin { + ThemeBuiltInClasses::RegionContainer => Some("container"), + _ => None, + } + } + fn prepare_body(&self, page: &mut Page) -> Markup { match page.template() { "admin" => html! { @@ -79,120 +87,45 @@ impl ThemeTrait for Bootsier { )); } + #[rustfmt::skip] fn before_prepare_component(&self, component: &mut dyn ComponentTrait, _cx: &mut Context) { match component.type_id() { t if t == TypeId::of::() => { if let Some(i) = component_as_mut::(component) { - match i.font_size() { - FontSize::ExtraLarge => { - i.replace_classes(i.font_size().to_string(), "fs-1"); - } - FontSize::XxLarge => { - i.replace_classes(i.font_size().to_string(), "fs-2"); - } - FontSize::XLarge => { - i.replace_classes(i.font_size().to_string(), "fs-3"); - } - FontSize::Large => { - i.replace_classes(i.font_size().to_string(), "fs-4"); - } - FontSize::Medium => { - i.replace_classes(i.font_size().to_string(), "fs-5"); - } - _ => {} - }; + i.replace_classes(i.font_size().to_string(), with_font(i.font_size())); } } t if t == TypeId::of::