✨ [bootsier] Nuevos componentes Navbar y Offcanvas
This commit is contained in:
parent
83e09c38ce
commit
db13a6ab8b
17 changed files with 743 additions and 16 deletions
|
|
@ -4,7 +4,7 @@ description = "An opinionated web framework to build modular Server-Side Renderi
|
|||
theme = "Bootsier"
|
||||
|
||||
[bootsier]
|
||||
max_width = "1600px"
|
||||
max_width = "1520px"
|
||||
|
||||
[log]
|
||||
rolling = "Daily"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
use pagetop::prelude::*;
|
||||
|
||||
use pagetop_bootsier::bs::*;
|
||||
|
||||
include_files!(BUNDLE_DOC => doc);
|
||||
|
||||
include_locales!(LOCALES_WEBSITE);
|
||||
|
|
@ -25,6 +27,34 @@ impl PackageTrait for PageTopWebSite {
|
|||
}
|
||||
|
||||
fn init(&self) {
|
||||
let nav = Navbar::new().with_nav(TypedOp::Add(TypedComponent::with(
|
||||
navbar::Nav::new()
|
||||
.with_item(navbar::Item::link(
|
||||
L10n::t("menu_home", &LOCALES_WEBSITE),
|
||||
|cx| match cx.langid().language.as_str() {
|
||||
"es" => "/es",
|
||||
_ => "/",
|
||||
},
|
||||
))
|
||||
.with_item(navbar::Item::link(
|
||||
L10n::t("menu_documentation", &LOCALES_WEBSITE),
|
||||
|cx| match cx.langid().language.as_str() {
|
||||
"es" => "/doc/latest/es",
|
||||
_ => "/doc/latest/en",
|
||||
},
|
||||
))
|
||||
.with_item(navbar::Item::link_blank(
|
||||
L10n::t("menu_api", &LOCALES_WEBSITE),
|
||||
|_| "https://docs.rs/pagetop",
|
||||
))
|
||||
.with_item(navbar::Item::link_blank(
|
||||
L10n::t("menu_code", &LOCALES_WEBSITE),
|
||||
|_| "https://github.com/manuelcillero/pagetop",
|
||||
)),
|
||||
)));
|
||||
|
||||
InRegion::Content.add(ChildComponent::with(nav));
|
||||
|
||||
/*
|
||||
let branding = Branding::new()
|
||||
.with_logo(Some(Image::pagetop()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue