diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..94e394b4 --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +https://themeforest.net/licenses/terms/regular \ No newline at end of file diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 29e2809f..64ca8fd3 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,6 +1,12 @@ import { Component } from '@angular/core'; import { FuseSplashScreenService } from './core/services/splash-screen.service'; import { TranslateService } from '@ngx-translate/core'; +import { FuseTranslationLoaderService } from './core/services/translation-loader.service'; + +import { FuseNavigationService } from './core/components/navigation/navigation.service'; +import { FuseNavigationModel } from './navigation/navigation.model'; +import { locale as navigationEnglish } from './navigation/i18n/en'; +import { locale as navigationTurkish } from './navigation/i18n/tr'; @Component({ selector : 'fuse-root', @@ -10,8 +16,10 @@ import { TranslateService } from '@ngx-translate/core'; export class AppComponent { constructor( + private fuseNavigationService: FuseNavigationService, private fuseSplashScreen: FuseSplashScreenService, - private translate: TranslateService + private translate: TranslateService, + private translationLoader: FuseTranslationLoaderService ) { // Add languages @@ -22,5 +30,11 @@ export class AppComponent // Use a language this.translate.use('en'); + + // Set the navigation model + this.fuseNavigationService.setNavigationModel(new FuseNavigationModel()); + + // Set the navigation translations + this.translationLoader.loadTranslations(navigationEnglish, navigationTurkish); } } diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 5de0a8e8..9e884c46 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; -import { HttpModule } from '@angular/http'; import { HttpClientModule } from '@angular/common/http'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { RouterModule, Routes } from '@angular/router'; @@ -27,7 +26,6 @@ const appRoutes: Routes = [ ], imports : [ BrowserModule, - HttpModule, HttpClientModule, BrowserAnimationsModule, RouterModule.forRoot(appRoutes), diff --git a/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html index 4712628d..a73d2aae 100644 --- a/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html +++ b/src/app/core/components/navigation/horizontal/nav-collapse/nav-horizontal-collapse.component.html @@ -1,6 +1,10 @@ {{item.icon}} - {{item.title}} + {{item.title}} + + {{item.badge.title}} + keyboard_arrow_right diff --git a/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html index 68b37b53..bfff9a59 100644 --- a/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html +++ b/src/app/core/components/navigation/horizontal/nav-item/nav-horizontal-item.component.html @@ -1,8 +1,8 @@ {{item.icon}} - {{item.title}} - {{item.title}} + {{item.badge.title}} @@ -10,8 +10,8 @@ {{item.icon}} - {{item.title}} - {{item.title}} + {{item.badge.title}} diff --git a/src/app/core/components/navigation/navigation.model.ts b/src/app/core/components/navigation/navigation.model.ts new file mode 100644 index 00000000..30268ded --- /dev/null +++ b/src/app/core/components/navigation/navigation.model.ts @@ -0,0 +1,5 @@ +export interface FuseNavigationModelInterface +{ + model: any[]; +} + diff --git a/src/app/core/components/navigation/navigation.service.ts b/src/app/core/components/navigation/navigation.service.ts index 6dbe6c86..b85069b1 100644 --- a/src/app/core/components/navigation/navigation.service.ts +++ b/src/app/core/components/navigation/navigation.service.ts @@ -1,6 +1,6 @@ import { EventEmitter, Injectable } from '@angular/core'; -import { NavigationModel } from '../../../navigation.model'; import { BehaviorSubject } from 'rxjs/BehaviorSubject'; +import { FuseNavigationModelInterface } from './navigation.model'; @Injectable() export class FuseNavigationService @@ -8,13 +8,11 @@ export class FuseNavigationService onNavCollapseToggle = new EventEmitter(); onNavCollapseToggled = new EventEmitter(); onNavigationModelChange: BehaviorSubject = new BehaviorSubject({}); - navigationModel: NavigationModel; + navigationModel: FuseNavigationModelInterface; flatNavigation: any[] = []; constructor() { - this.navigationModel = new NavigationModel(); - this.onNavigationModelChange.next(this.navigationModel.model); } /** @@ -155,8 +153,15 @@ export class FuseNavigationService */ getFlatNavigation(navigationItems?) { + // If navigation items not provided, + // that means we are running the function + // for the first time... if ( !navigationItems ) { + // Reset the flat navigation + this.flatNavigation = []; + + // Get the entire navigation model navigationItems = this.navigationModel.model; } @@ -181,7 +186,10 @@ export class FuseNavigationService if ( navItem.type === 'collapse' || navItem.type === 'group' ) { - this.getFlatNavigation(navItem.children); + if ( navItem.children ) + { + this.getFlatNavigation(navItem.children); + } } } diff --git a/src/app/core/components/navigation/vertical/nav-collapse/nav-vertical-collapse.component.html b/src/app/core/components/navigation/vertical/nav-collapse/nav-vertical-collapse.component.html index 5a255b6f..6ff78f82 100644 --- a/src/app/core/components/navigation/vertical/nav-collapse/nav-vertical-collapse.component.html +++ b/src/app/core/components/navigation/vertical/nav-collapse/nav-vertical-collapse.component.html @@ -1,8 +1,13 @@ {{item.icon}} - {{item.title}} + {{item.title}} + + {{item.badge.title}} + keyboard_arrow_right +
diff --git a/src/app/core/components/navigation/vertical/nav-group/nav-vertical-group.component.html b/src/app/core/components/navigation/vertical/nav-group/nav-vertical-group.component.html index 3fd40abf..fe5042bb 100644 --- a/src/app/core/components/navigation/vertical/nav-group/nav-vertical-group.component.html +++ b/src/app/core/components/navigation/vertical/nav-group/nav-vertical-group.component.html @@ -1,6 +1,7 @@
- {{ item.title }} + {{ item.title }}
+
diff --git a/src/app/core/components/navigation/vertical/nav-item/nav-vertical-item.component.html b/src/app/core/components/navigation/vertical/nav-item/nav-vertical-item.component.html index 33ec1c81..f0dc5201 100644 --- a/src/app/core/components/navigation/vertical/nav-item/nav-vertical-item.component.html +++ b/src/app/core/components/navigation/vertical/nav-item/nav-vertical-item.component.html @@ -1,8 +1,8 @@ {{item.icon}} - {{item.title}} - {{item.title}} + {{item.badge.title}} @@ -10,8 +10,8 @@ {{item.icon}} - {{item.title}} - {{item.title}} + {{item.badge.title}} diff --git a/src/app/core/modules/shared.module.ts b/src/app/core/modules/shared.module.ts index b3ae6152..b552656c 100644 --- a/src/app/core/modules/shared.module.ts +++ b/src/app/core/modules/shared.module.ts @@ -5,7 +5,7 @@ import { CommonModule } from '@angular/common'; import { MaterialModule } from './material.module'; import { FlexLayoutModule } from '@angular/flex-layout'; import { ColorPickerModule } from 'ngx-color-picker'; -import { NgxDnDModule } from '@withinpixels/ngx-dnd'; +import { NgxDnDModule } from '@swimlane/ngx-dnd'; import { NgxDatatableModule } from '@swimlane/ngx-datatable'; import { FuseMatSidenavHelperDirective, FuseMatSidenavTogglerDirective } from '../directives/fuse-mat-sidenav-helper/fuse-mat-sidenav-helper.directive'; diff --git a/src/app/core/scss/partials/_navigation.scss b/src/app/core/scss/partials/_navigation.scss index 692ebda0..9385e074 100644 --- a/src/app/core/scss/partials/_navigation.scss +++ b/src/app/core/scss/partials/_navigation.scss @@ -47,14 +47,20 @@ } .nav-link-badge { + display: flex; + align-items: center; min-width: 20px; height: 20px; - line-height: 20px; padding: 0 7px; font-size: 11px; font-weight: 500; border-radius: 20px; transition: opacity 0.2s ease-in-out 0.1s; + margin-left: 8px; + + + .collapse-arrow { + margin-left: 8px; + } } &:hover { diff --git a/src/app/core/scss/partials/plugins/_ngx-color-picker.scss b/src/app/core/scss/partials/plugins/_ngx-color-picker.scss index d103a994..aab3d8d7 100644 --- a/src/app/core/scss/partials/plugins/_ngx-color-picker.scss +++ b/src/app/core/scss/partials/plugins/_ngx-color-picker.scss @@ -3,20 +3,21 @@ .color-picker { height: auto !important; border: none !important; + @include mat-elevation(4); .preset-area { - //padding: 4px 15px; - padding: 0 0 12px 12px !important; + padding: 0 0 16px 16px !important; height: 140px; overflow-y: auto; overflow-x: hidden; + > hr { display: none; } + .preset-label { display: none; - } .preset-color { @@ -25,7 +26,8 @@ margin: 0 !important; border: none !important; border-radius: 0 !important; - &:nth-child(14n+3) { + + &:nth-child(14n+1) { clear: both; } } diff --git a/src/app/navigation/i18n/en.ts b/src/app/navigation/i18n/en.ts new file mode 100644 index 00000000..e6a6da10 --- /dev/null +++ b/src/app/navigation/i18n/en.ts @@ -0,0 +1,24 @@ +export const locale = { + lang: 'en', + data: { + 'NAV': { + 'APPLICATIONS': 'Applications', + 'DASHBOARDS' : 'Dashboards', + 'CALENDAR' : 'Calendar', + 'ECOMMERCE' : 'E-Commerce', + 'MAIL' : { + 'TITLE': 'Mail', + 'BADGE': '25' + }, + 'MAIL_NGRX' : { + 'TITLE': 'Mail Ngrx', + 'BADGE': '13' + }, + 'CHAT' : 'Chat', + 'FILE_MANAGER': 'File Manager', + 'CONTACTS' : 'Contacts', + 'TODO' : 'To-Do', + 'SCRUMBOARD' : 'Scrumboard' + } + } +}; diff --git a/src/app/navigation/i18n/tr.ts b/src/app/navigation/i18n/tr.ts new file mode 100644 index 00000000..7eb06307 --- /dev/null +++ b/src/app/navigation/i18n/tr.ts @@ -0,0 +1,24 @@ +export const locale = { + lang: 'tr', + data: { + 'NAV': { + 'APPLICATIONS': 'Programlar', + 'DASHBOARDS' : 'Kontrol Paneli', + 'CALENDAR' : 'Takvim', + 'ECOMMERCE' : 'E-Ticaret', + 'MAIL' : { + 'TITLE': 'Posta', + 'BADGE': '15' + }, + 'MAIL_NGRX' : { + 'TITLE': 'Posta Ngrx', + 'BADGE': '13' + }, + 'CHAT' : 'Sohbet', + 'FILE_MANAGER': 'Dosya Yöneticisi', + 'CONTACTS' : 'Kişiler', + 'TODO' : 'Yapılacaklar', + 'SCRUMBOARD' : 'Proje' + } + } +}; diff --git a/src/app/navigation.model.ts b/src/app/navigation/navigation.model.ts similarity index 69% rename from src/app/navigation.model.ts rename to src/app/navigation/navigation.model.ts index 3c8734cb..c9f4cefa 100644 --- a/src/app/navigation.model.ts +++ b/src/app/navigation/navigation.model.ts @@ -1,4 +1,6 @@ -export class NavigationModel +import { FuseNavigationModelInterface } from '../core/components/navigation/navigation.model'; + +export class FuseNavigationModel implements FuseNavigationModelInterface { public model: any[]; @@ -8,16 +10,19 @@ export class NavigationModel { 'id' : 'applications', 'title' : 'Applications', + 'translate': 'NAV.APPLICATIONS', 'type' : 'group', 'children': [ { 'id' : 'sample', 'title': 'Sample', + 'translate': 'NAV.MAIL.TITLE', 'type' : 'item', 'icon' : 'email', 'url' : '/sample', 'badge': { 'title': 25, + 'translate': 'NAV.MAIL.BADGE', 'bg' : '#F44336', 'fg' : '#FFFFFF' } diff --git a/src/assets/images/backgrounds/april.jpg b/src/assets/images/backgrounds/april.jpg deleted file mode 100644 index 6c2152bb..00000000 Binary files a/src/assets/images/backgrounds/april.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/august.jpg b/src/assets/images/backgrounds/august.jpg deleted file mode 100644 index 14cc9ff7..00000000 Binary files a/src/assets/images/backgrounds/august.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/autumn.jpg b/src/assets/images/backgrounds/autumn.jpg new file mode 100644 index 00000000..1ba75a8f Binary files /dev/null and b/src/assets/images/backgrounds/autumn.jpg differ diff --git a/src/assets/images/backgrounds/dark-material-bg.jpg b/src/assets/images/backgrounds/dark-material-bg.jpg new file mode 100644 index 00000000..2453fde7 Binary files /dev/null and b/src/assets/images/backgrounds/dark-material-bg.jpg differ diff --git a/src/assets/images/backgrounds/december.jpg b/src/assets/images/backgrounds/december.jpg deleted file mode 100644 index d81386bd..00000000 Binary files a/src/assets/images/backgrounds/december.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/february.jpg b/src/assets/images/backgrounds/february.jpg deleted file mode 100644 index a9aa605b..00000000 Binary files a/src/assets/images/backgrounds/february.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/january.jpg b/src/assets/images/backgrounds/january.jpg deleted file mode 100644 index 60ad972b..00000000 Binary files a/src/assets/images/backgrounds/january.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/july.jpg b/src/assets/images/backgrounds/july.jpg deleted file mode 100644 index 1dc30568..00000000 Binary files a/src/assets/images/backgrounds/july.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/june.jpg b/src/assets/images/backgrounds/june.jpg deleted file mode 100644 index 80c6ec24..00000000 Binary files a/src/assets/images/backgrounds/june.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/march.jpg b/src/assets/images/backgrounds/march.jpg deleted file mode 100644 index 01684e40..00000000 Binary files a/src/assets/images/backgrounds/march.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/may.jpg b/src/assets/images/backgrounds/may.jpg deleted file mode 100644 index bc6d04e1..00000000 Binary files a/src/assets/images/backgrounds/may.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/november.jpg b/src/assets/images/backgrounds/november.jpg deleted file mode 100644 index 31694e66..00000000 Binary files a/src/assets/images/backgrounds/november.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/october.jpg b/src/assets/images/backgrounds/october.jpg deleted file mode 100644 index 56364ba5..00000000 Binary files a/src/assets/images/backgrounds/october.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/september.jpg b/src/assets/images/backgrounds/september.jpg deleted file mode 100644 index 637cfde8..00000000 Binary files a/src/assets/images/backgrounds/september.jpg and /dev/null differ diff --git a/src/assets/images/backgrounds/spring.jpg b/src/assets/images/backgrounds/spring.jpg new file mode 100644 index 00000000..2bcc203b Binary files /dev/null and b/src/assets/images/backgrounds/spring.jpg differ diff --git a/src/assets/images/backgrounds/summer.jpg b/src/assets/images/backgrounds/summer.jpg new file mode 100644 index 00000000..a33aa2c6 Binary files /dev/null and b/src/assets/images/backgrounds/summer.jpg differ diff --git a/src/assets/images/backgrounds/winter.jpg b/src/assets/images/backgrounds/winter.jpg new file mode 100644 index 00000000..76caebc5 Binary files /dev/null and b/src/assets/images/backgrounds/winter.jpg differ