Added an extra Material theme as an example to the "styles.scss" file

Fixed bunch of color related stuff in order to apply the selected theme color correctly
This commit is contained in:
Sercan Yemen 2018-06-09 21:18:30 +03:00
parent 1c8cc35693
commit a284063d22
46 changed files with 144 additions and 131 deletions

View File

@ -7,7 +7,7 @@
<!-- item.url --> <!-- item.url -->
<a class="nav-link" *ngIf="item.url && !item.externalUrl && !item.function" (click)="toggleOpen($event)" <a class="nav-link" *ngIf="item.url && !item.externalUrl && !item.function" (click)="toggleOpen($event)"
[routerLink]="[item.url]" routerLinkActive="active" [routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" [routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple> [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container> <ng-container *ngTemplateOutlet="itemContent"></ng-container>
@ -28,7 +28,7 @@
<!-- item.url && item.function --> <!-- item.url && item.function -->
<a class="nav-link" *ngIf="item.url && !item.externalUrl && item.function" <a class="nav-link" *ngIf="item.url && !item.externalUrl && item.function"
(click)="toggleOpen($event);item.function()" (click)="toggleOpen($event);item.function()"
[routerLink]="[item.url]" routerLinkActive="active" [routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple> [routerLinkActiveOptions]="{exact: item.exactMatch || false}" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container> <ng-container *ngTemplateOutlet="itemContent"></ng-container>
</a> </a>

View File

@ -2,7 +2,7 @@
<!-- item.url --> <!-- item.url -->
<a class="nav-link" *ngIf="item.url && !item.externalUrl && !item.function" <a class="nav-link" *ngIf="item.url && !item.externalUrl && !item.function"
[routerLink]="[item.url]" routerLinkActive="active" [routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" [routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple> [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container> <ng-container *ngTemplateOutlet="itemContent"></ng-container>
@ -22,7 +22,7 @@
<!-- item.url && item.function --> <!-- item.url && item.function -->
<a class="nav-link" *ngIf="item.url && !item.externalUrl && item.function" (click)="item.function()" <a class="nav-link" *ngIf="item.url && !item.externalUrl && item.function" (click)="item.function()"
[routerLink]="[item.url]" routerLinkActive="active" [routerLink]="[item.url]" [routerLinkActive]="['active', 'mat-accent-bg']"
[routerLinkActiveOptions]="{exact: item.exactMatch || false}" [routerLinkActiveOptions]="{exact: item.exactMatch || false}"
[target]="item.openInNewTab ? '_blank' : '_self'" matRipple> [target]="item.openInNewTab ? '_blank' : '_self'" matRipple>
<ng-container *ngTemplateOutlet="itemContent"></ng-container> <ng-container *ngTemplateOutlet="itemContent"></ng-container>

View File

@ -227,6 +227,35 @@ $matColorHues: 50, 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400
} }
} }
@mixin generateFuseColorClasses($primary, $accent, $warn) {
$colorMap: (
primary: $primary,
accent: $accent,
warn: $warn
);
// Generate the color classes...
@each $name, $map in $colorMap {
@each $hue in $matColorHues {
$color: map-get($map, $hue);
$contrastColor: map-get(map-get($map, 'contrast'), $hue);
@if ($color != null and $contrastColor != null) {
@include generateColorClasses($name, $color, $contrastColor, '-#{$hue}');
// Run the generator one more time for default values (500)
@if ($hue == 500) {
@include generateColorClasses($name, $color, $contrastColor, '');
}
}
}
}
}
// Generate the color classes... // Generate the color classes...
@each $colorName, $colorMap in $matColorsMap { @each $colorName, $colorMap in $matColorsMap {

View File

@ -72,14 +72,14 @@
} }
&.active { &.active {
background-color: mat-color($accent); //background-color: mat-color($accent);
.mat-ripple-element { .mat-ripple-element {
background-color: mat-color($accent, default-contrast, 0.1); //background-color: mat-color($accent, default-contrast, 0.1);
} }
&, .nav-link-icon { &, .nav-link-icon {
color: mat-color($accent, default-contrast); //color: mat-color($accent, default-contrast);
} }
.nav-link-badge { .nav-link-badge {

View File

@ -3,13 +3,15 @@
<div class="big-circle mat-elevation-z1 app-logo" fxLayout="column" fxLayoutAlign="center center" <div class="big-circle mat-elevation-z1 app-logo" fxLayout="column" fxLayoutAlign="center center"
*fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}"> *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">
<mat-icon class="s-64 s-mat-128">chat</mat-icon> <mat-icon class="s-64 s-mat-128 mat-accent">chat</mat-icon>
</div> </div>
<span class="app-title my-24" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',y:'25px'}}">Chat App</span> <span class="app-title my-24" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',y:'25px'}}">Chat App</span>
<span fxHide fxShow.gt-md class="app-message" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'200ms',y:'50px'}}">Select contact to start the chat!..</span> <span fxHide fxShow.gt-md class="app-message" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'200ms',y:'50px'}}">
Select contact to start the chat!..
</span>
<button mat-raised-button fxHide.gt-md class="" fuseMatSidenavToggler="chat-left-sidenav"> <button mat-raised-button fxHide.gt-md class="" fuseMatSidenavToggler="chat-left-sidenav">
Select contact to start the chat!.. Select contact to start the chat!..

View File

@ -18,10 +18,6 @@
height: 160px; height: 160px;
line-height: 160px; line-height: 160px;
} }
mat-icon {
color: mat-color($accent);
}
} }
.app-title { .app-title {

View File

@ -136,7 +136,7 @@
<div class="contact-last-message-time"> <div class="contact-last-message-time">
{{chat.lastMessageTime | date}} {{chat.lastMessageTime | date}}
</div> </div>
<div *ngIf="chat.unread" class="unread-message-count">{{chat.unread}}</div> <div *ngIf="chat.unread" class="unread-message-count mat-accent-bg">{{chat.unread}}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@ -94,8 +94,6 @@
width: 24px; width: 24px;
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
background-color: mat-color($accent);
color: map-get($accent, default-contrast);
} }
} }
} }

View File

@ -2,7 +2,7 @@
<div class="sidenav-header"> <div class="sidenav-header">
<!-- USER TOOLBAR --> <!-- USER TOOLBAR -->
<mat-toolbar> <mat-toolbar class="mat-accent-bg">
<!-- TOOLBAR TOP --> <!-- TOOLBAR TOP -->
<mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center"> <mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center">

View File

@ -6,8 +6,6 @@
flex-direction: column; flex-direction: column;
mat-toolbar { mat-toolbar {
background-color: mat-color($accent);
color: map-get($accent, default-contrast);
.toolbar-bottom { .toolbar-bottom {
height: 240px; height: 240px;
@ -16,7 +14,6 @@
height: 180px; height: 180px;
} }
} }
} }
.sidenav-content { .sidenav-content {

View File

@ -2,7 +2,7 @@
<div class="sidenav-header" *ngIf="contact"> <div class="sidenav-header" *ngIf="contact">
<!-- CONTACT TOOLBAR --> <!-- CONTACT TOOLBAR -->
<mat-toolbar> <mat-toolbar class="mat-accent-bg">
<!-- TOOLBAR TOP --> <!-- TOOLBAR TOP -->
<mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center"> <mat-toolbar-row fxLayout="row" fxLayoutAlign="space-between center">

View File

@ -6,8 +6,6 @@
flex-direction: column; flex-direction: column;
mat-toolbar { mat-toolbar {
background-color: mat-color($accent);
color: map-get($accent, default-contrast);
.toolbar-bottom { .toolbar-bottom {
height: 240px; height: 240px;
@ -16,7 +14,6 @@
height: 180px; height: 180px;
} }
} }
} }
.sidenav-content { .sidenav-content {

View File

@ -97,7 +97,7 @@
<mat-row *cdkRowDef="let contact; columns: displayedColumns;" <mat-row *cdkRowDef="let contact; columns: displayedColumns;"
class="contact" class="contact"
(click)="editContact(contact)" (click)="editContact(contact)"
[ngClass]="{'mat-light-blue-50-bg':checkboxes[contact.id]}" [ngClass]="{'mat-accent-50-bg':checkboxes[contact.id]}"
matRipple matRipple
[@animate]="{value:'*',params:{y:'100%'}}"> [@animate]="{value:'*',params:{y:'100%'}}">
</mat-row> </mat-row>

View File

@ -18,19 +18,20 @@
<div class="nav"> <div class="nav">
<div class="nav-item" aria-label="inbox"> <div class="nav-item" aria-label="inbox">
<a class="nav-link" matRipple (click)="changeFilter('all')" [ngClass]="{'active':filterBy ==='all'}"> <a class="nav-link" matRipple (click)="changeFilter('all')"
[ngClass]="{'active mat-accent-bg':filterBy ==='all'}">
<span class="title">All Contacts</span> <span class="title">All Contacts</span>
</a> </a>
</div> </div>
<div class="nav-item" aria-label="frequently contacted" (click)="changeFilter('frequent')"> <div class="nav-item" aria-label="frequently contacted" (click)="changeFilter('frequent')">
<a class="nav-link" matRipple [ngClass]="{'active':filterBy ==='frequent'}"> <a class="nav-link" matRipple [ngClass]="{'active mat-accent-bg':filterBy ==='frequent'}">
<div class="title">Freequently contacted</div> <div class="title">Freequently contacted</div>
</a> </a>
</div> </div>
<div class="nav-item" aria-label="starred" (click)="changeFilter('starred')"> <div class="nav-item" aria-label="starred" (click)="changeFilter('starred')">
<a class="nav-link" matRipple [ngClass]="{'active':filterBy ==='starred'}"> <a class="nav-link" matRipple [ngClass]="{'active mat-accent-bg':filterBy ==='starred'}">
<div class="title">Starred Contacts</div> <div class="title">Starred Contacts</div>
</a> </a>
</div> </div>

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- HEADER --> <!-- HEADER -->
<div class="header white-fg" <div class="header mat-accent-bg"
fxLayout="row" fxLayoutAlign="space-between center"> fxLayout="row" fxLayoutAlign="space-between center">
<!-- APP TITLE --> <!-- APP TITLE -->

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- HEADER --> <!-- HEADER -->
<div class="header white-fg" <div class="header mat-accent-bg"
fxLayout="column" fxLayoutAlign="center center" fxLayout="column" fxLayoutAlign="center center"
fxLayout.gt-xs="row" fxLayoutAlign.gt-xs="space-between center"> fxLayout.gt-xs="row" fxLayoutAlign.gt-xs="space-between center">

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- HEADER --> <!-- HEADER -->
<div class="header white-fg" fxLayout="row" fxLayoutAlign="space-between center"> <div class="header mat-accent-bg" fxLayout="row" fxLayoutAlign="space-between center">
<!-- APP TITLE --> <!-- APP TITLE -->
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- HEADER --> <!-- HEADER -->
<div class="header white-fg" <div class="header mat-accent-bg"
fxLayout="column" fxLayoutAlign="center center" fxLayout="column" fxLayoutAlign="center center"
fxLayout.gt-xs="row" fxLayoutAlign.gt-xs="space-between center"> fxLayout.gt-xs="row" fxLayoutAlign.gt-xs="space-between center">

View File

@ -52,9 +52,8 @@
<mat-header-row *cdkHeaderRowDef="displayedColumns"></mat-header-row> <mat-header-row *cdkHeaderRowDef="displayedColumns"></mat-header-row>
<mat-row *cdkRowDef="let row; columns: displayedColumns;" <mat-row *cdkRowDef="let row; columns: displayedColumns;"
(click)="onSelect(row)" (click)="onSelect(row)"
[ngClass]="{'mat-light-blue-50-bg':row == selected}" [ngClass]="{'mat-accent-50-bg':row == selected}"
matRipple matRipple [@animate]="{value:'*',params:{y:'100%'}}"
[@animate]="{value:'*',params:{y:'100%'}}"
> >
</mat-row> </mat-row>
</mat-table> </mat-table>

View File

@ -10,7 +10,7 @@
<div class="name" fxLayout="row" fxLayoutAlign="start center" fxFlex> <div class="name" fxLayout="row" fxLayoutAlign="start center" fxFlex>
<img class="avatar" *ngIf="mail.from?.avatar" alt="{{mail.from?.name}}" src="{{mail.from?.avatar}}"/> <img class="avatar" *ngIf="mail.from?.avatar" alt="{{mail.from?.name}}" src="{{mail.from?.avatar}}"/>
<div class="avatar" *ngIf="!mail.from?.avatar">{{mail.from?.name[0]}}</div> <div class="avatar mat-accent-bg" *ngIf="!mail.from?.avatar">{{mail.from?.name[0]}}</div>
<span class="text-truncate" *ngIf="mail?.from">{{mail.from?.name}}</span> <span class="text-truncate" *ngIf="mail?.from">{{mail.from?.name}}</span>
<mat-icon *ngIf="mail.hasAttachments">attachment</mat-icon> <mat-icon *ngIf="mail.hasAttachments">attachment</mat-icon>
</div> </div>

View File

@ -44,20 +44,6 @@
} }
} }
&.current-mail {
background: #E3F2FD;
.info {
.row-2 {
.labels {
background: #E3F2FD;
}
}
}
}
.info { .info {
overflow: hidden; overflow: hidden;
width: 0; width: 0;
@ -76,7 +62,6 @@
width: 32px; width: 32px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
background-color: mat-color($accent);
} }
} }
@ -104,11 +89,7 @@
} }
.labels { .labels {
position: absolute; margin-top: 8px;
background: #FFFFFF;
bottom: 0;
right: 0;
padding-left: 6px;
.label { .label {
font-size: 11px; font-size: 11px;

View File

@ -4,6 +4,6 @@
<div class="mail-list"> <div class="mail-list">
<mail-list-item matRipple *ngFor="let mail of mails" [mail]="mail" (click)="readMail(mail.id)" <mail-list-item matRipple *ngFor="let mail of mails" [mail]="mail" (click)="readMail(mail.id)"
[ngClass]="{'current-mail':mail?.id == currentMail?.id}"> [ngClass]="{'current-mail mat-accent-50-bg':mail?.id == currentMail?.id}">
</mail-list-item> </mail-list-item>
</div> </div>

View File

@ -65,11 +65,11 @@
<div class="toolbar-separator" *ngIf="hasSelectedMails"></div> <div class="toolbar-separator" *ngIf="hasSelectedMails"></div>
<button mat-icon-button (click)="setFolderOnSelectedMails(4)" *ngIf="hasSelectedMails"> <button mat-icon-button (click)="setFolderOnSelectedMails(4)" *ngIf="hasSelectedMails">
<mat-icon>delete</mat-icon> <mat-icon class="secondary-text">delete</mat-icon>
</button> </button>
<button mat-icon-button [matMenuTriggerFor]="folderMenu" *ngIf="hasSelectedMails"> <button mat-icon-button [matMenuTriggerFor]="folderMenu" *ngIf="hasSelectedMails">
<mat-icon>folder</mat-icon> <mat-icon class="secondary-text">folder</mat-icon>
</button> </button>
<mat-menu #folderMenu="matMenu"> <mat-menu #folderMenu="matMenu">
<button mat-menu-item *ngFor="let folder of folders$ | async" <button mat-menu-item *ngFor="let folder of folders$ | async"
@ -78,7 +78,7 @@
</mat-menu> </mat-menu>
<button mat-icon-button [matMenuTriggerFor]="labelMenu" *ngIf="hasSelectedMails"> <button mat-icon-button [matMenuTriggerFor]="labelMenu" *ngIf="hasSelectedMails">
<mat-icon>label</mat-icon> <mat-icon class="secondary-text">label</mat-icon>
</button> </button>
<mat-menu #labelMenu="matMenu"> <mat-menu #labelMenu="matMenu">
<button mat-menu-item *ngFor="let label of labels$ | async" <button mat-menu-item *ngFor="let label of labels$ | async"
@ -89,7 +89,7 @@
<div *ngIf="currentMail$ | async" fxHide.gt-xs> <div *ngIf="currentMail$ | async" fxHide.gt-xs>
<button mat-icon-button (click)="deselectCurrentMail()"> <button mat-icon-button (click)="deselectCurrentMail()">
<mat-icon>arrow_back</mat-icon> <mat-icon class="secondary-text">arrow_back</mat-icon>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,6 +1,6 @@
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div fxLayout="column" fxLayoutAlign="space-between start" <div fxLayout="column" fxLayoutAlign="space-between start"
class="header p-24 pb-4" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> class="header mat-accent-bg p-24 pb-4">
<div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center"> <div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="logo-icon s-32">mail</mat-icon> <mat-icon class="logo-icon s-32">mail</mat-icon>
@ -39,8 +39,9 @@
<div class="nav-subheader">{{ 'MAIL.FOLDERS' | translate }}</div> <div class="nav-subheader">{{ 'MAIL.FOLDERS' | translate }}</div>
<div class="nav-item" *ngFor="let folder of (folders$ | async)"> <div class="nav-item" *ngFor="let folder of (folders$ | async)">
<a class="nav-link" matRipple [routerLink]="'/apps/mail-ngrx/' + folder.handle" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/mail-ngrx/' + folder.handle"
<mat-icon class="nav-link-icon" *ngIf="folder.icon">{{folder.icon}}</mat-icon> [routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon secondary-text" *ngIf="folder.icon">{{folder.icon}}</mat-icon>
<span>{{folder.title}}</span> <span>{{folder.title}}</span>
</a> </a>
</div> </div>
@ -49,7 +50,7 @@
<div class="nav-item" *ngFor="let filter of (filters$ | async)"> <div class="nav-item" *ngFor="let filter of (filters$ | async)">
<a class="nav-link" matRipple [routerLink]="'/apps/mail-ngrx/filter/' + filter.handle" <a class="nav-link" matRipple [routerLink]="'/apps/mail-ngrx/filter/' + filter.handle"
routerLinkActive="active"> [routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon" [ngClass]="filter.color" *ngIf="filter.icon">{{filter.icon}}</mat-icon> <mat-icon class="nav-link-icon" [ngClass]="filter.color" *ngIf="filter.icon">{{filter.icon}}</mat-icon>
<span>{{filter.title}}</span> <span>{{filter.title}}</span>
</a> </a>
@ -59,7 +60,7 @@
<div class="nav-item" *ngFor="let label of (labels$ | async)"> <div class="nav-item" *ngFor="let label of (labels$ | async)">
<a class="nav-link" matRipple [routerLink]="'/apps/mail-ngrx/label/' + label.handle" <a class="nav-link" matRipple [routerLink]="'/apps/mail-ngrx/label/' + label.handle"
routerLinkActive="active"> [routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon" [ngStyle]="{'color':label.color}">label</mat-icon> <mat-icon class="nav-link-icon" [ngStyle]="{'color':label.color}">label</mat-icon>
<span>{{label.title}}</span> <span>{{label.title}}</span>
</a> </a>

View File

@ -9,7 +9,7 @@
<div class="name" fxLayout="row" fxLayoutAlign="start center" fxFlex> <div class="name" fxLayout="row" fxLayoutAlign="start center" fxFlex>
<img class="avatar" *ngIf="mail.from?.avatar" alt="{{mail.from?.name}}" src="{{mail.from?.avatar}}"/> <img class="avatar" *ngIf="mail.from?.avatar" alt="{{mail.from?.name}}" src="{{mail.from?.avatar}}"/>
<div class="avatar" *ngIf="!mail.from?.avatar">{{mail.from?.name[0]}}</div> <div class="avatar mat-accent-bg" *ngIf="!mail.from?.avatar">{{mail.from?.name[0]}}</div>
<span class="text-truncate" *ngIf="mail?.from">{{mail.from?.name}}</span> <span class="text-truncate" *ngIf="mail?.from">{{mail.from?.name}}</span>
<mat-icon *ngIf="mail.hasAttachments">attachment</mat-icon> <mat-icon *ngIf="mail.hasAttachments">attachment</mat-icon>
</div> </div>

View File

@ -43,20 +43,6 @@
} }
} }
&.current-mail {
background: #E3F2FD;
.info {
.row-2 {
.labels {
background: #E3F2FD;
}
}
}
}
.info { .info {
overflow: hidden; overflow: hidden;
width: 0; width: 0;
@ -75,7 +61,6 @@
width: 32px; width: 32px;
height: 32px; height: 32px;
line-height: 32px; line-height: 32px;
background-color: mat-color($accent);
} }
} }
@ -103,11 +88,7 @@
} }
.labels { .labels {
position: absolute; margin-top: 8px;
background: #FFFFFF;
bottom: 0;
right: 0;
padding-left: 6px;
.label { .label {
font-size: 11px; font-size: 11px;

View File

@ -4,7 +4,7 @@
<div class="mail-list" *fuseIfOnDom [@animateStagger]="{value:'50'}"> <div class="mail-list" *fuseIfOnDom [@animateStagger]="{value:'50'}">
<mail-list-item matRipple *ngFor="let mail of mails" [mail]="mail" (click)="readMail(mail.id)" <mail-list-item matRipple *ngFor="let mail of mails" [mail]="mail" (click)="readMail(mail.id)"
[ngClass]="{'current-mail':mail?.id == currentMail?.id}" [ngClass]="{'current-mail mat-accent-50-bg':mail?.id == currentMail?.id}"
[@animate]="{value:'*',params:{y:'100%'}}"> [@animate]="{value:'*',params:{y:'100%'}}">
</mail-list-item> </mail-list-item>
</div> </div>

View File

@ -63,11 +63,11 @@
<div class="toolbar-separator" *ngIf="hasSelectedMails"></div> <div class="toolbar-separator" *ngIf="hasSelectedMails"></div>
<button mat-icon-button (click)="setFolderOnSelectedMails(4)" *ngIf="hasSelectedMails"> <button mat-icon-button (click)="setFolderOnSelectedMails(4)" *ngIf="hasSelectedMails">
<mat-icon>delete</mat-icon> <mat-icon class="secondary-text">delete</mat-icon>
</button> </button>
<button mat-icon-button [matMenuTriggerFor]="folderMenu" *ngIf="hasSelectedMails"> <button mat-icon-button [matMenuTriggerFor]="folderMenu" *ngIf="hasSelectedMails">
<mat-icon>folder</mat-icon> <mat-icon class="secondary-text">folder</mat-icon>
</button> </button>
<mat-menu #folderMenu="matMenu"> <mat-menu #folderMenu="matMenu">
<button mat-menu-item *ngFor="let folder of folders" <button mat-menu-item *ngFor="let folder of folders"
@ -76,7 +76,7 @@
</mat-menu> </mat-menu>
<button mat-icon-button [matMenuTriggerFor]="labelMenu" *ngIf="hasSelectedMails"> <button mat-icon-button [matMenuTriggerFor]="labelMenu" *ngIf="hasSelectedMails">
<mat-icon>label</mat-icon> <mat-icon class="secondary-text">label</mat-icon>
</button> </button>
<mat-menu #labelMenu="matMenu"> <mat-menu #labelMenu="matMenu">
<button mat-menu-item *ngFor="let label of labels" <button mat-menu-item *ngFor="let label of labels"
@ -87,7 +87,7 @@
<div *ngIf="currentMail" fxHide.gt-xs> <div *ngIf="currentMail" fxHide.gt-xs>
<button mat-icon-button (click)="deselectCurrentMail()"> <button mat-icon-button (click)="deselectCurrentMail()">
<mat-icon>arrow_back</mat-icon> <mat-icon class="secondary-text">arrow_back</mat-icon>
</button> </button>
</div> </div>
</div> </div>

View File

@ -1,9 +1,10 @@
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div fxLayout="column" fxLayoutAlign="space-between start" <div fxLayout="column" fxLayoutAlign="space-between start"
class="header p-24 pb-4" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> class="header mat-accent-bg p-24 pb-4">
<div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center"> <div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="logo-icon s-32" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">mail</mat-icon> <mat-icon class="logo-icon s-32" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">mail
</mat-icon>
<span class="logo-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">Mailbox</span> <span class="logo-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">Mailbox</span>
</div> </div>
@ -39,8 +40,9 @@
<div class="nav-subheader">{{ 'MAIL.FOLDERS' | translate }}</div> <div class="nav-subheader">{{ 'MAIL.FOLDERS' | translate }}</div>
<div class="nav-item" *ngFor="let folder of folders"> <div class="nav-item" *ngFor="let folder of folders">
<a class="nav-link" matRipple [routerLink]="'/apps/mail/' + folder.handle" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/mail/' + folder.handle"
<mat-icon class="nav-link-icon" *ngIf="folder.icon">{{folder.icon}}</mat-icon> [routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon secondary-text" *ngIf="folder.icon">{{folder.icon}}</mat-icon>
<span>{{folder.title}}</span> <span>{{folder.title}}</span>
</a> </a>
</div> </div>
@ -48,7 +50,8 @@
<div class="nav-subheader">{{ 'MAIL.FILTERS' | translate }}</div> <div class="nav-subheader">{{ 'MAIL.FILTERS' | translate }}</div>
<div class="nav-item" *ngFor="let filter of filters"> <div class="nav-item" *ngFor="let filter of filters">
<a class="nav-link" matRipple [routerLink]="'/apps/mail/filter/' + filter.handle" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/mail/filter/' + filter.handle"
[routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon" [ngClass]="filter.color" *ngIf="filter.icon">{{filter.icon}}</mat-icon> <mat-icon class="nav-link-icon" [ngClass]="filter.color" *ngIf="filter.icon">{{filter.icon}}</mat-icon>
<span>{{filter.title}}</span> <span>{{filter.title}}</span>
</a> </a>
@ -57,7 +60,8 @@
<div class="nav-subheader">{{ 'MAIL.LABELS' | translate }}</div> <div class="nav-subheader">{{ 'MAIL.LABELS' | translate }}</div>
<div class="nav-item" *ngFor="let label of labels"> <div class="nav-item" *ngFor="let label of labels">
<a class="nav-link" matRipple [routerLink]="'/apps/mail/label/' + label.handle" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/mail/label/' + label.handle"
[routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon" [ngStyle]="{'color':label.color}">label</mat-icon> <mat-icon class="nav-link-icon" [ngStyle]="{'color':label.color}">label</mat-icon>
<span>{{label.title}}</span> <span>{{label.title}}</span>
</a> </a>

View File

@ -1,8 +1,10 @@
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div fxLayout="column" fxLayoutAlign="space-between start" <div fxLayout="column" fxLayoutAlign="space-between start"
class="header p-24 pb-4" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> class="header mat-accent-bg p-24 pb-4">
<div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center"> <div class="logo" fxFlex fxLayout="row" fxLayoutAlign="start center">
<mat-icon class="logo-icon s-32" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">check_box</mat-icon> <mat-icon class="logo-icon s-32" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'50ms',scale:'0.2'}}">
check_box
</mat-icon>
<span class="logo-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">To-Do</span> <span class="logo-text" *fuseIfOnDom [@animate]="{value:'*',params:{delay:'100ms',x:'-25px'}}">To-Do</span>
</div> </div>
@ -36,8 +38,9 @@
<div class="nav"> <div class="nav">
<div class="nav-item"> <div class="nav-item">
<a class="nav-link" matRipple [routerLink]="'/apps/todo/all'" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/todo/all'"
<mat-icon class="nav-link-icon">view_headline</mat-icon> [routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon secondary-text">view_headline</mat-icon>
<span>All</span> <span>All</span>
</a> </a>
</div> </div>
@ -45,8 +48,9 @@
<div class="nav-subheader">FILTERS</div> <div class="nav-subheader">FILTERS</div>
<div class="nav-item" *ngFor="let filter of filters"> <div class="nav-item" *ngFor="let filter of filters">
<a class="nav-link" matRipple [routerLink]="'/apps/todo/filter/' + filter.handle" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/todo/filter/' + filter.handle"
<mat-icon class="nav-link-icon" *ngIf="filter.icon">{{filter.icon}}</mat-icon> [routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon secondary-text" *ngIf="filter.icon">{{filter.icon}}</mat-icon>
<span>{{filter.title}}</span> <span>{{filter.title}}</span>
</a> </a>
</div> </div>
@ -54,7 +58,8 @@
<div class="nav-subheader">TAGS</div> <div class="nav-subheader">TAGS</div>
<div class="nav-item" *ngFor="let tag of tags"> <div class="nav-item" *ngFor="let tag of tags">
<a class="nav-link" matRipple [routerLink]="'/apps/todo/tag/' + tag.handle" routerLinkActive="active"> <a class="nav-link" matRipple [routerLink]="'/apps/todo/tag/' + tag.handle"
[routerLinkActive]="['active', 'mat-accent-bg']">
<mat-icon class="nav-link-icon" [ngStyle]="{'color':tag.color}">label</mat-icon> <mat-icon class="nav-link-icon" [ngStyle]="{'color':tag.color}">label</mat-icon>
<span>{{tag.title}}</span> <span>{{tag.title}}</span>
</a> </a>

View File

@ -7,7 +7,7 @@
ngxDraggable ngxDraggable
[model]="todo" [model]="todo"
(click)="readTodo(todo.id)" (click)="readTodo(todo.id)"
[ngClass]="{'current-todo':todo?.id == currentTodo?.id}" [ngClass]="{'current-todo mat-accent-50-bg':todo?.id == currentTodo?.id}"
matRipple matRipple
[@animate]="{value:'*',params:{y:'100%'}}"> [@animate]="{value:'*',params:{y:'100%'}}">
</todo-list-item> </todo-list-item>

View File

@ -63,7 +63,7 @@
<div class="toolbar-separator" *ngIf="hasSelectedTodos"></div> <div class="toolbar-separator" *ngIf="hasSelectedTodos"></div>
<button mat-icon-button [matMenuTriggerFor]="labelMenu" *ngIf="hasSelectedTodos"> <button mat-icon-button [matMenuTriggerFor]="labelMenu" *ngIf="hasSelectedTodos">
<mat-icon>label</mat-icon> <mat-icon class="secondary-text">label</mat-icon>
</button> </button>
<mat-menu #labelMenu="matMenu"> <mat-menu #labelMenu="matMenu">
<button mat-menu-item *ngFor="let tag of tags" (click)="toggleTagOnSelectedTodos(tag.id)"> <button mat-menu-item *ngFor="let tag of tags" (click)="toggleTagOnSelectedTodos(tag.id)">
@ -74,7 +74,7 @@
<div *ngIf="currentTodo" fxHide.gt-lg> <div *ngIf="currentTodo" fxHide.gt-lg>
<button mat-icon-button (click)="deselectCurrentTodo()"> <button mat-icon-button (click)="deselectCurrentTodo()">
<mat-icon>arrow_back</mat-icon> <mat-icon class="secondary-text">arrow_back</mat-icon>
</button> </button>
</div> </div>

View File

@ -5,7 +5,7 @@
<div id="mail-confirm-form" *fuseIfOnDom [@animate]="{value:'*',params:{duration:'300ms',y:'100px'}}"> <div id="mail-confirm-form" *fuseIfOnDom [@animate]="{value:'*',params:{duration:'300ms',y:'100px'}}">
<div class="logo"> <div class="logo">
<mat-icon class="blue-fg s-96">email</mat-icon> <mat-icon class="mat-accent s-96">email</mat-icon>
</div> </div>
<div class="title">Confirm your email address!</div> <div class="title">Confirm your email address!</div>

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24" fxLayout="row" fxLayoutAlign="start center"> <div class="header mat-accent-bg p-24" fxLayout="row" fxLayoutAlign="start center">
<h2>Full width with content scroll</h2> <h2>Full width with content scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24" fxLayout="row" fxLayoutAlign="start center"> <div class="header mat-accent-bg p-24" fxLayout="row" fxLayoutAlign="start center">
<h2>Full width with inner scroll</h2> <h2>Full width with inner scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24" fxLayout="row" fxLayoutAlign="start center"> <div class="header mat-accent-bg p-24" fxLayout="row" fxLayoutAlign="start center">
<h2>Full width with tabs and content scroll</h2> <h2>Full width with tabs and content scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->

View File

@ -8,7 +8,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24" fxLayout="row" fxLayoutAlign="start center"> <div class="header mat-accent-bg p-24" fxLayout="row" fxLayoutAlign="start center">
<h2>Full width with tabs and inner scroll</h2> <h2>Full width with tabs and inner scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->

View File

@ -11,7 +11,7 @@
fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header p-24 mat-accent-bg">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->
@ -31,7 +31,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<h2>Left sidenav with content scroll</h2> <h2>Left sidenav with content scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->

View File

@ -11,7 +11,7 @@
fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->
@ -31,7 +31,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<h2>Left sidenav with inner scroll</h2> <h2>Left sidenav with inner scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->

View File

@ -11,7 +11,7 @@
fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->
@ -31,7 +31,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">

View File

@ -11,7 +11,7 @@
fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->
@ -31,7 +31,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">

View File

@ -10,7 +10,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<h2>Right sidenav with content scroll</h2> <h2>Right sidenav with content scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->
@ -49,7 +49,7 @@
fuseMatSidenavHelper="carded-right-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-right-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->

View File

@ -10,7 +10,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<h2>Right sidenav with inner scroll</h2> <h2>Right sidenav with inner scroll</h2>
</div> </div>
<!-- / CONTENT HEADER --> <!-- / CONTENT HEADER -->
@ -49,7 +49,7 @@
fuseMatSidenavHelper="carded-right-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-right-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->

View File

@ -10,7 +10,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">
@ -130,7 +130,7 @@
fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->

View File

@ -10,7 +10,7 @@
<div class="center"> <div class="center">
<!-- CONTENT HEADER --> <!-- CONTENT HEADER -->
<div class="header white-fg p-24"> <div class="header mat-accent-bg p-24">
<div fxLayout="row" fxLayoutAlign="start center"> <div fxLayout="row" fxLayoutAlign="start center">
@ -130,7 +130,7 @@
fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md"> fuseMatSidenavHelper="carded-left-sidenav" mat-is-locked-open="gt-md">
<!-- SIDENAV HEADER --> <!-- SIDENAV HEADER -->
<div class="header p-24" ngClass="mat-accent-bg" ngClass.gt-md="white-fg"> <div class="header mat-accent-bg p-24">
<h2>Sidenav header</h2> <h2>Sidenav header</h2>
</div> </div>
<!-- / SIDENAV HEADER --> <!-- / SIDENAV HEADER -->

View File

@ -1,2 +1,24 @@
// Import Fuse core library // Import Fuse core library
@import "@fuse/scss/core"; @import "@fuse/scss/core";
// -----------------------------------------------------------------------------------------------------
// @ Multiple material themes example
// -----------------------------------------------------------------------------------------------------
// Define the Material palettes
$yellow-theme-primary: mat-palette($mat-fusedark);
$yellow-theme-accent: mat-palette($mat-yellow, 600, 400, 700);
$yellow-theme-warn: mat-palette($mat-red);
// Create the Material theme object
$yellow-theme: mat-light-theme($yellow-theme-primary, $yellow-theme-accent, $yellow-theme-warn);
// Add ".yellow-theme" class to the body to activate this theme
.yellow-theme {
// Generate the Angular Material theme
@include angular-material-theme($yellow-theme);
// Generate the fuse color classes with the new colors...
@include generateFuseColorClasses($yellow-theme-primary, $yellow-theme-accent, $yellow-theme-warn);
}