mirror of
https://github.com/richard-loafle/fuse-angular.git
synced 2025-01-10 04:25:08 +00:00
Navbar toggle button should be right aligned if right navbar selected
Navbar classes actually moved to the navbar from fuse-sidebar Search icon color
This commit is contained in:
parent
9c88524185
commit
43189728e5
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<button mat-icon-button class="fuse-search-bar-collapser" (click)="collapse()"
|
<button mat-icon-button class="fuse-search-bar-collapser" (click)="collapse()"
|
||||||
aria-label="Collapse Search Bar">
|
aria-label="Collapse Search Bar">
|
||||||
<mat-icon class="s-24">close</mat-icon>
|
<mat-icon class="secondary-text s-24">close</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,12 +9,12 @@
|
||||||
<span class="logo-text">FUSE</span>
|
<span class="logo-text">FUSE</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button mat-icon-button class="toggle-button-navbar"
|
<button mat-icon-button class="toggle-sidebar-folded"
|
||||||
(click)="toggleSidebarFolded()" fxHide.lt-lg>
|
(click)="toggleSidebarFolded()" fxHide.lt-lg>
|
||||||
<mat-icon>menu</mat-icon>
|
<mat-icon>menu</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button mat-icon-button class="toggle-button-navbar"
|
<button mat-icon-button class="toggle-sidebar-opened"
|
||||||
(click)="toggleSidebarOpened()" fxHide.gt-md>
|
(click)="toggleSidebarOpened()" fxHide.gt-md>
|
||||||
<mat-icon>arrow_back</mat-icon>
|
<mat-icon>arrow_back</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -1,28 +1,5 @@
|
||||||
@import "src/@fuse/scss/fuse";
|
@import "src/@fuse/scss/fuse";
|
||||||
|
|
||||||
body {
|
|
||||||
|
|
||||||
&.fuse-sidebar-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-sidebar {
|
fuse-sidebar {
|
||||||
|
|
||||||
&.folded:not(.unfolded) {
|
&.folded:not(.unfolded) {
|
||||||
|
@ -89,16 +66,14 @@ navbar {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.top-navbar + #wrapper {
|
&.right-navbar {
|
||||||
|
|
||||||
& > .left-navbar {
|
.toggle-sidebar-opened {
|
||||||
display: none !important;
|
|
||||||
|
|
||||||
@include media-breakpoint-down(md) {
|
mat-icon {
|
||||||
display: flex !important;
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,12 @@
|
||||||
|
|
||||||
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
<div fxFlex="1 0 auto" fxLayout="row" fxLayoutAlign="start center">
|
||||||
|
|
||||||
<button mat-icon-button class="toggle-button-navbar"
|
<button mat-icon-button class="navbar-toggle-button"
|
||||||
*ngIf="!noNav"
|
*ngIf="!hiddenNavbar && !rightNavbar" (click)="toggleSidebarOpen('navbar')" fxHide.gt-md>
|
||||||
(click)="toggleSidebarOpen('navbar')" fxHide.gt-md>
|
<mat-icon class="secondary-text">menu</mat-icon>
|
||||||
<mat-icon>menu</mat-icon>
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="toolbar-separator" fxHide.gt-md></div>
|
<div class="toolbar-separator" *ngIf="!hiddenNavbar && !rightNavbar" fxHide.gt-md></div>
|
||||||
|
|
||||||
<div fxLayout="row" fxLayoutAlign="start center" *ngIf="horizontalNav">
|
<div fxLayout="row" fxLayoutAlign="start center" *ngIf="horizontalNav">
|
||||||
<div class="logo ml-16">
|
<div class="logo ml-16">
|
||||||
|
@ -97,6 +96,13 @@
|
||||||
<mat-icon class="icon">format_list_bulleted</mat-icon>
|
<mat-icon class="icon">format_list_bulleted</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<div class="toolbar-separator" *ngIf="!hiddenNavbar && rightNavbar" fxHide fxShow.gt-xs></div>
|
||||||
|
|
||||||
|
<button mat-icon-button class="navbar-toggle-button"
|
||||||
|
*ngIf="!hiddenNavbar && rightNavbar" (click)="toggleSidebarOpen('navbar')" fxHide.gt-md>
|
||||||
|
<mat-icon class="secondary-text">menu</mat-icon>
|
||||||
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.toggle-button-navbar {
|
.navbar-toggle-button {
|
||||||
min-width: 56px;
|
min-width: 56px;
|
||||||
height: 56px;
|
height: 56px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,9 +18,10 @@ import { navigation } from 'app/navigation/navigation';
|
||||||
|
|
||||||
export class ToolbarComponent implements OnInit, OnDestroy
|
export class ToolbarComponent implements OnInit, OnDestroy
|
||||||
{
|
{
|
||||||
horizontalNav: boolean;
|
horizontalNavbar: boolean;
|
||||||
|
rightNavbar: boolean;
|
||||||
|
hiddenNavbar: boolean;
|
||||||
languages: any;
|
languages: any;
|
||||||
noNav: boolean;
|
|
||||||
navigation: any;
|
navigation: any;
|
||||||
selectedLanguage: any;
|
selectedLanguage: any;
|
||||||
showLoadingBar: boolean;
|
showLoadingBar: boolean;
|
||||||
|
@ -123,8 +124,9 @@ export class ToolbarComponent implements OnInit, OnDestroy
|
||||||
this._fuseConfigService.config
|
this._fuseConfigService.config
|
||||||
.pipe(takeUntil(this._unsubscribeAll))
|
.pipe(takeUntil(this._unsubscribeAll))
|
||||||
.subscribe((settings) => {
|
.subscribe((settings) => {
|
||||||
this.horizontalNav = settings.layout.navbar.position === 'top';
|
this.horizontalNavbar = settings.layout.navbar.position === 'top';
|
||||||
this.noNav = settings.layout.navbar.position === 'none';
|
this.rightNavbar = settings.layout.navbar.position === 'right';
|
||||||
|
this.hiddenNavbar = settings.layout.navbar.hidden === true;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Set the selected language from default languages
|
// Set the selected language from default languages
|
||||||
|
|
|
@ -82,8 +82,8 @@
|
||||||
<!-- TOP NAVBAR -->
|
<!-- TOP NAVBAR -->
|
||||||
<ng-template #topNavbar>
|
<ng-template #topNavbar>
|
||||||
<navbar layout="horizontal"
|
<navbar layout="horizontal"
|
||||||
class="top-navbar" fxHide fxShow.gt-md
|
class="top-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
||||||
[ngClass]="fuseConfig.layout.navbar.background"
|
fxHide fxShow.gt-md
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
</navbar>
|
</navbar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@ -93,9 +93,8 @@
|
||||||
<ng-template #leftNavbar>
|
<ng-template #leftNavbar>
|
||||||
<fuse-sidebar [name]="'navbar'"
|
<fuse-sidebar [name]="'navbar'"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / LEFT NAVBAR -->
|
<!-- / LEFT NAVBAR -->
|
||||||
|
|
|
@ -96,9 +96,8 @@
|
||||||
<fuse-sidebar [name]="'navbar'"
|
<fuse-sidebar [name]="'navbar'"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
[lockedOpen]="'gt-md'"
|
[lockedOpen]="'gt-md'"
|
||||||
class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / LEFT NAVBAR -->
|
<!-- / LEFT NAVBAR -->
|
||||||
|
@ -108,9 +107,8 @@
|
||||||
<fuse-sidebar [name]="'navbar'" position="right"
|
<fuse-sidebar [name]="'navbar'" position="right"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
[lockedOpen]="'gt-md'"
|
[lockedOpen]="'gt-md'"
|
||||||
class="right-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="right-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / RIGHT NAVBAR -->
|
<!-- / RIGHT NAVBAR -->
|
|
@ -96,9 +96,8 @@
|
||||||
<fuse-sidebar [name]="'navbar'"
|
<fuse-sidebar [name]="'navbar'"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
[lockedOpen]="'gt-md'"
|
[lockedOpen]="'gt-md'"
|
||||||
class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / LEFT NAVBAR -->
|
<!-- / LEFT NAVBAR -->
|
||||||
|
@ -108,9 +107,8 @@
|
||||||
<fuse-sidebar [name]="'navbar'" position="right"
|
<fuse-sidebar [name]="'navbar'" position="right"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
[lockedOpen]="'gt-md'"
|
[lockedOpen]="'gt-md'"
|
||||||
class="right-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="right-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / RIGHT NAVBAR -->
|
<!-- / RIGHT NAVBAR -->
|
|
@ -82,9 +82,8 @@
|
||||||
<fuse-sidebar [name]="'navbar'"
|
<fuse-sidebar [name]="'navbar'"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
[lockedOpen]="'gt-md'"
|
[lockedOpen]="'gt-md'"
|
||||||
class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="left-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / LEFT NAVBAR -->
|
<!-- / LEFT NAVBAR -->
|
||||||
|
@ -94,9 +93,8 @@
|
||||||
<fuse-sidebar [name]="'navbar'" position="right"
|
<fuse-sidebar [name]="'navbar'" position="right"
|
||||||
[folded]="fuseConfig.layout.navbar.folded"
|
[folded]="fuseConfig.layout.navbar.folded"
|
||||||
[lockedOpen]="'gt-md'"
|
[lockedOpen]="'gt-md'"
|
||||||
class="right-navbar" [ngClass]="fuseConfig.layout.navbar.background"
|
|
||||||
*ngIf="!fuseConfig.layout.navbar.hidden">
|
*ngIf="!fuseConfig.layout.navbar.hidden">
|
||||||
<navbar layout="vertical"></navbar>
|
<navbar class="right-navbar" [ngClass]="fuseConfig.layout.navbar.background" layout="vertical"></navbar>
|
||||||
</fuse-sidebar>
|
</fuse-sidebar>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<!-- / RIGHT NAVBAR -->
|
<!-- / RIGHT NAVBAR -->
|
Loading…
Reference in New Issue
Block a user