👽️ Apply last MegaMenu API changes
This commit is contained in:
parent
7b821da411
commit
98f85b54b1
1 changed files with 31 additions and 35 deletions
|
|
@ -1,59 +1,55 @@
|
||||||
use crate::LOCALES_ADMIN;
|
use crate::LOCALES_ADMIN;
|
||||||
|
|
||||||
use pagetop::prelude::*;
|
use pagetop::prelude::*;
|
||||||
use pagetop_megamenu::component::{MegaMenu, MegaMenuItem};
|
use pagetop_megamenu::component::{MegaItem, MegaMenu};
|
||||||
use pagetop_minimal::component::*;
|
use pagetop_minimal::component::*;
|
||||||
|
|
||||||
pub async fn summary(request: service::HttpRequest) -> ResultPage<Markup, FatalError> {
|
pub async fn summary(request: service::HttpRequest) -> ResultPage<Markup, FatalError> {
|
||||||
let top_menu = MegaMenu::new()
|
let top_menu = MegaMenu::new()
|
||||||
.with_item(MegaMenuItem::label(L10n::t("module_name", &LOCALES_ADMIN)))
|
.with_item(MegaItem::label(L10n::t("module_name", &LOCALES_ADMIN)))
|
||||||
.with_item(MegaMenuItem::link(
|
.with_item(MegaItem::link(L10n::n("Opción 2"), |_| {
|
||||||
L10n::n("Opción 2"),
|
"https://www.google.es"
|
||||||
"https://www.google.es",
|
}))
|
||||||
))
|
.with_item(MegaItem::link_blank(L10n::n("Opción 3"), |_| {
|
||||||
.with_item(MegaMenuItem::link_blank(
|
"https://www.google.es"
|
||||||
L10n::n("Opción 3"),
|
}))
|
||||||
"https://www.google.es",
|
.with_item(MegaItem::submenu(
|
||||||
))
|
|
||||||
.with_item(MegaMenuItem::submenu(
|
|
||||||
L10n::n("Submenú 1"),
|
L10n::n("Submenú 1"),
|
||||||
MegaMenu::new()
|
MegaMenu::new()
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 1")))
|
.with_item(MegaItem::label(L10n::n("Opción 1")))
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 2"))),
|
.with_item(MegaItem::label(L10n::n("Opción 2"))),
|
||||||
))
|
))
|
||||||
.with_item(MegaMenuItem::separator())
|
.with_item(MegaItem::separator())
|
||||||
.with_item(MegaMenuItem::submenu(
|
.with_item(MegaItem::submenu(
|
||||||
L10n::n("Submenú 2"),
|
L10n::n("Submenú 2"),
|
||||||
MegaMenu::new()
|
MegaMenu::new()
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 1")))
|
.with_item(MegaItem::label(L10n::n("Opción 1")))
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 2"))),
|
.with_item(MegaItem::label(L10n::n("Opción 2"))),
|
||||||
))
|
))
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 4")));
|
.with_item(MegaItem::label(L10n::n("Opción 4")));
|
||||||
|
|
||||||
let side_menu = MegaMenu::new()
|
let side_menu = MegaMenu::new()
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 1")))
|
.with_item(MegaItem::label(L10n::n("Opción 1")))
|
||||||
.with_item(MegaMenuItem::link(
|
.with_item(MegaItem::link(L10n::n("Opción 2"), |_| {
|
||||||
L10n::n("Opción 2"),
|
"https://www.google.es"
|
||||||
"https://www.google.es",
|
}))
|
||||||
))
|
.with_item(MegaItem::link_blank(L10n::n("Opción 3"), |_| {
|
||||||
.with_item(MegaMenuItem::link_blank(
|
"https://www.google.es"
|
||||||
L10n::n("Opción 3"),
|
}))
|
||||||
"https://www.google.es",
|
.with_item(MegaItem::submenu(
|
||||||
))
|
|
||||||
.with_item(MegaMenuItem::submenu(
|
|
||||||
L10n::n("Submenú 1"),
|
L10n::n("Submenú 1"),
|
||||||
MegaMenu::new()
|
MegaMenu::new()
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 1")))
|
.with_item(MegaItem::label(L10n::n("Opción 1")))
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 2"))),
|
.with_item(MegaItem::label(L10n::n("Opción 2"))),
|
||||||
))
|
))
|
||||||
.with_item(MegaMenuItem::separator())
|
.with_item(MegaItem::separator())
|
||||||
.with_item(MegaMenuItem::submenu(
|
.with_item(MegaItem::submenu(
|
||||||
L10n::n("Submenú 2"),
|
L10n::n("Submenú 2"),
|
||||||
MegaMenu::new()
|
MegaMenu::new()
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 1")))
|
.with_item(MegaItem::label(L10n::n("Opción 1")))
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 2"))),
|
.with_item(MegaItem::label(L10n::n("Opción 2"))),
|
||||||
))
|
))
|
||||||
.with_item(MegaMenuItem::label(L10n::n("Opción 4")));
|
.with_item(MegaItem::label(L10n::n("Opción 4")));
|
||||||
|
|
||||||
Page::new(request)
|
Page::new(request)
|
||||||
.with_context(ContextOp::Theme("Bootsier"))
|
.with_context(ContextOp::Theme("Bootsier"))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue