use of com.vaadin.flow.component.html.Nav in project sapl-demos by heutelbeck.
the class MainLayout method createNavigation.
private Nav createNavigation() {
Nav nav = new Nav();
nav.addClassNames("border-b", "border-contrast-10", "flex-grow", "overflow-auto");
nav.getElement().setAttribute("aria-labelledby", "views");
H3 views = new H3("Views");
views.addClassNames("flex", "h-m", "items-center", "mx-m", "my-0", "text-s", "text-tertiary");
views.setId("views");
// Wrap the links in a list; improves accessibility
UnorderedList list = new UnorderedList();
list.addClassNames("list-none", "m-0", "p-0");
nav.add(list);
for (RouterLink link : createLinks()) {
ListItem item = new ListItem(link);
list.add(item);
}
return nav;
}
use of com.vaadin.flow.component.html.Nav in project Akros-Marketplace by AkrosAG.
the class MainLayout method createHeaderContent.
private Component createHeaderContent() {
Header header = new Header();
header.addClassNames("bg-base", "border-b", "border-contrast-10", "box-border", "flex", "flex-col", "w-full");
Div layout = new Div();
layout.addClassNames("flex", "h-xl", "items-center", "px-l");
H1 appName = new H1("Akros Marketplace Administration");
appName.addClassNames("my-0", "me-auto", "text-xl");
layout.add(appName);
Nav nav = new Nav();
nav.addClassNames("flex", "gap-s", "overflow-auto", "px-m");
// Wrap the links in a list; improves accessibility
UnorderedList list = new UnorderedList();
list.addClassNames("flex", "list-none", "m-0", "p-0");
nav.add(list);
for (RouterLink link : createLinks()) {
ListItem item = new ListItem(link);
list.add(item);
}
header.add(layout, nav);
return header;
}
use of com.vaadin.flow.component.html.Nav in project isis-lab by apache-isis-committers.
the class _SideMenuLayout method createNavigation.
// -- HELPER
private Nav createNavigation(final Iterable<MenuItemInfo> menuItems) {
Nav nav = new Nav();
nav.addClassNames("border-b", "border-contrast-10", "flex-grow", "overflow-auto");
nav.getElement().setAttribute("aria-labelledby", "views");
// Wrap the links in a list; improves accessibility
UnorderedList list = new UnorderedList();
list.addClassNames("list-none", "m-0", "p-0");
nav.add(list);
menuItems.forEach(list::add);
return nav;
}
use of com.vaadin.flow.component.html.Nav in project isis-lab by apache-isis-committers.
the class _TopMenuLayout method createHeaderContent.
Component createHeaderContent(final Iterable<MenuItemInfo> menuItems) {
Header header = new Header();
header.addClassNames("bg-base", "border-b", "border-contrast-10", "box-border", "flex", "flex-col", "w-full");
Div layout = new Div();
layout.addClassNames("flex", "h-xl", "items-center", "px-l");
H1 appName = new H1("isis-lab-experiments-layout");
appName.addClassNames("my-0", "me-auto", "text-l");
layout.add(appName);
Nav nav = new Nav();
nav.addClassNames("flex", "gap-s", "overflow-auto", "px-m");
// Wrap the links in a list; improves accessibility
UnorderedList list = new UnorderedList();
list.addClassNames("flex", "list-none", "m-0", "p-0");
nav.add(list);
menuItems.forEach(list::add);
header.add(layout, nav);
return header;
}
Aggregations