Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render(_ctx: b.IBobrilCtx, me: b.IBobrilNode) {
me.children = section(
{
header: "Pagination",
id: "pagination",
lead: [
`Provide pagination links for your site or app with the multi-page pagination component, or the simpler `,
b.link(bs.A({}, "pager alternative"), "pagination-pager"),
`.`
]
},
[paginationDefault(), pager()]
);
}
});
{},
bs.A(
{ href: texts.bobrilLink, target: bs.Target.Blank },
texts.bobril
)
),
bs.Li(
{},
bs.A(
{ href: texts.bootsrapLink, target: bs.Target.Blank },
texts.bootstrap
)
),
bs.Li(
{ active: b.isActive("donate") },
b.link(
bs.A({ onClick: handleMenuItemClick }, texts.donate),
"donate"
)
)
]),
bs.P({}, [
`Written by `,
bs.A(
{ href: texts.twitterLink, target: bs.Target.Blank },
texts.twitter
),
` .
Code licensed `,
bs.A({ href: texts.mitLink, target: bs.Target.Blank }, texts.mit),
`.`
])
bs.NavbarNavItem(
{ active: b.isActive("css") },
b.link(
bs.A(
{
href: "javascript:void(0)",
onClick: handleMenuItemClick
},
"CSS"
),
"css"
)
),
bs.NavbarNavItem(
{ active: b.isActive("components") },
b.link(
bs.A(
{
href: "javascript:void(0)",
onClick: handleMenuItemClick
},
"Components"
),
"components"
)
),
bs.NavbarNavItem(
{ active: b.isActive("live-components") },
b.link(
bs.A(
{
href: "javascript:void(0)",
bs.E(
{
style: [styles.bsCallout, styles.bsCalloutWarning],
attrs: { id: "callout-navbar-overflow" }
},
[
bs.H4({}, [`Overflowing content`]),
bs.P({}, [
`Since Bootstrap doesn't know how much space the content in your navbar needs,
you might run into issues with content wrapping into a second row. To resolve this, you can:`
]),
bs.Ol({ type: bs.OlType.a }, [
bs.Li({}, "Reduce the amount or width of navbar items."),
bs.Li({}, [
"Hide certain navbar items at certain screen sizes using ",
b.link(
bs.A({}, "responsive utility classes"),
"responsive-utilities-styles"
),
"."
]),
bs.Li(
{},
`Change the point at which your navbar switches between collapsed and horizontal mode.`
)
])
]
),
bs.E({ style: styles.bsExample }, [
bs.Navbar({}, [
bs.Container({ fluid: true }, [
bs.NavbarHeader({}, [
)
),
bs.NavbarNavItem(
{},
bs.A(
{
href: texts.bootsrapLink,
target: bs.Target.Blank,
onClick: handleMenuItemClick
},
texts.bootstrap
)
),
bs.NavbarNavItem(
{ active: b.isActive("donate") },
b.link(
bs.A({ onClick: handleMenuItemClick }, texts.donate),
"donate"
)
)
])
])
)
])
]
);
}
bs.Span({ style: bs.navStyles.iconBar }),
bs.Span({ style: bs.navStyles.iconBar })
]
),
b.link(
bs.NavbarBrand({ href: "javascript:void(0)" }, "Bobrilstrap"),
"bobrilstrap"
)
]),
bs.Collapse(
{ collapsed: collapsedMenu() },
bs.NavbarCollapse({ id: "bs-navbar" }, [
bs.NavbarNav({}, [
bs.NavbarNavItem(
{ active: b.isActive("css") },
b.link(
bs.A(
{
href: "javascript:void(0)",
onClick: handleMenuItemClick
},
"CSS"
),
"css"
)
),
bs.NavbarNavItem(
{ active: b.isActive("components") },
b.link(
bs.A(
{
href: "javascript:void(0)",
render(ctx: ICtx, me: b.IBobrilNode) {
me.children = bs.Li(
{
active: !endSwith(ctx.data.targetId, "-top") && ctx.active
},
[
b.link(
bs.A(
{
onClick: () => {
if (endSwith(ctx.data.targetId, "-top")) window.scrollTo(0, 0);
}
},
ctx.data.title
),
ctx.data.targetId
),
!!ctx.data.subs &&
sideBarItems({ items: ctx.data.subs, nextId: ctx.data.nextId })
]
);
},
postInitDom(ctx: ICtx) {