From 2f4ce6221e09f5728e5407f02d1255c054849be4 Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Mon, 11 Sep 2017 12:30:01 +0300 Subject: [PATCH] horizontal navigation layout + added boxed layout option + added a close overlay to theme options + moved the buy button to the footer + added fade-in-out animation + File Manager app min row height --- src/app/core/animations.ts | 13 + .../nav-horizontal-collapse.component.html | 19 + .../nav-horizontal-collapse.component.scss | 3 + .../nav-horizontal-collapse.component.ts | 50 +++ .../nav-horizontal-item.component.html | 6 + .../nav-horizontal-item.component.scss | 3 + .../nav-item/nav-horizontal-item.component.ts | 12 + .../nav-subheader/nav-subheader.component.ts | 21 - .../navigation/navigation.component.html | 26 +- .../navigation/navigation.component.ts | 10 +- .../navigation/navigation.module.ts | 16 +- .../navigation/navigation.service.ts | 8 +- .../nav-vertical-collapse.component.html} | 4 +- .../nav-vertical-collapse.component.scss} | 0 .../nav-vertical-collapse.component.ts} | 12 +- .../nav-vertical-item.component.html} | 0 .../nav-vertical-item.component.scss} | 0 .../nav-item/nav-vertical-item.component.ts} | 8 +- .../nav-vertical-subheader.component.html} | 0 .../nav-vertical-subheader.component.scss} | 0 .../nav-vertical-subheader.component.ts | 21 + .../theme-options.component.html | 21 +- .../theme-options.component.scss | 25 +- .../theme-options/theme-options.component.ts | 22 +- src/app/core/modules/shared.module.ts | 4 +- src/app/core/scss/partials/_navigation.scss | 50 +++ src/app/core/services/config.service.ts | 7 +- .../file-list/file-list.component.scss | 1 + src/app/main/footer/footer.component.html | 15 +- src/app/main/footer/footer.component.scss | 1 + src/app/main/main.component.html | 27 +- src/app/main/main.component.scss | 6 + src/app/main/main.component.ts | 2 + src/app/main/main.module.ts | 10 +- .../navbar-horizontal.component.html | 1 + .../navbar-horizontal.component.scss} | 4 +- .../horizontal/navbar-horizontal.component.ts | 18 + .../main/navbar/navbar-toggle.directive.ts | 29 -- .../navbar-vertical-toggle.directive.ts | 29 ++ .../navbar-vertical.component.html} | 6 +- .../vertical/navbar-vertical.component.scss | 137 ++++++ .../navbar-vertical.component.ts} | 18 +- .../navbar-vertical.service.ts} | 2 +- src/app/main/toolbar/toolbar.component.html | 17 +- src/app/main/toolbar/toolbar.component.scss | 24 + src/app/main/toolbar/toolbar.component.ts | 12 +- src/app/navigation.model.ts | 415 +++++++++++++++++- src/index.html | 2 +- 48 files changed, 1001 insertions(+), 136 deletions(-) create mode 100644 src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html create mode 100644 src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.scss create mode 100644 src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts create mode 100644 src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html create mode 100644 src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.scss create mode 100644 src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.ts delete mode 100644 src/app/core/components/navigation/nav-subheader/nav-subheader.component.ts rename src/app/core/components/navigation/{nav-collapse/nav-collapse.component.html => vertical/nav-collapse/nav-vertical-collapse.component.html} (64%) rename src/app/core/components/navigation/{nav-collapse/nav-collapse.component.scss => vertical/nav-collapse/nav-vertical-collapse.component.scss} (100%) rename src/app/core/components/navigation/{nav-collapse/nav-collapse.component.ts => vertical/nav-collapse/nav-vertical-collapse.component.ts} (90%) rename src/app/core/components/navigation/{nav-item/nav-item.component.html => vertical/nav-item/nav-vertical-item.component.html} (100%) rename src/app/core/components/navigation/{nav-item/nav-item.component.scss => vertical/nav-item/nav-vertical-item.component.scss} (100%) rename src/app/core/components/navigation/{nav-item/nav-item.component.ts => vertical/nav-item/nav-vertical-item.component.ts} (51%) rename src/app/core/components/navigation/{nav-subheader/nav-subheader.component.html => vertical/nav-subheader/nav-vertical-subheader.component.html} (100%) rename src/app/core/components/navigation/{nav-subheader/nav-subheader.component.scss => vertical/nav-subheader/nav-vertical-subheader.component.scss} (100%) create mode 100644 src/app/core/components/navigation/vertical/nav-subheader/nav-vertical-subheader.component.ts create mode 100644 src/app/main/navbar/horizontal/navbar-horizontal.component.html rename src/app/main/navbar/{navbar.component.scss => horizontal/navbar-horizontal.component.scss} (98%) create mode 100644 src/app/main/navbar/horizontal/navbar-horizontal.component.ts delete mode 100644 src/app/main/navbar/navbar-toggle.directive.ts create mode 100644 src/app/main/navbar/vertical/navbar-vertical-toggle.directive.ts rename src/app/main/navbar/{navbar.component.html => vertical/navbar-vertical.component.html} (74%) create mode 100644 src/app/main/navbar/vertical/navbar-vertical.component.scss rename src/app/main/navbar/{navbar.component.ts => vertical/navbar-vertical.component.ts} (88%) rename src/app/main/navbar/{navbar.service.ts => vertical/navbar-vertical.service.ts} (85%) diff --git a/src/app/core/animations.ts b/src/app/core/animations.ts index 614d7774..d6f3ff61 100644 --- a/src/app/core/animations.ts +++ b/src/app/core/animations.ts @@ -4,6 +4,19 @@ import { sequence, trigger, stagger, animate, style, group, query, transition, k export class Animations { + public static fadeInOut = trigger('fadeInOut', [ + state('0', style({ + display: 'none', + opacity: 0 + })), + state('1', style({ + display: 'block', + opacity: 1 + })), + transition('1 => 0', animate('300ms ease-out')), + transition('0 => 1', animate('300ms ease-in')) + ]); + public static slideInOut = trigger('slideInOut', [ state('0', style({ height : '0px', diff --git a/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html new file mode 100644 index 00000000..045e077d --- /dev/null +++ b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html @@ -0,0 +1,19 @@ + + {{item.icon}} + {{item.title}} + keyboard_arrow_right + + +
+ +
+ + + + + + +
+ +
\ No newline at end of file diff --git a/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.scss b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.scss new file mode 100644 index 00000000..32c65c8c --- /dev/null +++ b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.scss @@ -0,0 +1,3 @@ +:host { + +} diff --git a/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts new file mode 100644 index 00000000..84954253 --- /dev/null +++ b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.ts @@ -0,0 +1,50 @@ +import { Component, HostBinding, HostListener, Input, OnDestroy } from '@angular/core'; +import { Animations } from '../../../../animations'; +import { FuseConfigService } from '../../../../services/config.service'; +import { Subscription } from 'rxjs/Subscription'; + +@Component({ + selector : 'fuse-nav-horizontal-collapse', + templateUrl: './nav-horizontal-collapse.component.html', + styleUrls : ['./nav-horizontal-collapse.component.scss'], + animations : [Animations.slideInOut] +}) +export class FuseNavHorizontalCollapseComponent implements OnDestroy +{ + onSettingsChanged: Subscription; + fuseSettings: any; + isOpen = false; + + @HostBinding('class') classes = 'nav-item nav-collapse'; + @Input() item: any; + + @HostListener('mouseenter') + open() + { + this.isOpen = true; + } + + @HostListener('mouseleave') + close() + { + this.isOpen = false; + } + + constructor( + private fuseConfig: FuseConfigService + ) + { + this.onSettingsChanged = + this.fuseConfig.onSettingsChanged + .subscribe( + (newSettings) => { + this.fuseSettings = newSettings; + } + ); + } + + ngOnDestroy() + { + this.onSettingsChanged.unsubscribe(); + } +} diff --git a/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html new file mode 100644 index 00000000..54045a83 --- /dev/null +++ b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html @@ -0,0 +1,6 @@ + + {{item.icon}} + {{item.title}} + {{item.badge.title}} + \ No newline at end of file diff --git a/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.scss b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.scss new file mode 100644 index 00000000..32c65c8c --- /dev/null +++ b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.scss @@ -0,0 +1,3 @@ +:host { + +} diff --git a/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.ts b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.ts new file mode 100644 index 00000000..8f9d0b25 --- /dev/null +++ b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.ts @@ -0,0 +1,12 @@ +import { Component, HostBinding, Input } from '@angular/core'; + +@Component({ + selector : 'fuse-nav-horizontal-item', + templateUrl: './nav-horizontal-item.component.html', + styleUrls : ['./nav-horizontal-item.component.scss'] +}) +export class FuseNavHorizontalItemComponent +{ + @HostBinding('class') classes = 'nav-item'; + @Input() item: any; +} diff --git a/src/app/core/components/navigation/nav-subheader/nav-subheader.component.ts b/src/app/core/components/navigation/nav-subheader/nav-subheader.component.ts deleted file mode 100644 index d2ed28b9..00000000 --- a/src/app/core/components/navigation/nav-subheader/nav-subheader.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, HostBinding, Input, OnInit } from '@angular/core'; - -@Component({ - selector : 'fuse-nav-subheader', - templateUrl: './nav-subheader.component.html', - styleUrls : ['./nav-subheader.component.scss'] -}) -export class FuseNavSubheaderComponent implements OnInit -{ - @HostBinding('class') classes = 'nav-subheader'; - @Input() item: any; - - constructor() - { - } - - ngOnInit() - { - } - -} diff --git a/src/app/core/components/navigation/navigation.component.html b/src/app/core/components/navigation/navigation.component.html index 1eb592cd..12b31aff 100644 --- a/src/app/core/components/navigation/navigation.component.html +++ b/src/app/core/components/navigation/navigation.component.html @@ -1,11 +1,27 @@ -