diff --git a/.angular-cli.json b/.angular-cli.json index 43fa50c..1857e91 100644 --- a/.angular-cli.json +++ b/.angular-cli.json @@ -19,9 +19,8 @@ "testTsconfig": "tsconfig.spec.json", "prefix": "of", "styles": [ - "theme.scss", - "styles.scss", - "../node_modules/@covalent/core/common/platform.scss" + "theme/theme.scss", + "theme/typography.scss" ], "scripts": [], "environmentSource": "environments/environment.ts", diff --git a/package.json b/package.json index 8641694..8e1b72d 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@angular/common": "^5.2.1", "@angular/compiler": "^5.2.1", "@angular/core": "^5.2.1", + "@angular/flex-layout": "^2.0.0-beta.12", "@angular/forms": "^5.2.1", "@angular/material": "^5.1.0", "@angular/platform-browser": "^5.2.1", @@ -34,6 +35,7 @@ "@ngrx/store-devtools": "^5.0.1", "core-js": "^2.5.3", "hammerjs": "^2.0.8", + "ngx-perfect-scrollbar": "^5.3.1", "rxjs": "^5.5.6", "zone.js": "^0.8.20" }, diff --git a/src/app/commons/layouts/footer/footer.component.html b/src/app/commons/layouts/footer/footer.component.html index 2aea852..e69de29 100644 --- a/src/app/commons/layouts/footer/footer.component.html +++ b/src/app/commons/layouts/footer/footer.component.html @@ -1,5 +0,0 @@ - -
- Copyright © 2017 Loafle. All rights reserved -
-
\ No newline at end of file diff --git a/src/app/commons/layouts/header/header.component.html b/src/app/commons/layouts/header/header.component.html index c189eee..61ff353 100644 --- a/src/app/commons/layouts/header/header.component.html +++ b/src/app/commons/layouts/header/header.component.html @@ -1,11 +1,12 @@ -
- - - overFlow - - -
\ No newline at end of file + + + + + + + + \ No newline at end of file diff --git a/src/app/commons/layouts/header/header.component.scss b/src/app/commons/layouts/header/header.component.scss index e69de29..e321b91 100644 --- a/src/app/commons/layouts/header/header.component.scss +++ b/src/app/commons/layouts/header/header.component.scss @@ -0,0 +1,17 @@ +:host { + z-index: 4; + } + + .main-toolbar { + height: 64px; + padding-left: 16px; + } + + .more-btn { + height: 100%; + min-width: 70px; + } + + .mat-icon-button { + margin-right: 10px; + } \ No newline at end of file diff --git a/src/app/commons/layouts/header/header.component.ts b/src/app/commons/layouts/header/header.component.ts index 8642bcd..9c8ed57 100644 --- a/src/app/commons/layouts/header/header.component.ts +++ b/src/app/commons/layouts/header/header.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Input } from '@angular/core'; +import { ToolbarHelpers } from './toolbar.helpers'; @Component({ selector: 'of-header', @@ -7,6 +8,14 @@ import { Component, OnInit } from '@angular/core'; }) export class HeaderComponent implements OnInit { + @Input() sidenav; + @Input() sidebar; + @Input() drawer; + @Input() matDrawerShow; + + searchOpen = false; + toolbarHelpers = ToolbarHelpers; + constructor() { } ngOnInit() { diff --git a/src/app/commons/layouts/header/toolbar.helpers.ts b/src/app/commons/layouts/header/toolbar.helpers.ts new file mode 100644 index 0000000..97c5602 --- /dev/null +++ b/src/app/commons/layouts/header/toolbar.helpers.ts @@ -0,0 +1,22 @@ +export const ToolbarHelpers = { + notifications: [ + { + id: 'id', + title: 'Mail 5', + lastTime: '23 Minutes ago', + state: 'state' + }, + { + id: 'id', + title: 'Mail 5', + lastTime: '23 Minutes ago', + state: 'state' + }, + { + id: 'id', + title: 'Mail 5', + lastTime: '23 Minutes ago', + state: 'state' + }, + ], +}; diff --git a/src/app/commons/layouts/layouts.module.ts b/src/app/commons/layouts/layouts.module.ts index 9725fd9..722098b 100644 --- a/src/app/commons/layouts/layouts.module.ts +++ b/src/app/commons/layouts/layouts.module.ts @@ -3,11 +3,13 @@ import { CommonModule } from '@angular/common'; import { SidebarComponent } from './sidebar/sidebar.component'; import { HeaderComponent } from './header/header.component'; import { FooterComponent } from './footer/footer.component'; +import { MenuItemComponent } from './menu-item/menu-item.component'; + @NgModule({ imports: [ CommonModule ], - declarations: [SidebarComponent, HeaderComponent, FooterComponent] + declarations: [SidebarComponent, HeaderComponent, FooterComponent, MenuItemComponent] }) export class LayoutsModule { } diff --git a/src/app/commons/layouts/menu-item/menu-item.component.html b/src/app/commons/layouts/menu-item/menu-item.component.html new file mode 100644 index 0000000..cb6f9ed --- /dev/null +++ b/src/app/commons/layouts/menu-item/menu-item.component.html @@ -0,0 +1,19 @@ + + + + + {{menu.icon}} + +

{{ menu.name }}

+ + {{menu?.chip?.value}} + + expand_more + +
+ + {{menu.icon}} +

{{ menu.name }}

+
+ +
diff --git a/src/app/commons/layouts/menu-item/menu-item.component.scss b/src/app/commons/layouts/menu-item/menu-item.component.scss new file mode 100644 index 0000000..ae43b86 --- /dev/null +++ b/src/app/commons/layouts/menu-item/menu-item.component.scss @@ -0,0 +1,38 @@ +@mixin mat-list-icon($size: 24px) { + font-size: $size; + height: $size; + width: $size; +} +@mixin mat-chip() { + padding: 1px 7px; +} + +@mixin menu-item($theme,$icon-size) { + .sidenav-dropdown-indicator { + transition: transform .25s; + &.indicateOpen { + transform: rotate(180deg); + } + } + mat-nav-list { + overflow: hidden; + height: 48px; + transition: height .4s cubic-bezier(.35, 0, .25, 1); + } + + .secondaryMenu { + background: mat-color($primary, 500); ; + } + + .mat-nav-list .mat-list-item .mat-list-icon{ + @include mat-list-icon($icon-size); + } + .mat-chip:not(.mat-basic-chip){ + @include mat-chip() + } + .mat-nav-list .mat-list-item { + font-size: 14px; + } + + +} diff --git a/src/app/commons/layouts/menu-item/menu-item.component.spec.ts b/src/app/commons/layouts/menu-item/menu-item.component.spec.ts new file mode 100644 index 0000000..8434313 --- /dev/null +++ b/src/app/commons/layouts/menu-item/menu-item.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { MenuItemComponent } from './menu-item.component'; + +describe('MenuItemComponent', () => { + let component: MenuItemComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ MenuItemComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(MenuItemComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/commons/layouts/menu-item/menu-item.component.ts b/src/app/commons/layouts/menu-item/menu-item.component.ts new file mode 100644 index 0000000..bde574a --- /dev/null +++ b/src/app/commons/layouts/menu-item/menu-item.component.ts @@ -0,0 +1,37 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'of-menu-item', + templateUrl: './menu-item.component.html', + styleUrls: ['./menu-item.component.scss'] +}) +export class MenuItemComponent implements OnInit { + + @Input() menu; + @Input() iconOnly: boolean; + @Input() secondaryMenu = false; + + constructor() { } + + ngOnInit() { + } + + openLink() { + this.menu.open = this.menu.open; + } + getHeight() { + + if (this.menu.open === false) { + return '48px'; + } else { + if (this.menu && this.menu.sub) { + const height = (this.menu.sub.length * 56) + 56 + 'px'; + return height; + } + } + } + + chechForChildMenu() { + return (this.menu && this.menu.sub) ? true : false; + } +} diff --git a/src/app/commons/layouts/sidebar/menu-element.ts b/src/app/commons/layouts/sidebar/menu-element.ts index ae49fc7..4659cb7 100644 --- a/src/app/commons/layouts/sidebar/menu-element.ts +++ b/src/app/commons/layouts/sidebar/menu-element.ts @@ -1,312 +1,83 @@ 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': 'Home', + 'icon': 'home', + 'link': '/home', + 'open': true, }, { - 'name': 'Material Widget', + 'name': 'Infra', 'icon': 'widgets', 'link': false, 'open': false, 'sub': [ { - 'name': 'Buttons', - 'link': 'material-widgets/buttons', + 'name': 'Map', + 'link': '/auth/signin', 'icon': 'indeterminate_check_box', 'chip': false, 'open': false, }, { - 'name': 'List', - 'link': 'material-widgets/list', - 'icon': 'list', + 'name': 'Sensors', + 'link': '', + 'icon': 'indeterminate_check_box', 'chip': false, 'open': false, }, { - - 'name': 'Stepper', - 'link': 'material-widgets/stepper', - 'icon': 'view_week', + 'name': 'Probes', + 'link': '', + 'icon': 'indeterminate_check_box', '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', + 'name': 'Monitor', + 'icon': 'widgets', 'link': false, 'open': false, - 'chip': { 'value': 2, 'color': 'accent' }, 'sub': [ { - 'name': 'Fixed', - 'icon': 'filter_list', - 'link': 'tables/fixed', + 'name': 'Overview', + 'link': '', + 'icon': 'indeterminate_check_box', + 'chip': false, 'open': false, }, { - 'name': 'Feature', - 'icon': 'done_all', - 'link': 'tables/featured', + 'name': 'Dashboards', + 'link': '', + 'icon': 'indeterminate_check_box', + 'chip': false, '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, - } - ] - } - - + 'name': 'Alert', + 'icon': 'warning', + 'link': '', + 'open': true, + }, + { + 'name': 'Report', + 'icon': '', + 'link': '', + 'open': true, + }, + { + 'name': 'Log', + 'icon': '', + 'link': '', + 'open': true, + }, + { + 'name': 'Setting', + 'icon': '', + 'link': '', + 'open': true, + }, ]; diff --git a/src/app/commons/layouts/sidebar/sidebar.component.html b/src/app/commons/layouts/sidebar/sidebar.component.html index 4ef6fa3..d425702 100644 --- a/src/app/commons/layouts/sidebar/sidebar.component.html +++ b/src/app/commons/layouts/sidebar/sidebar.component.html @@ -1,57 +1,13 @@ - -
- + -

- User profile area -

- - - - home Home - - - -

- INFRA -

- - forumMap - - forumSensors - - forumProbes - - -

- MONITOR -

- - forumOverview - - forumDashboards - - - - warning Alert - - - - - announcement Report - - - - - history Log - - - - - settings Setting - - - -
+
+ +
- \ No newline at end of file + + \ No newline at end of file diff --git a/src/app/commons/layouts/sidebar/sidebar.component.scss b/src/app/commons/layouts/sidebar/sidebar.component.scss index e69de29..6f3acaf 100644 --- a/src/app/commons/layouts/sidebar/sidebar.component.scss +++ b/src/app/commons/layouts/sidebar/sidebar.component.scss @@ -0,0 +1,4 @@ +@mixin sidemenu($theme) { + + +} \ No newline at end of file diff --git a/src/app/commons/layouts/sidebar/sidebar.component.ts b/src/app/commons/layouts/sidebar/sidebar.component.ts index 3d562a3..48c616d 100644 --- a/src/app/commons/layouts/sidebar/sidebar.component.ts +++ b/src/app/commons/layouts/sidebar/sidebar.component.ts @@ -8,6 +8,9 @@ import { menus } from './menu-element'; }) export class SidebarComponent implements OnInit { + @Input() iconOnly = false; + public menus = menus; + constructor() { } ngOnInit() { diff --git a/src/app/commons/ui/material/material.module.ts b/src/app/commons/ui/material/material.module.ts index bf16297..3b45d72 100644 --- a/src/app/commons/ui/material/material.module.ts +++ b/src/app/commons/ui/material/material.module.ts @@ -6,7 +6,7 @@ import { MatSlideToggleModule, MatInputModule, MatCheckboxModule, MatToolbarModule, MatSnackBarModule, MatSidenavModule, MatTabsModule, MatSelectModule, MatRadioModule, - MatAutocompleteModule, MatFormFieldModule + MatAutocompleteModule, MatFormFieldModule, MatChipsModule } from '@angular/material'; const MATERIAL_MODULES: any[] = [ @@ -15,7 +15,7 @@ const MATERIAL_MODULES: any[] = [ MatSlideToggleModule, MatInputModule, MatCheckboxModule, MatToolbarModule, MatSnackBarModule, MatSidenavModule, MatTabsModule, MatSelectModule, MatRadioModule, - MatAutocompleteModule, MatFormFieldModule + MatAutocompleteModule, MatFormFieldModule, MatChipsModule ]; @NgModule({ diff --git a/src/app/packages/notification/notification.component.html b/src/app/packages/notification/notification.component.html new file mode 100644 index 0000000..0129d46 --- /dev/null +++ b/src/app/packages/notification/notification.component.html @@ -0,0 +1,52 @@ + +
+ + + + +
+ + + +
+
+ notifications +
+
{{ notification.title }}
+
{{ notification.lastTime }}
+
+ + +
+
+
+
+
+ + +
????
+
\ No newline at end of file diff --git a/src/app/packages/notification/notification.component.scss b/src/app/packages/notification/notification.component.scss new file mode 100644 index 0000000..2594319 --- /dev/null +++ b/src/app/packages/notification/notification.component.scss @@ -0,0 +1,165 @@ +$prefix: 'notification'; + + +.badge { + position: absolute; + top: 0; + left: 50%; + font-weight: 700; + line-height: 13px; + height: 13px; + padding: 5px; + border-radius: 26%; + width: 30%; + background-color: #f44336; + color: #fff; + border-color:#f44336 +} + +.#{$prefix} { + &-container { + position: relative; + display: flex; + align-items: center; + } + + &-btn { + display: flex; + justify-content: center; + margin-right: 10px; + } +} +.dropdown { + background: white; + position: absolute; + top: 42px; + right: 28px; + min-width: 350px; + z-index: 2; + transform: translateY(0) scale(0); + transform-origin: top right; + visibility: hidden; + transition: transform .4s cubic-bezier(.25, .8, .25, 1), visibility .4s cubic-bezier(.25, .8, .25, 1); + + @media screen and (max-width: 599px) { + min-width: 50vw; + right: 5px; + transform: translateY(0); + visibility: hidden; + transition: transform .4s cubic-bezier(.25,.8,.25,1), visibility .4s cubic-bezier(.25,.8,.25,1); + } + + &.open { + transform: translateY(0) scale(1); + visibility: visible; + } + .card { + + .header { + background: #EEEEEE; + min-height: 54px; + padding-left: 16px; + padding-right: 8px; + color: #555; + display: flex; + justify-content: flex-start; + align-items: center; + align-content: center; + border-bottom: 1px solid #e0e0e0; + + .extra { + font-size: 12px; + color: #888; + } + } + } + .content { + overflow: hidden; + max-height: 256px; + + .notification { + min-height: 64px; + padding: 0 16px 0 14px; + position: relative; + color: #666; + cursor: pointer; + + .icon { + height: 28px; + width: 28px; + line-height: 28px; + font-size: 18px; + margin-right: 13px; + text-align: center; + border-radius: 50%; + background: #FFF; + color: #888; + border: 1px solid #EEE; + } + + .title { + font-weight: 500; + font-size: 14px; + } + + .time { + font-size: 12px; + } + + .close { + font-size: 18px; + width: 18px; + height: 18px; + line-height: 18px; + } + + &.primary { + .icon { + background: #ccc; + color: #ddd; + } + } + + &.accent { + .icon { + background: #aaa; + color: #bbb; + } + } + + &.warn { + .icon { + background: #eee; + color: #ddd; + } + } + + &.read { + color: #999; + + .name { + font-weight: normal; + } + } + } + } + + .footer { + min-height: 42px; + border-top: 1px solid #EEE; + + .action { + cursor: pointer; + color: #AAA; + text-align: center; + font-size: 13px; + } + } + + .divider { + width: calc(100% - 30px); + height: 1px; + background: #EEE; + margin: 0 16px 0 14px; + } +} \ No newline at end of file diff --git a/src/app/packages/notification/notification.component.spec.ts b/src/app/packages/notification/notification.component.spec.ts new file mode 100644 index 0000000..69192c5 --- /dev/null +++ b/src/app/packages/notification/notification.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NotificationComponent } from './notification.component'; + +describe('NotificationComponent', () => { + let component: NotificationComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ NotificationComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(NotificationComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/packages/notification/notification.component.ts b/src/app/packages/notification/notification.component.ts new file mode 100644 index 0000000..6acbd56 --- /dev/null +++ b/src/app/packages/notification/notification.component.ts @@ -0,0 +1,27 @@ +import { Component, OnInit, Input } from '@angular/core'; + +@Component({ + selector: 'of-notification', + templateUrl: './notification.component.html', + styleUrls: ['./notification.component.scss'] +}) +export class NotificationComponent implements OnInit { + + cssPrefix = 'toolbar-notification'; + isOpen = false; + @Input() notifications = []; + + constructor() { } + + ngOnInit() { + } + + select() { + + } + + delete(notification) { + + } + +} diff --git a/src/app/pages/pages.component.html b/src/app/pages/pages.component.html index cba5356..783ac93 100644 --- a/src/app/pages/pages.component.html +++ b/src/app/pages/pages.component.html @@ -1,12 +1,37 @@ - - - - - -
- -
-
-
- -
\ No newline at end of file + + + + + +

+ overFlow + .com +

+
+ + + +
+ + + + + + + + + + + + + + +
+ +
+
+
+
+
+ +
\ No newline at end of file diff --git a/src/app/pages/pages.component.scss b/src/app/pages/pages.component.scss index e69de29..30cb9c4 100644 --- a/src/app/pages/pages.component.scss +++ b/src/app/pages/pages.component.scss @@ -0,0 +1,21 @@ +@mixin auth($theme) { + $primary: map-get($theme, primary); + $accent: map-get($theme, accent); + $warn: map-get($theme, warn); + + + .sidenav,.drawer{ + background: mat-color($primary,400); + overflow: hidden; + position: relative; + } + [no-over-flow] { + overflow: hidden; + } + .router-outlet{ + position: relative;padding: 0px 5px; + } + .spacer { + width: 100%; + } +} \ No newline at end of file diff --git a/src/app/pages/pages.component.ts b/src/app/pages/pages.component.ts index b5c9a3f..fcaeb8c 100644 --- a/src/app/pages/pages.component.ts +++ b/src/app/pages/pages.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, Input, OnChanges } from '@angular/core'; @Component({ selector: 'of-pages', @@ -7,9 +7,21 @@ import { Component, OnInit } from '@angular/core'; }) export class PagesComponent implements OnInit { + @Input() isVisible = true; + visibility = 'shown'; + + sideNavOpened = true; + matDrawerOpened = false; + matDrawerShow = true; + sideNavMode = 'side'; + constructor() { } ngOnInit() { + } + getRouteAnimation(outlet) { + return outlet.activatedRouteData.animation; + } } diff --git a/src/app/pages/pages.module.ts b/src/app/pages/pages.module.ts index 8ad6c13..04a6543 100644 --- a/src/app/pages/pages.module.ts +++ b/src/app/pages/pages.module.ts @@ -7,19 +7,40 @@ import { CovalentModule } from 'app/commons/ui/covalent/covalent.module'; import { MaterialModule } from 'app/commons/ui/material/material.module'; import { HeaderComponent } from 'app/commons/layouts/header/header.component'; import { FooterComponent } from 'app/commons/layouts/footer/footer.component'; +import { MenuItemComponent } from 'app/commons/layouts/menu-item/menu-item.component'; +import { + PerfectScrollbarModule, + PERFECT_SCROLLBAR_CONFIG, + PerfectScrollbarConfigInterface +} from 'ngx-perfect-scrollbar'; +import { NotificationComponent } from 'app/packages/notification/notification.component'; + +const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { + suppressScrollX: true +}; + @NgModule({ imports: [ CommonModule, PagesRoutingModule, CovalentModule, - MaterialModule + MaterialModule, + PerfectScrollbarModule, ], declarations: [ PagesComponent, SidebarComponent, HeaderComponent, FooterComponent, + MenuItemComponent, + NotificationComponent + ], + providers: [ + { + provide: PERFECT_SCROLLBAR_CONFIG, + useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG + } ] }) export class PagesModule { } diff --git a/src/assets/images/logo.codetok.png b/src/assets/images/logo.codetok.png new file mode 100644 index 0000000..0878bc9 Binary files /dev/null and b/src/assets/images/logo.codetok.png differ diff --git a/src/assets/images/typography.scss b/src/assets/images/typography.scss new file mode 100644 index 0000000..1022933 --- /dev/null +++ b/src/assets/images/typography.scss @@ -0,0 +1,18 @@ +@import '~@angular/material/theming'; + +$custom-typography: mat-typography-config( + $font-family: 'Roboto, "Helvetica Neue", sans-serif', + $display-4: mat-typography-level(112px, 112px, 300), + $display-3: mat-typography-level(56px, 56px, 300), + $display-2: mat-typography-level(45px, 48px, 300), + $display-1: mat-typography-level(34px, 40px, 300), + $headline: mat-typography-level(14px, 32px, 300), + $title: mat-typography-level(20px, 32px, 300), + $subheading-2: mat-typography-level(22px, 28px, 300), + $subheading-1: mat-typography-level(15px, 24px, 300), + $body-2: mat-typography-level(14px, 24px, 300), + $body-1: mat-typography-level(14px, 20px, 300), + $caption: mat-typography-level(12px, 20px, 300), + $button: mat-typography-level(14px, 14px, 300), + $input: mat-typography-level(16px, 1.125, 300) +); \ No newline at end of file diff --git a/src/assets/images/user-image.jpg b/src/assets/images/user-image.jpg new file mode 100644 index 0000000..8d8ad61 Binary files /dev/null and b/src/assets/images/user-image.jpg differ diff --git a/src/environments/environment.ts b/src/environments/environment.ts index b7f639a..048a3c4 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,3 +6,17 @@ export const environment = { production: false }; +export const palete = { + primary: '#D32F2F', + accent: '#E65100', + warm: '#C2185B', + name: '#D50000', + secondary: '#D81B60', + tertiary: '#8E24AA', + quaternary: '#5E35B1', + quinary: '#3949AB', + secondaryLight: '#E91E63', + tertiaryLight: '#9C27B0', + quaternaryLight: '#673AB7', + quinaryLight: '#3F51B5' +}; diff --git a/src/index.html b/src/index.html index ec32371..ce9b4a0 100644 --- a/src/index.html +++ b/src/index.html @@ -1,15 +1,32 @@ + - OverflowWebapp + overFlow + + + + + + +
+
+
+
+
+
+ - + + \ No newline at end of file diff --git a/src/styles.scss b/src/styles.scss index 3725214..bc676e4 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -1,35 +1 @@ -// Adjust your logo position -.mat-icon { - &.mat-icon-logo { - position: relative; - top: -4px; - } - } - - // Hack for small search box - .td-search-box { - .td-search-icon.mat-icon-button { - margin: 0; - height: 30px; - .mat-icon { - margin-top: -10px; - } - } - td-search-input { - margin-left: 0 !important; - margin-bottom: 5px; - .mat-form-field { - width: auto; - } - .mat-form-field-wrapper { - padding-bottom: 0; - } - .mat-input-infix { - padding: 0; - } - .mat-form-field-infix { - border-top: 0; - } - } - } - \ No newline at end of file +@import '~@angular/material/prebuilt-themes/deeppurple-amber.css'; \ No newline at end of file diff --git a/src/theme/theme.scss b/src/theme/theme.scss new file mode 100644 index 0000000..8c9b261 --- /dev/null +++ b/src/theme/theme.scss @@ -0,0 +1,158 @@ +@import '~@angular/material/theming'; +@import '~app/pages/pages.component.scss'; +@import '~app/commons/layouts/sidebar/sidebar.component.scss'; +@import '~app/commons/layouts/menu-item/menu-item.component.scss'; + +$mat-light-theme-background: ( + status-bar: map_get($mat-grey, 300), + app-bar: map_get($mat-grey, 100), + background: map_get($mat-indigo, 50), + hover: rgba(black, 0.04), // TODO(kara): check style with Material Design UX + card: white, + dialog: white, + disabled-button: $black-12-opacity, + raised-button: white, + focused-button: $black-6-opacity, + selected-button: map_get($mat-grey, 300), + selected-disabled-button: map_get($mat-grey, 400), + disabled-button-toggle: map_get($mat-grey, 200), + unselected-chip: map_get($mat-grey, 300), + disabled-list-option: map_get($mat-grey, 200), +); + +@include mat-core(); + +$primary : $mat-indigo; +$accent : $mat-orange; +$warn : $mat-red; + + + +$primary-app-primary: mat-palette($primary , 400); +$primary-app-accent: mat-palette($accent , 900); +$primary-app-warn: mat-palette($warn ); +$cdk-theme: mat-light-theme($primary-app-primary, $primary-app-accent,$primary-app-warn); + +of-sidebar{ + $sidebar-app-primary: mat-palette($primary , 400); + $sidebar-app-accent: mat-palette($accent , 900); + $sidebar-app-warn: mat-palette($warn ); + $cdk-sidebar-theme: mat-dark-theme($sidebar-app-primary, $sidebar-app-accent,$sidebar-app-warn); + @include mat-list-theme($cdk-sidebar-theme); +} + + +of-menu-item{ + @include menu-item($cdk-theme,20px) +} + +@include angular-material-theme($cdk-theme); +@include auth($cdk-theme); + +html { + height:100%; +} +body{ + padding: 0px !important; + margin: 0px !important; + height:100%; +} +.components-container-gt-xs { + padding: 20px; + // background-color: #fdfdfd; +} +.components-container-xs { + padding: 5px !important; + // background-color: #fdfdfd; +} +.component-preview { + padding: 20px; +} +.ps-content { + height: 100%; +} + +.loader-container { + background-color: white; + width: 100vw; + height: 100vh; + z-index: 2000; + position: absolute; + + -moz-animation: cssAnimation 1s ease-in 3s forwards; + /* Firefox */ + animation: cssAnimation 1s ease-in 3s forwards; + /* Safari and Chrome */ + -o-animation: cssAnimation 1s ease-in 3s forwards; + /* Opera */ + animation: cssAnimation 1s ease-in 3s forwards; + animation-fill-mode: forwards; + animation-fill-mode: forwards; +} + +@keyframes cssAnimation { + to { + opacity:0; + display: none; + visibility:hidden; + } +} +@keyframes cssAnimation { + to { + visibility:hidden; + opacity:0; + display: none; + } +} + + + +.spinner { + margin: 50vh auto 0; + width: 70px; + text-align: center; +} + +.spinner > div { + width: 18px; + height: 18px; + + + border-radius: 100%; + display: inline-block; + animation: sk-bouncedelay 1.4s infinite ease-in-out both; + animation: sk-bouncedelay 1.4s infinite ease-in-out both; +} + +.bounce3 { + background-color: orange; +} + +.spinner .bounce1 { + background-color: blue; + animation-delay: -0.32s; + animation-delay: -0.32s; +} + +.spinner .bounce2 { + background-color: red; + animation-delay: -0.16s; + animation-delay: -0.16s; +} + + + +@keyframes sk-bouncedelay { + 0%, 80%, 100% { transform: scale(0) } + 40% { transform: scale(1.0) } +} + +@keyframes sk-bouncedelay { + 0%, 80%, 100% { + transform: scale(0); + transform: scale(0); + } 40% { + transform: scale(1.0); + transform: scale(1.0); + } +} \ No newline at end of file diff --git a/src/theme/typography.scss b/src/theme/typography.scss new file mode 100644 index 0000000..1022933 --- /dev/null +++ b/src/theme/typography.scss @@ -0,0 +1,18 @@ +@import '~@angular/material/theming'; + +$custom-typography: mat-typography-config( + $font-family: 'Roboto, "Helvetica Neue", sans-serif', + $display-4: mat-typography-level(112px, 112px, 300), + $display-3: mat-typography-level(56px, 56px, 300), + $display-2: mat-typography-level(45px, 48px, 300), + $display-1: mat-typography-level(34px, 40px, 300), + $headline: mat-typography-level(14px, 32px, 300), + $title: mat-typography-level(20px, 32px, 300), + $subheading-2: mat-typography-level(22px, 28px, 300), + $subheading-1: mat-typography-level(15px, 24px, 300), + $body-2: mat-typography-level(14px, 24px, 300), + $body-1: mat-typography-level(14px, 20px, 300), + $caption: mat-typography-level(12px, 20px, 300), + $button: mat-typography-level(14px, 14px, 300), + $input: mat-typography-level(16px, 1.125, 300) +); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 503ebd8..27cd440 100644 --- a/yarn.lock +++ b/yarn.lock @@ -130,6 +130,12 @@ dependencies: tslib "^1.7.1" +"@angular/flex-layout@^2.0.0-beta.12": + version "2.0.0-beta.12" + resolved "https://registry.yarnpkg.com/@angular/flex-layout/-/flex-layout-2.0.0-beta.12.tgz#80970dc1d60f27fa41537659926f3238f759f343" + dependencies: + tslib "^1.7.1" + "@angular/forms@^5.2.1": version "5.2.1" resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-5.2.1.tgz#530f1249bc71d9560297be642d55a5a6c439d920" @@ -4434,6 +4440,13 @@ netmask@~1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/netmask/-/netmask-1.0.6.tgz#20297e89d86f6f6400f250d9f4f6b4c1945fcd35" +ngx-perfect-scrollbar@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/ngx-perfect-scrollbar/-/ngx-perfect-scrollbar-5.3.1.tgz#7fcfb26a93554ac60d0444bfaa4b9487f23c5cbc" + dependencies: + perfect-scrollbar "^1.3.0" + resize-observer-polyfill "^1.4.0" + no-case@^2.2.0: version "2.3.2" resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac" @@ -4990,6 +5003,10 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" +perfect-scrollbar@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/perfect-scrollbar/-/perfect-scrollbar-1.3.0.tgz#61da56f94b58870d8e0a617bce649cee17d1e3b2" + performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -5855,6 +5872,10 @@ requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" +resize-observer-polyfill@^1.4.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/resize-observer-polyfill/-/resize-observer-polyfill-1.5.0.tgz#660ff1d9712a2382baa2cad450a4716209f9ca69" + resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"