♻️ Código revisado con cargo fmt/clippy
This commit is contained in:
parent
b02c729864
commit
0ec0f1a961
7 changed files with 25 additions and 14 deletions
|
|
@ -6,7 +6,10 @@ pub async fn summary(request: server::HttpRequest) -> ResultPage<Markup, FatalEr
|
|||
let top_menu = MegaMenu::new()
|
||||
.with_item(MegaMenuItem::label(l("module_name").as_str()))
|
||||
.with_item(MegaMenuItem::link("Opción 2", "https://www.google.es"))
|
||||
.with_item(MegaMenuItem::link_blank("Opción 3", "https://www.google.es"))
|
||||
.with_item(MegaMenuItem::link_blank(
|
||||
"Opción 3",
|
||||
"https://www.google.es",
|
||||
))
|
||||
.with_item(MegaMenuItem::submenu(
|
||||
"Submenú 1",
|
||||
MegaMenu::new()
|
||||
|
|
@ -25,7 +28,10 @@ pub async fn summary(request: server::HttpRequest) -> ResultPage<Markup, FatalEr
|
|||
let side_menu = MegaMenu::new()
|
||||
.with_item(MegaMenuItem::label("Opción 1"))
|
||||
.with_item(MegaMenuItem::link("Opción 2", "https://www.google.es"))
|
||||
.with_item(MegaMenuItem::link_blank("Opción 3", "https://www.google.es"))
|
||||
.with_item(MegaMenuItem::link_blank(
|
||||
"Opción 3",
|
||||
"https://www.google.es",
|
||||
))
|
||||
.with_item(MegaMenuItem::submenu(
|
||||
"Submenú 1",
|
||||
MegaMenu::new()
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
fn main() -> std::io::Result<()> {
|
||||
pagetop_build::bundle_resources("./static", "mengamenu", None)
|
||||
pagetop_build::bundle_resources("./static", "megamenu", None)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
pub mod saturn;
|
||||
|
||||
pub mod menu;
|
||||
|
||||
pub mod homepage;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
mod module;
|
||||
pub use module::{BaseModule, ModuleStaticRef, ModuleTrait};
|
||||
mod definition;
|
||||
pub use definition::{BaseModule, ModuleStaticRef, ModuleTrait};
|
||||
|
||||
mod theme;
|
||||
pub use theme::{ThemeStaticRef, ThemeTrait};
|
||||
|
|
|
|||
|
|
@ -95,7 +95,10 @@ fn add_to_enabled(list: &mut Vec<ModuleStaticRef>, module: ModuleStaticRef) {
|
|||
|
||||
if let Some(theme) = module.theme() {
|
||||
let mut registered_themes = THEMES.write().unwrap();
|
||||
if !registered_themes.iter().any(|t| t.handle() == theme.handle()) {
|
||||
if !registered_themes
|
||||
.iter()
|
||||
.any(|t| t.handle() == theme.handle())
|
||||
{
|
||||
registered_themes.push(theme);
|
||||
trace::debug!("Enabling \"{}\" theme", theme.single_name());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue