👽️ Apply latest changes to the API
This commit is contained in:
parent
03d538eb41
commit
718bc5d769
4 changed files with 114 additions and 105 deletions
|
|
@ -4,150 +4,150 @@ use pagetop::prelude::*;
|
|||
|
||||
pub async fn summary(request: service::HttpRequest) -> ResultPage<Markup, FatalError> {
|
||||
let top_menu = Menu::new()
|
||||
.with_item(menu::Item::label(L10n::t("module_name", &LOCALES_ADMIN)))
|
||||
.with_item(menu::Item::label(L10n::n("Ejemplo \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Ejemplo \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::t("module_name", &LOCALES_ADMIN)))
|
||||
.add_item(menu::Item::label(L10n::n("Ejemplo \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Ejemplo \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Ejemplo \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
))
|
||||
.with_item(menu::Item::submenu(
|
||||
.add_item(menu::Item::submenu(
|
||||
L10n::n("Ejemplo Submenú"),
|
||||
menu::Submenu::new()
|
||||
.with_title(L10n::n("Título submenú"))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
))
|
||||
.with_item(menu::Item::submenu(
|
||||
.add_item(menu::Item::submenu(
|
||||
L10n::n("Otro submenú con un texto muy, pero que muy largo"),
|
||||
menu::Submenu::new()
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
))
|
||||
.with_item(menu::Item::megamenu(
|
||||
.add_item(menu::Item::megamenu(
|
||||
L10n::n("Ejemplo Megamenú 1"),
|
||||
menu::Megamenu::new()
|
||||
.with_group(
|
||||
.add_group(
|
||||
menu::Group::new()
|
||||
.with_element(menu::Element::submenu(
|
||||
.add_element(menu::Element::submenu(
|
||||
menu::Submenu::new()
|
||||
.with_title(L10n::n("Título submenú"))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
)),
|
||||
))
|
||||
.with_element(menu::Element::submenu(
|
||||
.add_element(menu::Element::submenu(
|
||||
menu::Submenu::new()
|
||||
.with_title(L10n::n("Título submenú"))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
)),
|
||||
)),
|
||||
)
|
||||
.with_group(
|
||||
menu::Group::new().with_element(menu::Element::submenu(
|
||||
.add_group(
|
||||
menu::Group::new().add_element(menu::Element::submenu(
|
||||
menu::Submenu::new()
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
)),
|
||||
)
|
||||
.with_group(
|
||||
.add_group(
|
||||
menu::Group::new()
|
||||
.with_element(menu::Element::submenu(
|
||||
.add_element(menu::Element::submenu(
|
||||
menu::Submenu::new()
|
||||
.with_title(L10n::n("Título submenú"))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
)),
|
||||
))
|
||||
.with_element(menu::Element::submenu(
|
||||
.add_element(menu::Element::submenu(
|
||||
menu::Submenu::new()
|
||||
.with_title(L10n::n("Título submenú"))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
)),
|
||||
)),
|
||||
)
|
||||
.with_group(
|
||||
menu::Group::new().with_element(menu::Element::submenu(
|
||||
.add_group(
|
||||
menu::Group::new().add_element(menu::Element::submenu(
|
||||
menu::Submenu::new()
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\"")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción \"Link\""), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(
|
||||
.add_item(menu::Item::link_blank(
|
||||
L10n::n("Opción \"LinkBlank\""),
|
||||
|_| "https://www.google.es",
|
||||
))
|
||||
.with_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
.add_item(menu::Item::label(L10n::n("Opción \"Label\""))),
|
||||
)),
|
||||
),
|
||||
));
|
||||
|
||||
let side_menu = Menu::new()
|
||||
.with_item(menu::Item::label(L10n::n("Opción 1")))
|
||||
.with_item(menu::Item::link(L10n::n("Opción 2"), |_| {
|
||||
.add_item(menu::Item::label(L10n::n("Opción 1")))
|
||||
.add_item(menu::Item::link(L10n::n("Opción 2"), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::link_blank(L10n::n("Opción 3"), |_| {
|
||||
.add_item(menu::Item::link_blank(L10n::n("Opción 3"), |_| {
|
||||
"https://www.google.es"
|
||||
}))
|
||||
.with_item(menu::Item::submenu(
|
||||
.add_item(menu::Item::submenu(
|
||||
L10n::n("Submenú 1"),
|
||||
menu::Submenu::new()
|
||||
.with_item(menu::Item::label(L10n::n("Opción 1")))
|
||||
.with_item(menu::Item::label(L10n::n("Opción 2"))),
|
||||
.add_item(menu::Item::label(L10n::n("Opción 1")))
|
||||
.add_item(menu::Item::label(L10n::n("Opción 2"))),
|
||||
)) /*
|
||||
.with_item(menu::Item::separator()) */
|
||||
.with_item(menu::Item::submenu(
|
||||
.add_item(menu::Item::separator()) */
|
||||
.add_item(menu::Item::submenu(
|
||||
L10n::n("Submenú 2"),
|
||||
menu::Submenu::new()
|
||||
.with_item(menu::Item::label(L10n::n("Opción 1")))
|
||||
.with_item(menu::Item::label(L10n::n("Opción 2"))),
|
||||
.add_item(menu::Item::label(L10n::n("Opción 1")))
|
||||
.add_item(menu::Item::label(L10n::n("Opción 2"))),
|
||||
))
|
||||
.with_item(menu::Item::label(L10n::n("Opción 4")));
|
||||
.add_item(menu::Item::label(L10n::n("Opción 4")));
|
||||
|
||||
Page::new(request)
|
||||
//.with_context(ContextOp::Theme("Bootsier"))
|
||||
|
|
@ -156,11 +156,11 @@ pub async fn summary(request: service::HttpRequest) -> ResultPage<Markup, FatalE
|
|||
.with_in(
|
||||
"content",
|
||||
flex::Container::new()
|
||||
.with_item(flex::Item::new().with_component(Html::with(html! {
|
||||
.add_item(flex::Item::new().add_component(Html::with(html! {
|
||||
p { "Columna 1"}
|
||||
})))
|
||||
.with_item(flex::Item::new().with_component(top_menu))
|
||||
.with_item(flex::Item::new().with_component(Html::with(html! {
|
||||
.add_item(flex::Item::new().add_component(top_menu))
|
||||
.add_item(flex::Item::new().add_component(Html::with(html! {
|
||||
p { "Columna 3"}
|
||||
}))),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue