DuxtPageLayout class abstract
Base class for Duxt documentation layouts
Extends jaspr_content's PageLayoutBase with Duxt conventions.
Usage
class DocsLayout extends DuxtPageLayout {
@override
String get name => 'docs-layout';
@override
Component buildHeader(Page page) {
return SiteHeader();
}
@override
Component buildSidebar(Page page) {
return DocsSidebar();
}
@override
Component buildBody(Page page, Component child) {
return div(classes: 'flex', [
buildSidebar(page),
main_(classes: 'flex-1', [child]),
]);
}
}
- Inheritance
-
- Object
- PageLayoutBase
- DuxtPageLayout
Constructors
- DuxtPageLayout()
-
const
Properties
Methods
-
buildBody(
Page page, Component child) → Component -
inherited
- Build the page footer component
-
buildHead(
Page page) → Iterable< Component> -
inherited
-
buildHeader(
Page page) → Component - Build the page header component
-
buildLayout(
Page page, Component child) → Component -
Builds the layout for the given page and child component.
inherited
-
buildSidebar(
Page page) → Component - Build the sidebar navigation component
-
buildToc(
Page page) → Component? - Build the table of contents component (optional)
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited