Compare commits

...

29 Commits

Author SHA1 Message Date
Sercan Yemen
024ab15b25 Merge branch 'master' into skeleton 2017-09-11 16:34:07 +03:00
Sercan Yemen
01f00121ba Revert "removed md2 + replaced the date/time picker in scrumboard"
This reverts commit dde2333
2017-09-11 16:33:20 +03:00
Sercan Yemen
915ad52863 Merge branch 'master' into skeleton 2017-09-11 16:21:05 +03:00
Sercan Yemen
dde2333c8a removed md2
+ replaced the date/time picker in scrumboard
2017-09-11 16:19:46 +03:00
Sercan Yemen
97bfaa9979 Merge branch 'master' into skeleton 2017-09-11 13:06:42 +03:00
Sercan Yemen
babf6dc47b updated the readme 2017-09-11 13:06:24 +03:00
Sercan Yemen
6ae3e154c3 Merge branch 'master' into skeleton 2017-09-11 12:59:36 +03:00
Sercan Yemen
55288bbbd4 set the correct default values for layout
+ increased the version number
2017-09-11 12:59:13 +03:00
Sercan Yemen
49b6ff7292 navigation model for horizontal nav 2017-09-11 12:58:24 +03:00
Sercan Yemen
903688ab43 Merge branch 'master' into skeleton 2017-09-11 12:57:59 +03:00
Sercan Yemen
7297a9b4a4 toolbar adjustments 2017-09-11 12:34:16 +03:00
Sercan Yemen
4cbbd3a1d6 Merge branch 'master' of https://github.com/withinpixels/fuse2 2017-09-11 12:30:07 +03:00
Sercan Yemen
2f4ce6221e 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
2017-09-11 12:30:01 +03:00
mustafahlvc
44cdadaec9 (Scrumboard, Chat) some css style refinements 2017-09-08 19:21:35 +03:00
Sercan Yemen
19f822cbab removed unnecessary md2 from skeleton 2017-09-01 09:05:56 +03:00
Sercan Yemen
1d21a14d0e Merge branch 'master' into skeleton 2017-08-30 20:52:23 +03:00
Sercan Yemen
d5b6dea1a2 update version 2017-08-30 20:52:08 +03:00
Sercan Yemen
4bf2ba73ad merge 'master' into skeleton 2017-08-30 20:08:12 +03:00
Sercan Yemen
31087186f7 Merge branch 'scrumboard-app' 2017-08-30 20:03:21 +03:00
Sercan Yemen
48a47a0876 sidenav helper small tweaks
+ chat & toolbar small mobile tweaks
2017-08-30 20:02:54 +03:00
Sercan Yemen
e0a85a19db package lock 2017-08-30 20:01:45 +03:00
mustafahlvc
b21526410a (Scrumboard) final touches.. 2017-08-30 18:46:07 +03:00
mustafahlvc
ce6797a80b (Scrumboard) Drag-drop support 2017-08-30 15:58:40 +03:00
mustafahlvc
7d5693421f Merge branch 'master' into scrumboard-app
# Conflicts:
#	package.json
2017-08-30 15:11:21 +03:00
mustafahlvc
9106fcd066 Merge branch 'master' into scrumboard-app
# Conflicts:
#	package.json
2017-08-30 15:11:07 +03:00
mustafahlvc
58bdf07da0 Style fixes especially for Edge/IE Browser 2017-08-30 15:04:20 +03:00
mustafahlvc
0bf158f8a5 (Scrumboard) board settings added + some refinements. 2017-08-30 14:21:14 +03:00
mustafahlvc
a0da9bd81e Merge branch 'master' into scrumboard-app
# Conflicts:
#	package.json
#	src/app/core/modules/shared.module.ts
2017-08-30 14:19:45 +03:00
mustafahlvc
cd99fbf77a (Scrumboard App) added
+ md2 added for date-time picker,
+ toggleInArray func added to FuseUtils
2017-08-30 06:54:11 +03:00
58 changed files with 1032 additions and 166 deletions

View File

@@ -1,6 +1,6 @@
# Fuse2
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.1.3.
Material Design Admin Template with Angular 4+ and Angular Material 2
## Development server
@@ -22,7 +22,3 @@ Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

7
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "fuse2",
"version": "1.0.3",
"version": "1.0.4",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -5917,6 +5917,11 @@
"integrity": "sha1-3oGf282E3M2PrlnGrreWFbnSZqw=",
"dev": true
},
"md2": {
"version": "0.0.28",
"resolved": "https://registry.npmjs.org/md2/-/md2-0.0.28.tgz",
"integrity": "sha512-XQ71eTVKG3oRsGBj3lMLqL8p2inueqDXn++a2EntzWkUPlBZXPCPtlpfI9ER/LAlBKwJZQSqTzFItw7q9+vgvw=="
},
"md5.js": {
"version": "1.3.4",
"resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz",

View File

@@ -1,6 +1,6 @@
{
"name": "fuse2",
"version": "1.0.3",
"version": "1.0.5",
"license": "",
"scripts": {
"ng": "ng",
@@ -35,6 +35,7 @@
"hammerjs": "2.0.8",
"highlight.js": "9.12.0",
"intl": "1.2.5",
"md2": "0.0.28",
"moment": "2.18.1",
"ngx-color-picker": "4.3.1",
"ngx-cookie-service": "1.0.7",

View File

@@ -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',

View File

@@ -1,4 +1,5 @@
<button md-icon-button
type="button"
class="mat-elevation-z1"
[mdMenuTriggerFor]="colorMenu"
(onMenuOpen)="onMenuOpen()"

View File

@@ -0,0 +1,19 @@
<a class="nav-link" md-ripple>
<md-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</md-icon>
<span class="nav-link-title">{{item.title}}</span>
<md-icon class="collapse-arrow">keyboard_arrow_right</md-icon>
</a>
<div class="children" [ngClass]="{'open': isOpen}">
<div class="{{fuseSettings.colorClasses.navbar}}">
<ng-container *ngFor="let item of item.children">
<fuse-nav-horizontal-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-horizontal-item>
<fuse-nav-horizontal-collapse *ngIf="item.type=='nav-collapse'"
[item]="item"></fuse-nav-horizontal-collapse>
</ng-container>
</div>
</div>

View File

@@ -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();
}
}

View File

@@ -0,0 +1,6 @@
<a class="nav-link" md-ripple
[routerLink]="[item.url]" routerLinkActive="active">
<md-icon class="nav-link-icon" *ngIf="item.icon">{{item.icon}}</md-icon>
<span class="nav-link-title">{{item.title}}</span>
<span class="nav-link-badge" *ngIf="item.badge" [ngStyle]="{'background-color': item.badge.bg,'color': item.badge.fg}">{{item.badge.title}}</span>
</a>

View File

@@ -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;
}

View File

@@ -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()
{
}
}

View File

@@ -1,11 +1,27 @@
<div id="main-navigation" class="nav">
<ng-container *ngFor="let item of navigation">
<div id="main-navigation" class="nav" [ngClass]="{'horizontal':layout === 'horizontal'}">
<fuse-nav-subheader *ngIf="item.type=='subheader'" [item]="item"></fuse-nav-subheader>
<ng-container *ngIf="layout === 'vertical'">
<fuse-nav-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-item>
<ng-container *ngFor="let item of verticalNavigation">
<fuse-nav-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-collapse>
<fuse-nav-vertical-subheader *ngIf="item.type=='subheader'" [item]="item"></fuse-nav-vertical-subheader>
<fuse-nav-vertical-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-vertical-item>
<fuse-nav-vertical-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-vertical-collapse>
</ng-container>
</ng-container>
<ng-container *ngIf="layout === 'horizontal'">
<ng-container *ngFor="let item of horizontalNavigation">
<fuse-nav-horizontal-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-horizontal-item>
<fuse-nav-horizontal-collapse *ngIf="item.type=='nav-collapse'"
[item]="item"></fuse-nav-horizontal-collapse>
</ng-container>
</ng-container>
</div>

View File

@@ -1,4 +1,4 @@
import { Component, ViewEncapsulation } from '@angular/core';
import { Component, Input, ViewEncapsulation } from '@angular/core';
import { FuseNavigationService } from './navigation.service';
@Component({
@@ -9,11 +9,15 @@ import { FuseNavigationService } from './navigation.service';
})
export class FuseNavigationComponent
{
navigation: any[];
verticalNavigation: any[];
horizontalNavigation: any[];
@Input('layout') layout = 'vertical';
constructor(private navigationService: FuseNavigationService)
{
this.navigation = navigationService.getNavigation();
this.verticalNavigation = navigationService.getNavigation('verticalNavItems');
this.horizontalNavigation = navigationService.getNavigation('horizontalNavItems');
}
}

View File

@@ -1,10 +1,12 @@
import { NgModule } from '@angular/core';
import { SharedModule } from '../../modules/shared.module';
import { RouterModule } from '@angular/router';
import { FuseNavSubheaderComponent } from './nav-subheader/nav-subheader.component';
import { FuseNavigationComponent } from './navigation.component';
import { FuseNavItemComponent } from './nav-item/nav-item.component';
import { FuseNavCollapseComponent } from './nav-collapse/nav-collapse.component';
import { FuseNavVerticalItemComponent } from './vertical/nav-item/nav-vertical-item.component';
import { FuseNavVerticalCollapseComponent } from './vertical/nav-collapse/nav-vertical-collapse.component';
import { FuseNavVerticalSubheaderComponent } from './vertical/nav-subheader/nav-vertical-subheader.component';
import { FuseNavHorizontalItemComponent } from './horizontal/nav-item/nav-horizontal-item.component';
import { FuseNavHorizontalCollapseComponent } from './horizontal/nav-collapse/nav-horizontal-collapse.component';
@NgModule({
imports : [
@@ -16,9 +18,11 @@ import { FuseNavCollapseComponent } from './nav-collapse/nav-collapse.component'
],
declarations: [
FuseNavigationComponent,
FuseNavSubheaderComponent,
FuseNavItemComponent,
FuseNavCollapseComponent
FuseNavVerticalSubheaderComponent,
FuseNavVerticalItemComponent,
FuseNavVerticalCollapseComponent,
FuseNavHorizontalItemComponent,
FuseNavHorizontalCollapseComponent
]
})
export class FuseNavigationModule

View File

@@ -5,21 +5,21 @@ import { FuseNavigation } from '../../../navigation.model';
export class FuseNavigationService
{
onNavCollapseToggled = new EventEmitter<any>();
navigation: any[];
navigation: FuseNavigation;
flatNavigation: any[] = [];
constructor()
{
this.navigation = new FuseNavigation().items;
this.navigation = new FuseNavigation();
}
/**
* Get navigation array
* @returns {any[]}
*/
getNavigation()
getNavigation(item)
{
return this.navigation;
return this.navigation[item];
}
/**

View File

@@ -5,7 +5,7 @@
</a>
<div class="children" [@slideInOut]="isOpen">
<ng-container *ngFor="let item of item.children">
<fuse-nav-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-item>
<fuse-nav-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-collapse>
<fuse-nav-vertical-item *ngIf="item.type=='nav-item'" [item]="item"></fuse-nav-vertical-item>
<fuse-nav-vertical-collapse *ngIf="item.type=='nav-collapse'" [item]="item"></fuse-nav-vertical-collapse>
</ng-container>
</div>

View File

@@ -1,15 +1,15 @@
import { Component, HostBinding, Input, OnInit } from '@angular/core';
import { FuseNavigationService } from '../navigation.service';
import { FuseNavigationService } from '../../navigation.service';
import { NavigationEnd, Router } from '@angular/router';
import { Animations } from '../../../animations';
import { Animations } from '../../../../animations';
@Component({
selector : 'fuse-nav-collapse',
templateUrl: './nav-collapse.component.html',
styleUrls : ['./nav-collapse.component.scss'],
selector : 'fuse-nav-vertical-collapse',
templateUrl: './nav-vertical-collapse.component.html',
styleUrls : ['./nav-vertical-collapse.component.scss'],
animations : [Animations.slideInOut]
})
export class FuseNavCollapseComponent implements OnInit
export class FuseNavVerticalCollapseComponent implements OnInit
{
@Input() item: any;
@HostBinding('class') classes = 'nav-collapse nav-item';

View File

@@ -1,11 +1,11 @@
import { Component, HostBinding, Input, OnInit } from '@angular/core';
@Component({
selector : 'fuse-nav-item',
templateUrl: './nav-item.component.html',
styleUrls : ['./nav-item.component.scss']
selector : 'fuse-nav-vertical-item',
templateUrl: './nav-vertical-item.component.html',
styleUrls : ['./nav-vertical-item.component.scss']
})
export class FuseNavItemComponent implements OnInit
export class FuseNavVerticalItemComponent implements OnInit
{
@HostBinding('class') classes = 'nav-item';
@Input() item: any;

View File

@@ -0,0 +1,21 @@
import { Component, HostBinding, Input, OnInit } from '@angular/core';
@Component({
selector : 'fuse-nav-vertical-subheader',
templateUrl: './nav-vertical-subheader.component.html',
styleUrls : ['./nav-vertical-subheader.component.scss']
})
export class FuseNavVerticalSubheaderComponent implements OnInit
{
@HostBinding('class') classes = 'nav-subheader';
@Input() item: any;
constructor()
{
}
ngOnInit()
{
}
}

View File

@@ -3,11 +3,14 @@
:host {
.fuse-search-bar {
min-width: 64px;
height: 64px;
font-size: 13px;
@include media-breakpoint-down('xs') {
@include media-breakpoint-down('sm') {
height: 56px;
}
.fuse-search-bar-expander,
.fuse-search-bar-collapser {
cursor: pointer;
@@ -16,7 +19,8 @@
width: 64px !important;
height: 64px !important;
line-height: 64px !important;
@include media-breakpoint-down('xs') {
@include media-breakpoint-down('sm') {
height: 56px !important;
line-height: 56px !important;
}
@@ -26,7 +30,7 @@
width: 64px !important;
height: 64px !important;
line-height: 64px !important;
@include media-breakpoint-down('xs') {
@include media-breakpoint-down('sm') {
height: 56px !important;
line-height: 56px !important;
}
@@ -70,4 +74,4 @@
}
}
}
}
}

View File

@@ -9,7 +9,7 @@
<div class="shortcuts" fxHide fxShow.gt-sm [ngClass]="toolbarColor">
<div fxLayout="row" fxLayoutAlign="space-between center" fxFlex>
<div fxLayout="row" fxLayoutAlign="space-between center" fxFlex="0 1 auto">
<div fxLayout="row" fxLayoutAlign="start center">

View File

@@ -2,7 +2,9 @@
<md-icon>settings</md-icon>
</button>
<div #panel class="theme-options-panel md-white-bg mat-elevation-z2 pb-16">
<div class="theme-options-panel-overlay" #overlay [fxHide]="barClosed" [@fadeInOut]="!barClosed"></div>
<div #panel class="theme-options-panel md-white-bg mat-elevation-z8 p-16">
<button md-icon-button class="close-button" (click)="closeBar()">
<md-icon>close</md-icon>
@@ -12,6 +14,7 @@
<h3 md-subheader>Navigation:</h3>
<md-list-item>
<md-radio-group [(ngModel)]="fuseSettings.layout.navigation" (ngModelChange)="onSettingsChange()">
<md-radio-button class="mr-8" value="top">Top</md-radio-button>
<md-radio-button class="mr-8" value="left">Left</md-radio-button>
<md-radio-button class="mr-8" value="right">Right</md-radio-button>
<md-radio-button class="mr-8" value="none">None</md-radio-button>
@@ -36,25 +39,33 @@
</md-radio-group>
</md-list-item>
<h3 md-subheader>Layout Mode:</h3>
<md-list-item>
<md-radio-group [(ngModel)]="fuseSettings.layout.mode" (ngModelChange)="onSettingsChange()">
<md-radio-button class="mr-8" value="boxed">Boxed</md-radio-button>
<md-radio-button class="mr-8" value="fullwidth">Fullwidth</md-radio-button>
</md-radio-group>
</md-list-item>
<md-divider></md-divider>
<h3 md-subheader>Colors:</h3>
<md-list-item>
<md-list-item class="mb-8">
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<h4>Toolbar Color</h4>
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.toolbar" (onValueChange)="onSettingsChange()"></fuse-material-color-picker>
</div>
</md-list-item>
<md-list-item>
<md-list-item class="mb-8">
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<h4>Navigation Bar Color</h4>
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.navbar" (onValueChange)="onSettingsChange()"></fuse-material-color-picker>
</div>
</md-list-item>
<md-list-item>
<md-list-item class="mb-8">
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<h4>Footer Color</h4>
<fuse-material-color-picker [(selectedClass)]="fuseSettings.colorClasses.footer" (onValueChange)="onSettingsChange()"></fuse-material-color-picker>
@@ -68,7 +79,7 @@
<md-list-item>
<div fxFlex fxLayout="row" fxLayoutAlign="space-between center">
<h4>Router Animation</h4>
<md-select [(ngModel)]="fuseSettings.routerAnimation">
<md-select class="p-0" [(ngModel)]="fuseSettings.routerAnimation">
<md-option value="none">
None
</md-option>

View File

@@ -19,14 +19,29 @@
position: absolute;
right: 0;
top: 0;
width: 320px;
width: 360px;
transform: translate3d(100%, 0, 0);
z-index: 999;
.close-button {
position: absolute;
top: 0;
right: 0;
top: 8px;
right: 8px;
}
}
.theme-options-panel-overlay {
position: fixed;
display: block;
background: rgba(0, 0, 0, 0);
top: 0;
right: 0;
left: 0;
bottom: 0;
z-index: 998;
&.hidden {
display: none;
}
}
@@ -34,6 +49,10 @@
font-size: 15px;
}
.mat-divider {
margin: 16px;
}
.open-button {
position: absolute;
top: 0;

View File

@@ -1,28 +1,35 @@
import { Component, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { Component, ElementRef, OnDestroy, OnInit, Renderer2, ViewChild } from '@angular/core';
import { style, animate, AnimationBuilder, AnimationPlayer } from '@angular/animations';
import { Subscription } from 'rxjs/Subscription';
import { FuseConfigService } from '../../services/config.service';
import { Animations } from '../../animations';
@Component({
selector : 'fuse-theme-options',
templateUrl: './theme-options.component.html',
styleUrls : ['./theme-options.component.scss']
styleUrls : ['./theme-options.component.scss'],
animations : [Animations.fadeInOut]
})
export class FuseThemeOptionsComponent implements OnInit, OnDestroy
{
@ViewChild('openButton') openButton;
@ViewChild('panel') panel;
@ViewChild('overlay') overlay: ElementRef;
public player: AnimationPlayer;
fuseSettings: any;
barClosed: boolean;
onSettingsChanged: Subscription;
constructor(
private animationBuilder: AnimationBuilder,
private fuseConfig: FuseConfigService
private fuseConfig: FuseConfigService,
private renderer: Renderer2
)
{
this.barClosed = true;
this.onSettingsChanged =
this.fuseConfig.onSettingsChanged
.subscribe(
@@ -34,6 +41,9 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
ngOnInit()
{
this.renderer.listen(this.overlay.nativeElement, 'click', () => {
this.closeBar();
});
}
onSettingsChange()
@@ -43,23 +53,29 @@ export class FuseThemeOptionsComponent implements OnInit, OnDestroy
closeBar()
{
this.barClosed = true;
this.player =
this.animationBuilder
.build([
style({transform: 'translate3d(0,0,0)'}),
animate('400ms ease', style({transform: 'translate3d(100%,0,0)'}))
]).create(this.panel.nativeElement);
this.player.play();
}
openBar()
{
this.barClosed = false;
this.player =
this.animationBuilder
.build([
style({transform: 'translate3d(100%,0,0)'}),
animate('400ms ease', style({transform: 'translate3d(0,0,0)'}))
]).create(this.panel.nativeElement);
this.player.play();
}

View File

@@ -33,17 +33,17 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe
if ( this.observableMedia.isActive(this.mdIsLockedOpenBreakpoint) )
{
this.isLockedOpen = true;
this.mdSidenav.mode = 'side';
setTimeout(() => {
this.isLockedOpen = true;
this.mdSidenav.mode = 'side';
this.mdSidenav.open();
});
}
else
{
this.isLockedOpen = false;
this.mdSidenav.mode = 'over';
setTimeout(() => {
this.isLockedOpen = false;
this.mdSidenav.mode = 'over';
this.mdSidenav.close();
});
}
@@ -51,15 +51,19 @@ export class FuseMdSidenavHelperDirective implements OnInit, AfterViewInit, OnDe
this.matchMediaSubscription = this.fuseMatchMedia.onMediaChange.subscribe(() => {
if ( this.observableMedia.isActive(this.mdIsLockedOpenBreakpoint) )
{
this.isLockedOpen = true;
this.mdSidenav.mode = 'side';
this.mdSidenav.open();
setTimeout(() => {
this.isLockedOpen = true;
this.mdSidenav.mode = 'side';
this.mdSidenav.open();
});
}
else
{
this.isLockedOpen = false;
this.mdSidenav.mode = 'over';
this.mdSidenav.close();
setTimeout(() => {
this.isLockedOpen = false;
this.mdSidenav.mode = 'over';
this.mdSidenav.close();
});
}
});

View File

@@ -90,4 +90,16 @@ export class FuseUtils
return (S4() + S4());
}
public static toggleInArray(item, array)
{
if ( array.indexOf(item) === -1 )
{
array.push(item);
}
else
{
array.splice(array.indexOf(item), 1);
}
}
}

View File

@@ -15,11 +15,12 @@ import { FuseConfirmDialogComponent } from '../components/confirm-dialog/confirm
import { FuseCountdownComponent } from '../components/countdown/countdown.component';
import { FuseNavigationService } from '../components/navigation/navigation.service';
import { FuseMatchMedia } from '../services/match-media.service';
import { FuseNavbarService } from '../../main/navbar/navbar.service';
import { FuseNavbarVerticalService } from '../../main/navbar/vertical/navbar-vertical.service';
import { FuseMdSidenavHelperService } from '../directives/md-sidenav-helper/md-sidenav-helper.service';
import { FuseHljsComponent } from '../components/hljs/hljs.component';
import { FuseIfOnDomDirective } from '../directives/fuse-if-on-dom/fuse-if-on-dom.directive';
import { FuseMaterialColorPickerComponent } from '../components/material-color-picker/material-color-picker.component';
import { Md2Module } from 'md2';
import { CookieService } from 'ngx-cookie-service';
@NgModule({
@@ -42,7 +43,8 @@ import { CookieService } from 'ngx-cookie-service';
ReactiveFormsModule,
ColorPickerModule,
NgxDnDModule,
NgxDatatableModule
NgxDatatableModule,
Md2Module
],
exports : [
FlexLayoutModule,
@@ -60,7 +62,8 @@ import { CookieService } from 'ngx-cookie-service';
NgxDnDModule,
NgxDatatableModule,
FuseIfOnDomDirective,
FuseMaterialColorPickerComponent
FuseMaterialColorPickerComponent,
Md2Module
],
entryComponents: [
FuseConfirmDialogComponent
@@ -69,7 +72,7 @@ import { CookieService } from 'ngx-cookie-service';
CookieService,
FuseNavigationService,
FuseMatchMedia,
FuseNavbarService,
FuseNavbarVerticalService,
FuseMdSidenavHelperService
]
})

View File

@@ -1,6 +1,9 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({name: 'getById'})
@Pipe({
name: 'getById',
pure: false
})
export class GetByIdPipe implements PipeTransform
{
transform(value: any[], id: number, property: string): any

View File

@@ -54,7 +54,8 @@ $matColorHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400
&.secondary-text,
.secondary-text,
.mat-icon,
.icon {
.icon,
.md2-datepicker-button {
color: rgba(0, 0, 0, 0.54);
}
@@ -79,7 +80,8 @@ $matColorHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400
@else {
.mat-icon,
.icon {
.icon,
.md2-datepicker-button {
color: rgba(255, 255, 255, 1);
}

View File

@@ -118,4 +118,54 @@
}
}
}
&.horizontal {
display: flex;
flex-direction: row;
.nav-item {
&.nav-collapse {
position: relative;
.children {
display: none;
position: absolute;
top: 0;
left: 100%;
z-index: 999;
min-width: 200px;
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
&.open {
display: block;
}
.nav-link {
padding-left: 24px !important;
}
}
}
}
> .nav-item {
&.nav-collapse {
position: relative;
> .nav-link {
height: 56px;
.collapse-arrow {
display: none;
}
}
> .children {
top: 100%;
left: 0;
}
}
}
}
}

View File

@@ -0,0 +1,360 @@
/*@font-face {
font-family: 'fontello';
src: url('../font/fontello.eot?81091010');
src: url('../font/fontello.eot?81091010#iefix') format('embedded-opentype'),
url('../font/fontello.woff2?81091010') format('woff2'),
url('../font/fontello.woff?81091010') format('woff'),
url('../font/fontello.ttf?81091010') format('truetype'),
url('../font/fontello.svg?81091010#fontello') format('svg');
font-weight: normal;
font-style: normal;
}*/
owl-date-time {
[class^="icon-"]:before, [class*=" icon-"]:before {
font-family: "Material Icons";
font-style: normal;
font-weight: normal;
speak: none;
display: flex;
align-items: center;
justify-content: center;
/* For safety - reset parent styles, that can break glyph codes*/
font-variant: normal;
text-transform: none;
/* Font smoothing. That was taken from TWBS */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-cancel:before {
content: 'close';
}
.icon-up-open:before {
content: 'keyboard_arrow_up';
}
.icon-down-open:before {
content: 'keyboard_arrow_down';
}
.icon-left-open:before {
content: 'chevron_left';
}
.icon-right-open:before {
content: 'chevron_right';
}
$white: #FFFFFF;
$black: #000000;
$grey: #DDDDDD;
$blue: #0070BA;
.owl-widget,
.owl-widget * {
box-sizing: border-box;
}
.owl-widget {
font-size: 1em;
}
.owl-state-focus {
}
.owl-corner-all {
border-radius: 2px;
}
.owl-corner-top {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.owl-state-default {
background: #FFFFFF;
color: rgba(0, 0, 0, 0.87);
}
.owl-dateTime-inputWrapper {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
.owl-dateTime-input {
background: none !important;
padding: 0 !important;
cursor: pointer;
.owl-inputtext {
margin: 0;
padding: 8px;
background: none !important;
color: rgba(0, 0, 0, 0.87);
}
}
.owl-dateTime-cancel {
position: relative !important;
right: 0 !important;
top: 0 !important;
transform: none !important;
font-size: 16px !important;
width: 16px !important;
height: 16px !important;
min-width: 16px !important;
min-height: 16px !important;
line-height: 16px !important;
color: rgba(0, 0, 0, 0.54) !important;
}
}
.owl-dateTime {
position: relative;
width: 140px;
&.owl-dateTime-inline {
width: auto;
.owl-dateTime-dialog {
position: relative;
z-index: auto;
}
}
}
.owl-dateTime-dialog {
width: 256px;
user-select: none;
z-index: 99999;
top: 24px !important;
right: 0 !important;
left: auto !important;
@include mat-elevation(4);
}
.owl-dateTime-dialogHeader {
height: 2.5em;
padding: .25em;
background-color: rgba(0, 0, 0, .1);
overflow-y: auto;
}
.owl-calendar-wrapper {
padding: 16px !important;
}
.owl-calendar-control {
.owl-calendar-controlNav {
display: flex;
align-items: center;
justify-content: center;
.nav-prev,
.nav-next {
display: flex;
&:before {
font-family: "Material Icons";
position: relative !important;
right: 0 !important;
top: 0 !important;
transform: none !important;
font-size: 20px !important;
width: 20px !important;
height: 20px !important;
min-width: 20px !important;
min-height: 20px !important;
line-height: 20px !important;
content: "chevron_left";
color: rgba(0, 0, 0, 0.54);
}
}
.nav-next:before {
content: "chevron_right";
}
}
.owl-calendar-controlContent {
.month-control,
.year-control {
font-size: 14px;
font-weight: 500;
cursor: pointer;
}
.month-control {
margin-right: 8px;
}
.year-control {
}
}
}
.owl-calendar {
table {
border-spacing: 0 !important;
}
tbody td {
&.owl-calendar-selected {
background-color: $blue;
color: $white;
}
&.owl-calendar-invalid {
color: #ACACAC;
}
&.owl-calendar-outFocus {
color: $grey;
}
&.owl-calendar-hidden {
visibility: hidden;
}
&:not(.owl-calendar-selected):not(.owl-calendar-invalid):hover {
background-color: lighten($blue, 50%);
color: $black;
}
}
}
.owl-years,
.owl-months {
td.owl-year,
td.owl-month {
padding: 0;
font-size: 16px;
width: 72px;
height: 48px;
line-height: 48px;
cursor: pointer;
}
}
.owl-calendar-yearArrow {
width: 24px !important;
height: 24px !important;
&.left {
left: -16px !important;
}
&.right {
right: -16px !important;
}
}
.owl-weekdays {
th.owl-weekday {
height: 32px;
line-height: 32px;
text-align: center;
font-size: 12px;
padding: 0;
color: rgba(0, 0, 0, 0.37);
}
}
.owl-days {
td.owl-day {
height: 32px;
width: 32px;
line-height: 32px;
cursor: pointer;
border-radius: 100%;
padding: 0;
&.owl-day-today:before {
content: '';
display: block;
position: absolute;
right: 2px;
top: 2px;
border-top: .5em solid lighten($blue, 20%);
border-left: .5em solid transparent;
}
}
}
.owl-timer-wrapper {
height: 88px;
padding: 8px !important;
background-color: rgba(0, 0, 0, 0.06);
.owl-timer-input {
background: none;
width: 100% !important;
text-align: center;
}
.owl-timer-text {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 40%;
font-size: 20px;
}
.owl-meridian-btn {
font-size: .8em;
color: $blue;
background-image: none;
background-color: transparent;
border-color: $blue;
&:hover {
color: $white;
background-color: $blue;
border-color: $blue;
}
}
}
.owl-timer-divider {
display: inline-block;
position: absolute;
width: 8px;
height: 100%;
left: -2px;
.owl-timer-dot {
display: block;
background: rgba(0, 0, 0, 0.37);
width: 3px;
height: 3px;
position: absolute;
left: 50%;
border-radius: 100%;
transform: translateX(-50%);
&.dot-top {
top: 40%;
}
&.dot-bottom {
bottom: 40%;
}
}
}
}

View File

@@ -22,9 +22,10 @@ export class FuseConfigService
// Set the default settings
this.defaultSettings = {
layout : {
navigation: 'left', // 'right', 'left', 'top', none
toolbar : 'below', // 'above', 'below', none
footer : 'none' // 'above', 'below', none
navigation: 'left', // 'right', 'left', 'top', 'none'
toolbar : 'below', // 'above', 'below', 'none'
footer : 'below', // 'above', 'below', 'none'
mode : 'fullwidth' // 'boxed', 'fullwidth'
},
colorClasses : {
toolbar: 'md-white-500-bg',

View File

@@ -1,3 +1,14 @@
<md-toolbar class="mat-elevation-z1">
<span>Footer</span>
<md-toolbar>
<div fxLayout="row" fxLayoutAlign="center center" fxFlex>
<a href="http://themeforest.net/item/fuse-angularjs-material-design-admin-template/12931855?ref=srcn"
target="_blank" md-button class="ml-8 ml-sm-24 md-accent-800-bg" fxFlex="0 0 auto" fxLayout="row"
fxLayoutAlign="start center">
<md-icon class="s-16 mr-sm-4">shopping_cart</md-icon>
<span>Purchase Fuse template (Angular4+)</span>
</a>
</div>
</md-toolbar>

View File

@@ -6,6 +6,7 @@
.mat-toolbar {
background: inherit;
color: inherit;
box-shadow: 0px -1px 1px -1px rgba(0, 0, 0, 0.2), 0px 0px 1px 0px rgba(0, 0, 0, 0.14), 0px -1px 3px 0px rgba(0, 0, 0, 0.12);
}
&.above {

View File

@@ -8,13 +8,22 @@
</ng-container>
<!-- / TOOLBAR: Above -->
<!-- NAVBAR: Top -->
<fuse-navbar-horizontal class="top-navbar" fxHide fxShow.gt-md
[class]="fuseSettings.colorClasses.navbar"
*ngIf="fuseSettings.layout.navigation === 'top'">
</fuse-navbar-horizontal>
<!-- / NAVBAR: Top -->
<div id="wrapper">
<fuse-navbar [folded]="false"
class="left-navbar"
*ngIf="fuseSettings.layout.navigation === 'left'"
[class]="fuseSettings.colorClasses.navbar">
</fuse-navbar>
<!-- NAVBAR: Left -->
<fuse-navbar-vertical [folded]="false"
fxShow [fxHide.gt-md]="fuseSettings.layout.navigation === 'top'"
class="left-navbar" [class]="fuseSettings.colorClasses.navbar"
*ngIf="fuseSettings.layout.navigation === 'left' || fuseSettings.layout.navigation === 'top'">
</fuse-navbar-vertical>
<!-- / NAVBAR: Left -->
<div class="content-wrapper">
@@ -34,7 +43,13 @@
</div>
<fuse-navbar [folded]="false" class="md-primary-700-bg right-navbar" *ngIf="fuseSettings.layout.navigation === 'right'"></fuse-navbar>
<!-- NAVBAR: Right -->
<fuse-navbar-vertical [folded]="false"
class="right-navbar"
[class]="fuseSettings.colorClasses.navbar"
*ngIf="fuseSettings.layout.navigation === 'right'">
</fuse-navbar-vertical>
<!-- / NAVBAR: Right -->
</div>

View File

@@ -6,6 +6,12 @@ fuse-main {
width: 100%;
height: 100%;
&.boxed {
max-width: 1200px;
margin: 0 auto;
@include mat-elevation(8);
}
&.disable-perfect-scrollbar {
.ps {

View File

@@ -13,6 +13,7 @@ export class FuseMainComponent implements OnInit, OnDestroy
onSettingsChanged: Subscription;
fuseSettings: any;
@HostBinding('class.disable-perfect-scrollbar') disableCustomScrollbars;
@HostBinding('class.boxed') boxed;
constructor(
private _renderer: Renderer2,
@@ -26,6 +27,7 @@ export class FuseMainComponent implements OnInit, OnDestroy
(newSettings) => {
this.fuseSettings = newSettings;
this.disableCustomScrollbars = !this.fuseSettings.customScrollbars;
this.boxed = this.fuseSettings.layout.mode === 'boxed';
}
);
}

View File

@@ -6,10 +6,11 @@ import { SharedModule } from '../core/modules/shared.module';
import { FuseMainComponent } from './main.component';
import { FuseContentComponent } from './content/content.component';
import { FuseFooterComponent } from './footer/footer.component';
import { FuseNavbarComponent } from './navbar/navbar.component';
import { FuseNavbarVerticalComponent } from './navbar/vertical/navbar-vertical.component';
import { FuseToolbarComponent } from './toolbar/toolbar.component';
import { FuseNavigationModule } from '../core/components/navigation/navigation.module';
import { FuseNavbarToggleDirective } from './navbar/navbar-toggle.directive';
import { FuseNavbarVerticalToggleDirective } from './navbar/vertical/navbar-vertical-toggle.directive';
import { FuseNavbarHorizontalComponent } from './navbar/horizontal/navbar-horizontal.component';
import { FuseQuickPanelComponent } from './quick-panel/quick-panel.component';
import { FuseThemeOptionsComponent } from '../core/components/theme-options/theme-options.component';
import { FuseShortcutsModule } from '../core/components/shortcuts/shortcuts.module';
@@ -20,9 +21,10 @@ import { FuseSearchBarModule } from '../core/components/search-bar/search-bar.mo
FuseContentComponent,
FuseFooterComponent,
FuseMainComponent,
FuseNavbarComponent,
FuseNavbarVerticalComponent,
FuseNavbarHorizontalComponent,
FuseToolbarComponent,
FuseNavbarToggleDirective,
FuseNavbarVerticalToggleDirective,
FuseThemeOptionsComponent,
FuseQuickPanelComponent
],

View File

@@ -0,0 +1 @@
<fuse-navigation layout="horizontal"></fuse-navigation>

View File

@@ -1,4 +1,4 @@
@import "../../core/scss/fuse";
@import "../../../core/scss/fuse";
fuse-main {
@@ -23,7 +23,7 @@ fuse-main {
}
}
fuse-navbar {
fuse-navbar-vertical {
display: flex;
flex-direction: column;
width: 256px;

View File

@@ -0,0 +1,18 @@
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
@Component({
selector : 'fuse-navbar-horizontal',
templateUrl : './navbar-horizontal.component.html',
styleUrls : ['./navbar-horizontal.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class FuseNavbarHorizontalComponent implements OnInit
{
constructor() {
}
ngOnInit()
{
}
}

View File

@@ -1,29 +0,0 @@
import { Directive, HostListener, Input } from '@angular/core';
import { FuseNavbarService } from './navbar.service';
import { FuseNavbarComponent } from './navbar.component';
@Directive({
selector: '[fuseNavbar]'
})
export class FuseNavbarToggleDirective
{
@Input() fuseNavbar: string;
navbar: FuseNavbarComponent;
constructor(private navbarService: FuseNavbarService)
{
}
@HostListener('click')
onClick()
{
this.navbar = this.navbarService.getNavBar();
if ( !this.navbar[this.fuseNavbar] )
{
return;
}
this.navbar[this.fuseNavbar]();
}
}

View File

@@ -0,0 +1,29 @@
import { Directive, HostListener, Input } from '@angular/core';
import { FuseNavbarVerticalService } from './navbar-vertical.service';
import { FuseNavbarVerticalComponent } from './navbar-vertical.component';
@Directive({
selector: '[fuseNavbarVertical]'
})
export class FuseNavbarVerticalToggleDirective
{
@Input() fuseNavbarVertical: string;
navbar: FuseNavbarVerticalComponent;
constructor(private navbarService: FuseNavbarVerticalService)
{
}
@HostListener('click')
onClick()
{
this.navbar = this.navbarService.getNavBar();
if ( !this.navbar[this.fuseNavbarVertical] )
{
return;
}
this.navbar[this.fuseNavbarVertical]();
}
}

View File

@@ -5,16 +5,16 @@
<span class="logo-text">FUSE</span>
</div>
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbar="toggleFold" fxHide.lt-lg>
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbarVertical="toggleFold" fxHide.lt-lg>
<md-icon>menu</md-icon>
</button>
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbar="closeBar" fxHide.gt-md>
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbarVertical="closeBar" fxHide.gt-md>
<md-icon>arrow_back</md-icon>
</button>
</div>
<div class="navbar-content" perfect-scrollbar>
<fuse-navigation></fuse-navigation>
<fuse-navigation layout="vertical"></fuse-navigation>
</div>

View File

@@ -0,0 +1,137 @@
@import "../../../core/scss/fuse";
fuse-main {
&.fuse-nav-bar-folded {
.content-wrapper {
&:last-child {
padding-left: 64px !important;
}
&:first-child {
padding-right: 64px !important;
}
&:first-child:last-child {
padding-left: 0 !important;
padding-right: 0 !important;
}
}
}
}
fuse-navbar-vertical {
display: flex;
flex-direction: column;
width: 256px;
min-width: 256px;
max-width: 256px;
background-color: #FFFFFF;
overflow-y: auto;
overflow-x: hidden;
z-index: 3;
box-shadow: 0 5px 5px -3px rgba(0, 0, 0, .2), 0 8px 10px 1px rgba(0, 0, 0, .14), 0 3px 14px 2px rgba(0, 0, 0, .12);
transition: all .3s cubic-bezier(.55, 0, .55, .2), width .1s linear, min-width .1s linear, max-width .1s linear;
transform: translateX(0);
&.folded {
position: absolute;
top: 0;
bottom: 0;
&.left-navbar {
left: 0;
}
&.right-navbar {
right: 0;
}
&:not(.folded-open) {
width: 64px;
min-width: 64px;
max-width: 64px;
.navbar-header {
padding: 0 16px 0 16px;
}
}
&.folded-open {
}
}
&.close {
&.left-navbar {
transform: translateX(-100%) !important;
}
&.right-navbar {
transform: translateX(100%) !important;
}
box-shadow: none;
}
@include media-breakpoint('lt-lg') {
position: absolute;
top: 0;
bottom: 0;
&.left-navbar {
left: 0;
}
&.right-navbar {
right: 0;
}
&:not(.initialized) {
&.left-navbar {
transform: translateX(-100%);
}
&.right-navbar {
transform: translateX(100%);
}
}
}
.navbar-header {
padding: 0 16px 0 24px;
display: flex;
align-items: center;
height: 64px;
min-height: 64px;
justify-content: space-between;
transition: padding 200ms ease;
background-color: rgba(255, 255, 255, .05);
@include mat-elevation(1);
.logo {
display: flex;
align-items: center;
.logo-icon {
display: block;
background: #039BE5;
width: 32px;
min-width: 32px;
height: 32px;
line-height: 32px;
text-align: center;
font-size: 16px;
font-weight: 500;
color: #FFF;
border-radius: 2px;
}
.logo-text {
margin-left: 16px;
font-size: 16px;
}
}
}
.nav-bar-content {
flex: 1;
}
}

View File

@@ -1,20 +1,20 @@
import { Component, HostBinding, HostListener, Input, OnDestroy, OnInit, ViewChild, ViewEncapsulation } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { FuseMatchMedia } from '../../core/services/match-media.service';
import { FuseNavbarService } from './navbar.service';
import { FuseMatchMedia } from '../../../core/services/match-media.service';
import { FuseNavbarVerticalService } from './navbar-vertical.service';
import { ObservableMedia } from '@angular/flex-layout';
import { FuseMainComponent } from '../main.component';
import { FuseMainComponent } from '../../main.component';
import { NavigationEnd, Router } from '@angular/router';
import { PerfectScrollbarDirective } from 'ngx-perfect-scrollbar';
import { FuseNavigationService } from '../../core/components/navigation/navigation.service';
import { FuseNavigationService } from '../../../core/components/navigation/navigation.service';
@Component({
selector : 'fuse-navbar',
templateUrl : './navbar.component.html',
styleUrls : ['./navbar.component.scss'],
selector : 'fuse-navbar-vertical',
templateUrl : './navbar-vertical.component.html',
styleUrls : ['./navbar-vertical.component.scss'],
encapsulation: ViewEncapsulation.None
})
export class FuseNavbarComponent implements OnInit, OnDestroy
export class FuseNavbarVerticalComponent implements OnInit, OnDestroy
{
@HostBinding('class.close') isClosed: boolean;
@HostBinding('class.folded') isFoldedActive: boolean;
@@ -29,7 +29,7 @@ export class FuseNavbarComponent implements OnInit, OnDestroy
private fuseMainComponentEl: FuseMainComponent,
private fuseMatchMedia: FuseMatchMedia,
private fuseNavigationService: FuseNavigationService,
private navBarService: FuseNavbarService,
private navBarService: FuseNavbarVerticalService,
public media: ObservableMedia,
private router: Router
)

View File

@@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
@Injectable()
export class FuseNavbarService
export class FuseNavbarVerticalService
{
navBarRef;

View File

@@ -2,26 +2,25 @@
<div fxFlex fxFill fxLayout="row" fxLayoutAlign="start center">
<div fxFlex fxLayout="row" fxLayoutAlign="start center">
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
<button md-button class="toggle-button-navbar mat-icon-button" fuseNavbar="openBar" fxHide.gt-md>
<button md-button class="toggle-button-navbar mat-icon-button"
fuseNavbarVertical="openBar" fxHide.gt-md>
<md-icon>menu</md-icon>
</button>
<div class="toolbar-separator" fxHide.gt-md></div>
<div fxLayout="row" fxLayoutAlign="start center" *ngIf="horizontalNav">
<div class="logo ml-16">
<span class="logo-icon">F</span>
</div>
</div>
<div class="px-8 px-md-16">
<fuse-shortcuts></fuse-shortcuts>
</div>
<div class="toolbar-separator"></div>
<a href="http://themeforest.net/item/fuse-angularjs-material-design-admin-template/12931855?ref=srcn"
target="_blank" md-raised-button class="ml-8 ml-sm-24 md-pink-bg" fxFlex="0 0 auto" fxLayout="row"
fxLayoutAlign="start center">
<md-icon class="s-16 mr-sm-4">shopping_cart</md-icon>
<span fxHide fxShow.gt-xs>Purchase Fuse template (Angular4+)</span>
</a>
</div>
<div class="" fxFlex="0 1 auto" fxLayout="row" fxLayoutAlign="start center">
@@ -62,7 +61,7 @@
<div class="toolbar-separator"></div>
<button md-button
<button md-button fxHide fxShow.gt-xs
class="language-button"
[mdMenuTriggerFor]="languageMenu">
<div fxLayout="row" fxLayoutAlign="center center">
@@ -80,7 +79,7 @@
</button>
</md-menu>
<div class="toolbar-separator"></div>
<div class="toolbar-separator" fxHide fxShow.gt-xs></div>
<button md-icon-button
class="mat-icon-button quick-panel-toggle-button"

View File

@@ -15,6 +15,30 @@
color: inherit;
}
.logo {
display: flex;
align-items: center;
.logo-icon {
display: block;
background: #039BE5;
width: 32px;
min-width: 32px;
height: 32px;
line-height: 32px;
text-align: center;
font-size: 16px;
font-weight: 500;
color: #FFF;
border-radius: 2px;
}
.logo-text {
margin-left: 16px;
font-size: 16px;
}
}
.loading-spinner {
width: 32px;
height: 32px;

View File

@@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { NavigationEnd, NavigationStart, Router } from '@angular/router';
import { FuseConfigService } from '../../core/services/config.service';
@Component({
selector : 'fuse-toolbar',
@@ -13,8 +14,12 @@ export class FuseToolbarComponent
languages: any;
selectedLanguage: any;
showSpinner: boolean;
horizontalNav: boolean;
constructor(private router: Router)
constructor(
private router: Router,
private fuseConfig: FuseConfigService
)
{
this.userStatusOptions = [
{
@@ -75,6 +80,11 @@ export class FuseToolbarComponent
this.showSpinner = false;
}
});
this.fuseConfig.onSettingsChanged.subscribe((settings) => {
this.horizontalNav = settings.layout.navigation === 'top';
});
}
search(value)

View File

@@ -1,10 +1,11 @@
export class FuseNavigation
{
public items: any[];
public verticalNavItems: any[];
public horizontalNavItems: any[];
constructor()
{
this.items = [
this.verticalNavItems = [
{
'title': 'APPS',
'type' : 'subheader'
@@ -21,5 +22,26 @@ export class FuseNavigation
}
}
];
this.horizontalNavItems = [
{
'title' : 'Apps',
'icon' : 'apps',
'type' : 'nav-collapse',
'children': [
{
'title': 'Sample',
'type' : 'nav-item',
'icon' : 'email',
'url' : '/sample',
'badge': {
'title': 25,
'bg' : '#F44336',
'fg' : '#FFFFFF'
}
}
]
}
];
}
}

View File

@@ -183,7 +183,7 @@
<!-- / FUSE Splash Screen CSS -->
</head>
<body>
<body class="primary-800-bg">
<!-- FUSE Splash Screen -->
<fuse-splash-screen id="fuse-splash-screen">