diff --git a/src/app/examples/example-module.ts b/src/app/examples/example-module.ts index 29859feb0..8d4974103 100644 --- a/src/app/examples/example-module.ts +++ b/src/app/examples/example-module.ts @@ -54,6 +54,7 @@ import { } from './slide-toggle-configurable/slide-toggle-configurable-example'; import {IconSvgExample} from './icon-svg-example/icon-svg-example'; import {SidenavFabExample} from './sidenav-fab/sidenav-fab-example'; +import {SidenavNavigationListExample} from './sidenav-navigation-list/sidenav-navigation-list-example'; import {CardOverviewExample} from './card-overview/card-overview-example'; import { ProgressSpinnerOverviewExample @@ -135,6 +136,7 @@ export const EXAMPLE_COMPONENTS = { 'select-overview': {title: 'Basic select', component: SelectOverviewExample}, 'select-form': {title: 'Select in a form', component: SelectFormExample}, 'sidenav-fab': {title: 'Sidenav with a FAB', component: SidenavFabExample}, + 'sidenav-navigation-list':{title: 'Sidenav with Navigation List',component:SidenavNavigationListExample}, 'sidenav-overview': {title: 'Basic sidenav', component: SidenavOverviewExample}, 'slider-configurable': {title: 'Configurable slider', component: SliderConfigurableExample}, 'slider-overview': {title: 'Basic slider', component: SliderOverviewExample}, @@ -193,6 +195,7 @@ export const EXAMPLE_LIST = [ RadioNgModelExample, RadioOverviewExample, SidenavFabExample, + SidenavNavigationListExample, SelectOverviewExample, SelectFormExample, SidenavOverviewExample, diff --git a/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.css b/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.css new file mode 100644 index 000000000..580ab572e --- /dev/null +++ b/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.css @@ -0,0 +1,22 @@ +.example-sidenav-navigation-list-container { + width: 500px; + height: 300px; + border: 1px solid rgba(0, 0, 0, 0.5); +} + +.example-sidenav-navigation-list-container md-sidenav { + max-width: 200px; +} + +.example-sidenav-navigation-list-container .mat-sidenav-content, +.example-sidenav-navigation-list-container md-sidenav { + display: flex; + overflow: visible; +} + +.example-scrolling-content { + overflow: auto; + padding:5px; +} + + diff --git a/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.html b/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.html new file mode 100644 index 000000000..65344733b --- /dev/null +++ b/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.html @@ -0,0 +1,21 @@ + + + Title for the app + + + {{ link.name }} + + + + + +
+

+ Lorem ipsum dolor sit amet, pede a libero aenean phasellus, lectus metus sint ut risus, fusce vel in pellentesque. Nisl rutrum + etiam morbi consectetuer tempor magna, aenean nullam nunc id, neque vivamus interdum sociis nulla scelerisque sem, dolor + id wisi turpis magna aliquam magna.

+ +
+
\ No newline at end of file diff --git a/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.ts b/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.ts new file mode 100644 index 000000000..8cf70e54b --- /dev/null +++ b/src/app/examples/sidenav-navigation-list/sidenav-navigation-list-example.ts @@ -0,0 +1,29 @@ +import {Component, ViewEncapsulation} from '@angular/core'; + + +@Component({ + selector: 'sidenav-navigation-list-example', + templateUrl: './sidenav-navigation-list-example.html', + styleUrls: ['./sidenav-navigation-list-example.css'], + encapsulation: ViewEncapsulation.None, +}) +export class SidenavNavigationListExample { + links = [ + { + 'name':'Google', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Wikipedia', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Github', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Facebook', + 'url' : '/components/component/sidenav' + } + ] +} diff --git a/src/app/shared/documentation-items/documentation-items.ts b/src/app/shared/documentation-items/documentation-items.ts index a3b94cd59..550d87704 100644 --- a/src/app/shared/documentation-items/documentation-items.ts +++ b/src/app/shared/documentation-items/documentation-items.ts @@ -33,7 +33,7 @@ const DOCS = [ summary: 'Sidenavs, toolbars, menus', items: [ {id: 'menu', name: 'Menu', examples: ['menu-icons']}, - {id: 'sidenav', name: 'Sidenav', examples: ['sidenav-fab']}, + {id: 'sidenav', name: 'Sidenav', examples: ['sidenav-fab','sidenav-navigation-list']}, {id: 'toolbar', name: 'Toolbar', examples: ['toolbar-multirow']}, ] }, diff --git a/src/assets/examples/sidenav-navigation-list-example-css.html b/src/assets/examples/sidenav-navigation-list-example-css.html new file mode 100644 index 000000000..07a1b932e --- /dev/null +++ b/src/assets/examples/sidenav-navigation-list-example-css.html @@ -0,0 +1,22 @@ +.example-sidenav-navigation-list-container { + width: 500px; + height: 300px; + border: 1px solid rgba(0, 0, 0, 0.5); +} + +.example-sidenav-navigation-list-container md-sidenav { + max-width: 200px; +} + +.example-sidenav-navigation-list-container .mat-sidenav-content, +.example-sidenav-navigation-list-container md-sidenav { + display: flex; + overflow: visible; +} + +.example-scrolling-content { + overflow: auto; + padding:5px; +} + + diff --git a/src/assets/examples/sidenav-navigation-list-example-html.html b/src/assets/examples/sidenav-navigation-list-example-html.html new file mode 100644 index 000000000..ce0474911 --- /dev/null +++ b/src/assets/examples/sidenav-navigation-list-example-html.html @@ -0,0 +1,21 @@ +<md-sidenav-container class="example-sidenav-navigation-list-container"> + <md-sidenav #sidenav mode="side" opened="true"> + <md-toolbar color="primary">Title for the app</md-toolbar> + <md-nav-list> + <md-list-item *ngFor="let link of links"> + <a md-line>{{ link.name }}</a> + + </md-list-item> + </md-nav-list> + </md-sidenav> + + <div class="example-scrolling-content"> + <p> + Lorem ipsum dolor sit amet, pede a libero aenean phasellus, lectus metus sint ut risus, fusce vel in pellentesque. Nisl rutrum + etiam morbi consectetuer tempor magna, aenean nullam nunc id, neque vivamus interdum sociis nulla scelerisque sem, dolor + id wisi turpis magna aliquam magna.</p> + <button md-raised-button color="primary" (click)="sidenav.toggle()"> + Sidenav Toggle + </button> + </div> +</md-sidenav-container> \ No newline at end of file diff --git a/src/assets/examples/sidenav-navigation-list-example-ts.html b/src/assets/examples/sidenav-navigation-list-example-ts.html new file mode 100644 index 000000000..3d375f23c --- /dev/null +++ b/src/assets/examples/sidenav-navigation-list-example-ts.html @@ -0,0 +1,29 @@ +import {Component, ViewEncapsulation} from '@angular/core'; + + +@Component({ + selector: 'sidenav-navigation-list-example', + templateUrl: './sidenav-navigation-list-example.html', + styleUrls: ['./sidenav-navigation-list-example.css'], + encapsulation: ViewEncapsulation.None, +}) +export class SidenavNavigationListExample { + links = [ + { + 'name':'Google', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Wikipedia', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Github', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Facebook', + 'url' : '/components/component/sidenav' + } + ] +} diff --git a/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.css b/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.css new file mode 100644 index 000000000..580ab572e --- /dev/null +++ b/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.css @@ -0,0 +1,22 @@ +.example-sidenav-navigation-list-container { + width: 500px; + height: 300px; + border: 1px solid rgba(0, 0, 0, 0.5); +} + +.example-sidenav-navigation-list-container md-sidenav { + max-width: 200px; +} + +.example-sidenav-navigation-list-container .mat-sidenav-content, +.example-sidenav-navigation-list-container md-sidenav { + display: flex; + overflow: visible; +} + +.example-scrolling-content { + overflow: auto; + padding:5px; +} + + diff --git a/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.html b/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.html new file mode 100644 index 000000000..65344733b --- /dev/null +++ b/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.html @@ -0,0 +1,21 @@ + + + Title for the app + + + {{ link.name }} + + + + + +
+

+ Lorem ipsum dolor sit amet, pede a libero aenean phasellus, lectus metus sint ut risus, fusce vel in pellentesque. Nisl rutrum + etiam morbi consectetuer tempor magna, aenean nullam nunc id, neque vivamus interdum sociis nulla scelerisque sem, dolor + id wisi turpis magna aliquam magna.

+ +
+
\ No newline at end of file diff --git a/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.ts b/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.ts new file mode 100644 index 000000000..8cf70e54b --- /dev/null +++ b/src/assets/plunker/examples/sidenav-navigation-list/sidenav-navigation-list-example.ts @@ -0,0 +1,29 @@ +import {Component, ViewEncapsulation} from '@angular/core'; + + +@Component({ + selector: 'sidenav-navigation-list-example', + templateUrl: './sidenav-navigation-list-example.html', + styleUrls: ['./sidenav-navigation-list-example.css'], + encapsulation: ViewEncapsulation.None, +}) +export class SidenavNavigationListExample { + links = [ + { + 'name':'Google', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Wikipedia', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Github', + 'url' : '/components/component/sidenav' + }, + { + 'name':'Facebook', + 'url' : '/components/component/sidenav' + } + ] +}