diff --git a/.angular-cli.json b/.angular-cli.json index 8283fc2..d7d652a 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -19,7 +19,8 @@ "testTsconfig": "tsconfig.spec.json", "prefix": "of", "styles": [ - "styles.scss" + "styles.scss", + "../node_modules/@covalent/core/common/platform.scss" ], "scripts": [], "environmentSource": "environments/environment.ts", diff --git a/package.json b/package.json index c5c1c10..8641694 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,11 @@ "@angular/platform-browser": "^5.2.1", "@angular/platform-browser-dynamic": "^5.2.1", "@angular/router": "^5.2.1", + "@covalent/core": "^1.0.0-rc.4", + "@covalent/dynamic-forms": "^1.0.0-rc.4", + "@covalent/highlight": "^1.0.0-rc.4", + "@covalent/http": "^1.0.0-rc.4", + "@covalent/markdown": "^1.0.0-rc.4", "@ngrx/core": "^1.2.0", "@ngrx/effects": "^5.0.1", "@ngrx/router-store": "^5.0.1", diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 36fa40e..cbd6b0c 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -6,6 +6,7 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { AppRoutingModule } from './app-routing.module'; import { AppReducerModule } from './app-reducer.module'; import { MaterialModule } from './commons/ui/material/material.module'; +import { CovalentModule } from './commons/ui/covalent/covalent.module'; import { AppComponent } from './app.component'; @@ -19,6 +20,7 @@ import { AppComponent } from './app.component'; AppRoutingModule, AppReducerModule, MaterialModule, + CovalentModule, ], bootstrap: [AppComponent] }) diff --git a/src/app/commons/layouts/layouts.module.ts b/src/app/commons/layouts/layouts.module.ts index a7d69f8..2227898 100644 --- a/src/app/commons/layouts/layouts.module.ts +++ b/src/app/commons/layouts/layouts.module.ts @@ -1,10 +1,11 @@ import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; +import { SidebarComponent } from './sidebar/sidebar.component'; @NgModule({ imports: [ CommonModule ], - declarations: [] + declarations: [SidebarComponent] }) export class LayoutsModule { } diff --git a/src/app/commons/layouts/sidebar/menu-element.ts b/src/app/commons/layouts/sidebar/menu-element.ts new file mode 100644 index 0000000..ae49fc7 --- /dev/null +++ b/src/app/commons/layouts/sidebar/menu-element.ts @@ -0,0 +1,312 @@ +export const menus = [ + { + 'name': 'Dashboard', + 'icon': 'dashboard', + 'link': false, + 'open': false, + 'chip': { 'value': 1, 'color': 'accent' }, + 'sub': [ + { + 'name': 'Dashboard', + 'link': '/auth/dashboard', + 'icon': 'dashboard', + 'chip': false, + 'open': true, + } + + ] + }, + { + 'name': 'Material Widget', + 'icon': 'widgets', + 'link': false, + 'open': false, + 'sub': [ + { + 'name': 'Buttons', + 'link': 'material-widgets/buttons', + 'icon': 'indeterminate_check_box', + 'chip': false, + 'open': false, + }, + { + 'name': 'List', + 'link': 'material-widgets/list', + 'icon': 'list', + 'chip': false, + 'open': false, + }, + { + + 'name': 'Stepper', + 'link': 'material-widgets/stepper', + 'icon': 'view_week', + 'chip': false, + 'open': false, + + }, + { + 'name': 'Expansion', + 'link': 'material-widgets/expansion', + 'icon': 'web_aaset', + 'chip': false, + 'open': false, + }, + { + 'name': 'Progress Spinner', + 'link': 'material-widgets/spinner', + 'icon': 'cached', + 'chip': false, + 'open': false, + }, + { + 'name': 'Cards', + 'link': 'material-widgets/cards', + 'icon': 'crop_16_9', + 'chip': false, + 'open': false, + }, + { + 'name': 'Icons', + 'link': 'material-widgets/icons', + 'icon': 'gif', + 'chip': false, + 'open': false, + }, + { + + 'name': 'AutoComplete', + 'link': 'material-widgets/autocomplete', + 'icon': 'get_app', + 'chip': false, + 'open': false, + }, + { + 'name': 'CheckBox', + 'link': 'material-widgets/checkbox', + 'icon': 'check_box', + 'chip': false, + 'open': false, + }, + { + 'name': 'DatePicker', + 'link': 'material-widgets/datepicker', + 'icon': 'date_range', + 'chip': false, + 'open': false, + }, + + { + 'name': 'Slider', + 'link': 'material-widgets/slider', + 'icon': 'keyboard_tab', + 'chip': false, + 'open': false, + + }, + { + 'name': 'Slide Toggle', + 'link': 'material-widgets/slide-toggle', + 'icon': 'album', + 'chip': false, + 'open': false, + + + }, + { + 'name': 'Menu', + 'icon': 'menu', + 'link': 'material-widgets/menu', + 'chip': false, + 'open': false, + }, + { + 'name': 'Progress Bar', + 'link': 'material-widgets/progress-bar', + 'icon': 'trending_flat', + 'chip': false, + 'open': false, + + }, + { + 'name': 'Input', + 'icon': 'input', + 'link': 'material-widgets/input', + 'open': false, + }, + { + 'name': 'Radio', + 'icon': 'radio_button_checked', + 'link': 'material-widgets/radio', + 'chip': false, + 'open': false, + }, + { + 'name': 'Select', + 'icon': 'select_all', + 'link': 'material-widgets/select', + 'open': false, + }, + ] + }, + // { + // 'name' : 'Forms', + // 'icon' : 'mode_edit', + // 'open' : false, + // 'link' : false, + // 'sub' : [ + // { + // 'name': 'Template Driven', + // 'icon': 'mode_edit', + // 'open' : false, + // 'link':'forms/template_forms' + // }, + // { + // 'name': 'Reactive Forms', + // 'icon': 'text_fields', + // 'open' : false, + // 'link':'forms/reactive_forms' + // } + // ] + // }, + { + 'name': 'Tables', + 'icon': 'list', + 'link': false, + 'open': false, + 'chip': { 'value': 2, 'color': 'accent' }, + 'sub': [ + { + 'name': 'Fixed', + 'icon': 'filter_list', + 'link': 'tables/fixed', + 'open': false, + }, + { + 'name': 'Feature', + 'icon': 'done_all', + 'link': 'tables/featured', + 'open': false, + }, + { + 'name': 'Responsive Tables', + 'icon': 'filter_center_focus', + 'link': 'tables/responsive', + 'open': false, + } + ] + + }, + { + 'name': 'Guarded Routes', + 'icon': 'mode_edit', + 'link': '/auth/guarded-routes', + 'open': false, + + + }, { + 'name': 'Scrumboard', + 'open': false, + 'link': '/auth/scrumboard', + 'icon': 'grade', + }, { + 'name': 'Applications', + 'icon': 'view_module', + 'open': false, + 'link': false, + 'sub': [ + { + 'name': 'chat', + 'icon': 'chat', + 'link': 'chats/chat', + 'open': false, + }, + { + 'name': 'mail', + 'icon': 'mail', + 'link': 'mail/mail', + 'open': false, + }, + { + 'name': 'Editor', + 'icon': 'editor', + 'link': 'editor/editor', + 'open': false, + } + ] + } + , { + 'name': 'Pages', + 'icon': 'content_copy', + 'open': false, + 'link': false, + 'sub': [ + { + 'name': 'Login', + 'icon': 'work', + 'open': false, + 'link': '../login', + }, { + 'name': 'Services', + 'icon': 'local_laundry_service', + 'open': false, + 'link': 'pages/services', + }, { + 'name': 'Contact', + 'icon': 'directions', + 'open': false, + 'link': 'pages/contact' + } + ] + } + , { + + 'name': 'Charts', + 'icon': 'pie_chart_outlined', + 'open': false, + 'link': false, + 'sub': [ + { + 'name': 'chartjs', + 'icon': 'view_list', + 'link': 'charts/chartjs', + 'open': false, + + }, + { + 'name': 'ngx-chart', + 'icon': 'show_chart', + 'open': false, + 'link': 'charts/ngx-charts', + }, + { + 'name': 'nvd3', + 'icon': 'pie_chart', + 'open': false, + 'link': 'charts/nvd3-charts', + } + + ] + }, { + 'name': 'maps', + 'icon': 'map', + 'open': false, + 'link': false, + 'sub': [ + { + 'name': 'google-map', + 'icon': 'directions', + 'link': 'maps/googlemap', + 'open': false, + }, + { + 'name': 'leaflet-map', + 'icon': 'directions', + 'link': 'maps/leafletmap', + 'open': false, + } + ] + } + + +]; diff --git a/src/app/commons/layouts/sidebar/sidebar.component.html b/src/app/commons/layouts/sidebar/sidebar.component.html new file mode 100644 index 0000000..b9f3931 --- /dev/null +++ b/src/app/commons/layouts/sidebar/sidebar.component.html @@ -0,0 +1 @@ +