From a284063d22689f778b2302b9089467b86fbb6d2a Mon Sep 17 00:00:00 2001 From: Sercan Yemen Date: Sat, 9 Jun 2018 21:18:30 +0300 Subject: [PATCH] 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 --- .../collapsable/collapsable.component.html | 4 +-- .../vertical/item/item.component.html | 4 +-- src/@fuse/scss/partials/_colors.scss | 29 +++++++++++++++++++ src/@fuse/scss/partials/_navigation.scss | 6 ++-- .../chat/chat-start/chat-start.component.html | 6 ++-- .../chat/chat-start/chat-start.component.scss | 4 --- .../sidenavs/left/chats/chats.component.html | 2 +- .../sidenavs/left/chats/chats.component.scss | 2 -- .../sidenavs/left/user/user.component.html | 2 +- .../sidenavs/left/user/user.component.scss | 3 -- .../right/contact/contact.component.html | 2 +- .../right/contact/contact.component.scss | 3 -- .../contact-list/contact-list.component.html | 2 +- .../sidenavs/main/main.component.html | 7 +++-- .../e-commerce/order/order.component.html | 2 +- .../e-commerce/orders/orders.component.html | 2 +- .../e-commerce/product/product.component.html | 2 +- .../products/products.component.html | 2 +- .../file-list/file-list.component.html | 5 ++-- .../mail-list-item.component.html | 2 +- .../mail-list-item.component.scss | 21 +------------- .../mail-list/mail-list.component.html | 2 +- .../main/apps/mail-ngrx/mail.component.html | 8 ++--- .../sidenavs/main/main-sidenav.component.html | 11 +++---- .../mail-list-item.component.html | 2 +- .../mail-list-item.component.scss | 21 +------------- .../mail/mail-list/mail-list.component.html | 2 +- src/app/main/apps/mail/mail.component.html | 8 ++--- .../sidenavs/main/main-sidenav.component.html | 16 ++++++---- .../sidenavs/main/main-sidenav.component.html | 19 +++++++----- .../todo/todo-list/todo-list.component.html | 4 +-- src/app/main/apps/todo/todo.component.html | 4 +-- .../mail-confirm/mail-confirm.component.html | 2 +- .../full-width-1/full-width-1.component.html | 2 +- .../full-width-2/full-width-2.component.html | 2 +- .../full-width-tabbed-1.component.html | 2 +- .../full-width-tabbed-2.component.html | 2 +- .../left-sidenav-1.component.html | 4 +-- .../left-sidenav-2.component.html | 4 +-- .../left-sidenav-tabbed-1.component.html | 4 +-- .../left-sidenav-tabbed-2.component.html | 4 +-- .../right-sidenav-1.component.html | 4 +-- .../right-sidenav-2.component.html | 4 +-- .../right-sidenav-tabbed-1.component.html | 4 +-- .../right-sidenav-tabbed-2.component.html | 4 +-- src/styles.scss | 24 ++++++++++++++- 46 files changed, 144 insertions(+), 131 deletions(-) diff --git a/src/@fuse/components/navigation/vertical/collapsable/collapsable.component.html b/src/@fuse/components/navigation/vertical/collapsable/collapsable.component.html index f85fbd4d..c9b212ab 100644 --- a/src/@fuse/components/navigation/vertical/collapsable/collapsable.component.html +++ b/src/@fuse/components/navigation/vertical/collapsable/collapsable.component.html @@ -7,7 +7,7 @@ @@ -28,7 +28,7 @@ diff --git a/src/@fuse/components/navigation/vertical/item/item.component.html b/src/@fuse/components/navigation/vertical/item/item.component.html index 927f3cb3..1cedfb65 100644 --- a/src/@fuse/components/navigation/vertical/item/item.component.html +++ b/src/@fuse/components/navigation/vertical/item/item.component.html @@ -2,7 +2,7 @@ @@ -22,7 +22,7 @@ diff --git a/src/@fuse/scss/partials/_colors.scss b/src/@fuse/scss/partials/_colors.scss index 9b7bc22f..7b98456d 100644 --- a/src/@fuse/scss/partials/_colors.scss +++ b/src/@fuse/scss/partials/_colors.scss @@ -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... @each $colorName, $colorMap in $matColorsMap { diff --git a/src/@fuse/scss/partials/_navigation.scss b/src/@fuse/scss/partials/_navigation.scss index 4e52dc95..468add93 100644 --- a/src/@fuse/scss/partials/_navigation.scss +++ b/src/@fuse/scss/partials/_navigation.scss @@ -72,14 +72,14 @@ } &.active { - background-color: mat-color($accent); + //background-color: mat-color($accent); .mat-ripple-element { - background-color: mat-color($accent, default-contrast, 0.1); + //background-color: mat-color($accent, default-contrast, 0.1); } &, .nav-link-icon { - color: mat-color($accent, default-contrast); + //color: mat-color($accent, default-contrast); } .nav-link-badge { diff --git a/src/app/main/apps/chat/chat-start/chat-start.component.html b/src/app/main/apps/chat/chat-start/chat-start.component.html index 77c6eb9e..50ad6b3d 100644 --- a/src/app/main/apps/chat/chat-start/chat-start.component.html +++ b/src/app/main/apps/chat/chat-start/chat-start.component.html @@ -3,13 +3,15 @@ Chat App - Select contact to start the chat!.. + + Select contact to start the chat!.. + diff --git a/src/app/main/apps/mail-ngrx/sidenavs/main/main-sidenav.component.html b/src/app/main/apps/mail-ngrx/sidenavs/main/main-sidenav.component.html index a3d8f041..a858a439 100644 --- a/src/app/main/apps/mail-ngrx/sidenavs/main/main-sidenav.component.html +++ b/src/app/main/apps/mail-ngrx/sidenavs/main/main-sidenav.component.html @@ -1,6 +1,6 @@
+ class="header mat-accent-bg p-24 pb-4">