Ver código fonte

initial commit

kroenen 5 anos atrás
commit
ff48d5d523

+ 2
- 0
.gitignore Ver arquivo

@@ -0,0 +1,2 @@
1
+node_modules
2
+package-lock.json

+ 100
- 0
angular.json Ver arquivo

@@ -0,0 +1,100 @@
1
+{
2
+  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+  "version": 1,
4
+  "newProjectRoot": "projects",
5
+  "projects": {
6
+    "sidenav": {
7
+      "root": "",
8
+      "sourceRoot": "src",
9
+      "projectType": "application",
10
+      "prefix": "app",
11
+      "schematics": {},
12
+      "architect": {
13
+        "build": {
14
+          "builder": "@angular-devkit/build-angular:browser",
15
+          "options": {
16
+            "outputPath": "dist/sidenav",
17
+            "index": "src/index.html",
18
+            "main": "src/main.ts",
19
+            "polyfills": "src/polyfills.ts",
20
+            "tsConfig": "src/tsconfig.app.json",
21
+            "assets": [
22
+              "src/favicon.ico",
23
+              "src/assets"
24
+            ],
25
+            "styles": [
26
+              "src/styles.scss"
27
+            ],
28
+            "scripts": []
29
+          },
30
+          "configurations": {
31
+            "production": {
32
+              "fileReplacements": [
33
+                {
34
+                  "replace": "src/environments/environment.ts",
35
+                  "with": "src/environments/environment.prod.ts"
36
+                }
37
+              ],
38
+              "optimization": true,
39
+              "outputHashing": "all",
40
+              "sourceMap": false,
41
+              "extractCss": true,
42
+              "namedChunks": false,
43
+              "aot": true,
44
+              "extractLicenses": true,
45
+              "vendorChunk": false,
46
+              "buildOptimizer": true
47
+            }
48
+          }
49
+        },
50
+        "serve": {
51
+          "builder": "@angular-devkit/build-angular:dev-server",
52
+          "options": {
53
+            "browserTarget": "sidenav:build"
54
+          },
55
+          "configurations": {
56
+            "production": {
57
+              "browserTarget": "sidenav:build:production"
58
+            }
59
+          }
60
+        },
61
+        "extract-i18n": {
62
+          "builder": "@angular-devkit/build-angular:extract-i18n",
63
+          "options": {
64
+            "browserTarget": "sidenav:build"
65
+          }
66
+        },
67
+        "test": {
68
+          "builder": "@angular-devkit/build-angular:karma",
69
+          "options": {
70
+            "main": "src/test.ts",
71
+            "polyfills": "src/polyfills.ts",
72
+            "tsConfig": "src/tsconfig.spec.json",
73
+            "karmaConfig": "src/karma.conf.js",
74
+            "styles": [
75
+              "styles.scss"
76
+            ],
77
+            "scripts": [],
78
+            "assets": [
79
+              "src/favicon.ico",
80
+              "src/assets"
81
+            ]
82
+          }
83
+        },
84
+        "lint": {
85
+          "builder": "@angular-devkit/build-angular:tslint",
86
+          "options": {
87
+            "tsConfig": [
88
+              "src/tsconfig.app.json",
89
+              "src/tsconfig.spec.json"
90
+            ],
91
+            "exclude": [
92
+              "**/node_modules/**"
93
+            ]
94
+          }
95
+        }
96
+      }
97
+    }
98
+  },
99
+  "defaultProject": "sidenav"
100
+}

+ 46
- 0
package.json Ver arquivo

@@ -0,0 +1,46 @@
1
+{
2
+  "name": "sidnav",
3
+  "version": "0.0.0",
4
+  "private": true,
5
+  "dependencies": {
6
+    "@angular/common": "8.2.1",
7
+    "@angular/compiler": "8.2.1",
8
+    "@angular/core": "8.2.1",
9
+    "@angular/forms": "8.2.1",
10
+    "@angular/platform-browser": "8.2.1",
11
+    "@angular/platform-browser-dynamic": "8.2.1",
12
+    "@angular/router": "8.2.1",
13
+    "core-js": "3.2.0",
14
+    "rxjs": "6.5.2",
15
+    "zone.js": "0.10.1"
16
+  },
17
+  "scripts": {
18
+    "ng": "ng",
19
+    "start": "ng serve",
20
+    "build": "ng build",
21
+    "test": "ng test",
22
+    "lint": "ng lint",
23
+    "e2e": "ng e2e"
24
+  },
25
+  "devDependencies": {
26
+    "@angular-devkit/build-angular": "^0.802.1",
27
+    "@angular/cli": "~8.2.1",
28
+    "@angular/compiler-cli": "~8.2.1",
29
+    "@angular/language-service": "~8.2.1",
30
+    "@types/jasmine": "~2.8.8",
31
+    "@types/jasminewd2": "~2.0.3",
32
+    "@types/node": "~8.9.4",
33
+    "codelyzer": "~4.5.0",
34
+    "jasmine-core": "~2.99.1",
35
+    "jasmine-spec-reporter": "~4.2.1",
36
+    "karma": "~3.0.0",
37
+    "karma-chrome-launcher": "~2.2.0",
38
+    "karma-coverage-istanbul-reporter": "~2.0.1",
39
+    "karma-jasmine": "~1.1.2",
40
+    "karma-jasmine-html-reporter": "^0.2.2",
41
+    "protractor": "~5.4.0",
42
+    "ts-node": "~7.0.0",
43
+    "tslint": "~5.11.0",
44
+    "typescript": "~3.5.3"
45
+  }
46
+}

+ 16
- 0
src/app/app.component.html Ver arquivo

@@ -0,0 +1,16 @@
1
+<sidenav-container
2
+dir="left" 
3
+mode="hover"
4
+>
5
+<sidenav-drawer urlBackground="assets/sidebar-1.jpg" >
6
+    <sidenav-drawer-item route="/" [check]="'(\\s*)'" itemTitle="Accueil">
7
+			<i class="fas fa-home"></i>
8
+		</sidenav-drawer-item>
9
+    <sidenav-drawer-item route="/home" [check]="'(\/home)'" itemTitle="Accueil">
10
+			<i class="fas fa-home"></i>
11
+		</sidenav-drawer-item>
12
+  </sidenav-drawer>
13
+  <sidenav-content>
14
+    <router-outlet></router-outlet>
15
+  </sidenav-content>
16
+</sidenav-container>

+ 0
- 0
src/app/app.component.scss Ver arquivo


+ 16
- 0
src/app/app.component.ts Ver arquivo

@@ -0,0 +1,16 @@
1
+import { Component } from '@angular/core';
2
+import { SidenavService } from './sidenav/sidenav.service';
3
+
4
+@Component({
5
+  selector: 'my-app',
6
+  templateUrl: './app.component.html',
7
+  styleUrls: [ './app.component.scss' ]
8
+})
9
+export class AppComponent  {
10
+	name = 'Angular';
11
+	
12
+	constructor(
13
+		public _menu: SidenavService
14
+	){}
15
+  
16
+}

+ 16
- 0
src/app/app.module.ts Ver arquivo

@@ -0,0 +1,16 @@
1
+import { NgModule } from '@angular/core';
2
+import { BrowserModule } from '@angular/platform-browser';
3
+import { FormsModule } from '@angular/forms';
4
+
5
+import { AppComponent } from './app.component';
6
+import { HelloComponent } from './hello.component';
7
+
8
+import { SideNavModule } from './sidenav/sidenav.module'
9
+import { AppRoutingModule } from './routing.module';
10
+
11
+@NgModule({
12
+  imports:      [ BrowserModule, FormsModule, SideNavModule, AppRoutingModule ],
13
+  declarations: [ AppComponent, HelloComponent ],
14
+  bootstrap:    [ AppComponent ]
15
+})
16
+export class AppModule { }

+ 10
- 0
src/app/hello.component.ts Ver arquivo

@@ -0,0 +1,10 @@
1
+import { Component, Input } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'hello',
5
+  template: `<h1>Hello {{name}}!</h1>`,
6
+  styles: [`h1 { font-family: Lato; }`]
7
+})
8
+export class HelloComponent  {
9
+	name: string = "couillu";
10
+}

+ 14
- 0
src/app/routing.module.ts Ver arquivo

@@ -0,0 +1,14 @@
1
+import { NgModule } from "@angular/core";
2
+import { RouterModule, Routes } from "@angular/router";
3
+import { HelloComponent } from "./hello.component";
4
+
5
+const routes : Routes = [
6
+	{ path: "", component: HelloComponent},
7
+	{ path: "home", component: HelloComponent}
8
+]
9
+
10
+@NgModule({
11
+	imports: [RouterModule.forRoot(routes)],
12
+	exports: [RouterModule]
13
+})
14
+export class AppRoutingModule { }

+ 18
- 0
src/app/sidenav/sidenav-container/sidenav-container.component.ts Ver arquivo

@@ -0,0 +1,18 @@
1
+import { Component, OnInit, HostBinding, Input } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'sidenav-container',
5
+  template: '<ng-content></ng-content>'
6
+})
7
+export class SidenavContainerComponent {
8
+  @HostBinding('class')
9
+  private get className() {
10
+    return ['sidenav-container', this.dir, this.mode].join(' ');
11
+  }
12
+  
13
+  @Input()
14
+  public dir : string = 'left'
15
+
16
+  @Input()
17
+  public mode : string = 'hover';
18
+}

+ 10
- 0
src/app/sidenav/sidenav-content/sidenav-content.component.ts Ver arquivo

@@ -0,0 +1,10 @@
1
+import { Component, OnInit } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'sidenav-content',
5
+  template: '<ng-content></ng-content>',
6
+  host:{
7
+    'class': 'sidenav-content'
8
+  }
9
+})
10
+export class SidenavContentComponent {}

+ 0
- 0
src/app/sidenav/sidenav-drawer-item/sidenav-drawer-item.component.css Ver arquivo


+ 6
- 0
src/app/sidenav/sidenav-drawer-item/sidenav-drawer-item.component.html Ver arquivo

@@ -0,0 +1,6 @@
1
+<li #button (click)="_menu.clickItem($event, route)">
2
+	<a matRipple matRippleColor="#ffffff66" [routerLink]="route">
3
+		<ng-content></ng-content>
4
+		<span > {{ title }} </span>
5
+	</a>
6
+</li>

+ 31
- 0
src/app/sidenav/sidenav-drawer-item/sidenav-drawer-item.component.ts Ver arquivo

@@ -0,0 +1,31 @@
1
+import { Component, OnInit, Input, ViewChild } from '@angular/core';
2
+import { SidenavService } from '../sidenav.service';
3
+import { startWith, map } from "rxjs/operators";
4
+
5
+@Component({
6
+  selector: 'sidenav-drawer-item',
7
+  templateUrl: './sidenav-drawer-item.component.html',
8
+  styleUrls: ['./sidenav-drawer-item.component.css']
9
+})
10
+export class SidenavDrawerItemComponent implements OnInit {
11
+  @Input('route') route;
12
+	@Input('itemTitle') title;
13
+	@Input('check') check?;
14
+
15
+	@ViewChild('button', { static: true }) element;
16
+
17
+	constructor(
18
+		public _menu: SidenavService 
19
+	){ }
20
+	
21
+	ngOnInit(){
22
+		if(this.check)
23
+			this._menu.currentRouteChange.pipe(
24
+				startWith(this._menu.currentRoute),
25
+				map(url => url)
26
+			).subscribe((url) => {
27
+				const _regex = new RegExp(this.check)
28
+				if(_regex.exec(url)) this._menu.setSelectedItem(this.element.nativeElement)
29
+			})
30
+	}
31
+}

+ 0
- 0
src/app/sidenav/sidenav-drawer/sidenav-drawer.component.css Ver arquivo


+ 6
- 0
src/app/sidenav/sidenav-drawer/sidenav-drawer.component.html Ver arquivo

@@ -0,0 +1,6 @@
1
+<div class="sidenav-drawer">
2
+  <ul>
3
+    <ng-content></ng-content>
4
+	</ul>
5
+	<div *ngIf="urlBackground" class="sidenav-background" [style.background-image]="'url(' + urlBackground + ')'"></div>
6
+</div>

+ 16
- 0
src/app/sidenav/sidenav-drawer/sidenav-drawer.component.ts Ver arquivo

@@ -0,0 +1,16 @@
1
+import { Component, OnInit, HostBinding, Input } from '@angular/core';
2
+
3
+@Component({
4
+  selector: 'sidenav-drawer',
5
+  templateUrl: './sidenav-drawer.component.html',
6
+  styleUrls: ['./sidenav-drawer.component.css'],
7
+  host:{
8
+    'class': 'sidenav-drawer-container'
9
+  }
10
+})
11
+export class SidenavDrawerComponent {
12
+
13
+  @Input()
14
+  public urlBackground : string;
15
+
16
+}

+ 29
- 0
src/app/sidenav/sidenav.module.ts Ver arquivo

@@ -0,0 +1,29 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+import { SidenavContainerComponent } from './sidenav-container/sidenav-container.component';
4
+import { SidenavContentComponent } from './sidenav-content/sidenav-content.component';
5
+import { SidenavDrawerComponent } from './sidenav-drawer/sidenav-drawer.component';
6
+import { SidenavDrawerItemComponent } from './sidenav-drawer-item/sidenav-drawer-item.component';
7
+import { SidenavService } from './sidenav.service';
8
+import { AppRoutingModule } from '../routing.module';
9
+
10
+@NgModule({
11
+	imports: [
12
+		CommonModule,
13
+		AppRoutingModule
14
+	],
15
+	declarations: [
16
+		SidenavContainerComponent,
17
+		SidenavContentComponent,
18
+		SidenavDrawerComponent,
19
+		SidenavDrawerItemComponent
20
+	],
21
+	exports: [
22
+		SidenavContainerComponent,
23
+		SidenavContentComponent,
24
+		SidenavDrawerComponent,
25
+		SidenavDrawerItemComponent
26
+	], 
27
+	providers: [SidenavService]
28
+})
29
+export class SideNavModule { }

+ 35
- 0
src/app/sidenav/sidenav.service.ts Ver arquivo

@@ -0,0 +1,35 @@
1
+import { Injectable } from "@angular/core";
2
+import { Router } from "@angular/router";
3
+import { Observable } from "rxjs";
4
+import { map, filter } from "rxjs/operators";
5
+
6
+@Injectable()
7
+export class SidenavService {
8
+	selectedElement;
9
+	currentRouteChange: Observable<string>;
10
+	currentRoute: string;
11
+
12
+	constructor(
13
+		private _router: Router
14
+	){
15
+		this.currentRoute = this._router.routerState.snapshot.url;
16
+		this.currentRouteChange = this._router.events.pipe(
17
+			filter((status : any) => status.urlAfterRedirects !== undefined && status.state === undefined),
18
+			map((status : any) => {
19
+				this.currentRoute = status.urlAfterRedirects;
20
+				return status.urlAfterRedirects;
21
+			})
22
+		)
23
+	}
24
+
25
+	clickItem(event: any, route: string) {
26
+		if(this.selectedElement !== event.target.parentElement.parentElement && event.target.parentElement.parentElement.tagName === 'LI') 
27
+			this.setSelectedItem(event.target.parentElement.parentElement)
28
+	}
29
+
30
+	setSelectedItem(element: Element) {
31
+		if(this.selectedElement) this.selectedElement.classList.remove('active-item')
32
+		this.selectedElement = element;
33
+		this.selectedElement.classList.add('active-item')
34
+	}
35
+}

BIN
src/assets/sidebar-1.jpg Ver arquivo


+ 20
- 0
src/index.html Ver arquivo

@@ -0,0 +1,20 @@
1
+<!doctype html>
2
+<html lang="en">
3
+
4
+<head>
5
+  <meta charset="utf-8">
6
+  <title>SideNav</title>
7
+  <base href="/">
8
+
9
+  <meta name="viewport" content="width=device-width, initial-scale=1">
10
+  <meta name="apple-mobile-web-app-capable" content="yes" />
11
+  <link rel="icon" type="image/x-icon" href="assets/icone.png">
12
+  <link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
13
+</head>
14
+
15
+<body>
16
+  <my-app>
17
+		Chargement...
18
+  </my-app>
19
+</body>
20
+</html>

+ 31
- 0
src/karma.conf.js Ver arquivo

@@ -0,0 +1,31 @@
1
+// Karma configuration file, see link for more information
2
+// https://karma-runner.github.io/1.0/config/configuration-file.html
3
+
4
+module.exports = function (config) {
5
+  config.set({
6
+    basePath: '',
7
+    frameworks: ['jasmine', '@angular-devkit/build-angular'],
8
+    plugins: [
9
+      require('karma-jasmine'),
10
+      require('karma-chrome-launcher'),
11
+      require('karma-jasmine-html-reporter'),
12
+      require('karma-coverage-istanbul-reporter'),
13
+      require('@angular-devkit/build-angular/plugins/karma')
14
+    ],
15
+    client: {
16
+      clearContext: false // leave Jasmine Spec Runner output visible in browser
17
+    },
18
+    coverageIstanbulReporter: {
19
+      dir: require('path').join(__dirname, '../coverage'),
20
+      reports: ['html', 'lcovonly'],
21
+      fixWebpackSourcePaths: true
22
+    },
23
+    reporters: ['progress', 'kjhtml'],
24
+    port: 9876,
25
+    colors: true,
26
+    logLevel: config.LOG_INFO,
27
+    autoWatch: true,
28
+    browsers: ['Chrome'],
29
+    singleRun: false
30
+  });
31
+};

+ 16
- 0
src/main.ts Ver arquivo

@@ -0,0 +1,16 @@
1
+import './polyfills';
2
+
3
+import { enableProdMode } from '@angular/core';
4
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
5
+
6
+import { AppModule } from './app/app.module';
7
+
8
+platformBrowserDynamic().bootstrapModule(AppModule).then(ref => {
9
+  // Ensure Angular destroys itself on hot reloads.
10
+  if (window['ngRef']) {
11
+    window['ngRef'].destroy();
12
+  }
13
+  window['ngRef'] = ref;
14
+
15
+  // Otherwise, log the boot error
16
+}).catch(err => console.error(err));

+ 67
- 0
src/polyfills.ts Ver arquivo

@@ -0,0 +1,67 @@
1
+/**
2
+ * This file includes polyfills needed by Angular and is loaded before the app.
3
+ * You can add your own extra polyfills to this file.
4
+ *
5
+ * This file is divided into 2 sections:
6
+ *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7
+ *   2. Application imports. Files imported after ZoneJS that should be loaded before your main
8
+ *      file.
9
+ *
10
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11
+ * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12
+ * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13
+ *
14
+ * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
15
+ */
16
+
17
+/***************************************************************************************************
18
+ * BROWSER POLYFILLS
19
+ */
20
+
21
+/** IE9, IE10 and IE11 requires all of the following polyfills. **/
22
+// import 'core-js/es6/symbol';
23
+// import 'core-js/es6/object';
24
+// import 'core-js/es6/function';
25
+// import 'core-js/es6/parse-int';
26
+// import 'core-js/es6/parse-float';
27
+// import 'core-js/es6/number';
28
+// import 'core-js/es6/math';
29
+// import 'core-js/es6/string';
30
+// import 'core-js/es6/date';
31
+// import 'core-js/es6/array';
32
+// import 'core-js/es6/regexp';
33
+// import 'core-js/es6/map';
34
+// import 'core-js/es6/set';
35
+
36
+/** IE10 and IE11 requires the following for NgClass support on SVG elements */
37
+// import 'classlist.js';  // Run `npm install --save classlist.js`.
38
+
39
+/** IE10 and IE11 requires the following to support `@angular/animation`. */
40
+// import 'web-animations-js';  // Run `npm install --save web-animations-js`.
41
+
42
+
43
+/** Evergreen browsers require these. **/
44
+// import 'core-js/es6/reflect';
45
+import 'core-js/es/reflect';
46
+
47
+
48
+/** ALL Firefox browsers require the following to support `@angular/animation`. **/
49
+// import 'web-animations-js';  // Run `npm install --save web-animations-js`.
50
+
51
+
52
+
53
+/***************************************************************************************************
54
+ * Zone JS is required by Angular itself.
55
+ */
56
+import 'zone.js/dist/zone';  // Included with Angular CLI.
57
+
58
+
59
+/***************************************************************************************************
60
+ * APPLICATION IMPORTS
61
+ */
62
+
63
+/**
64
+ * Date, currency, decimal and percent pipes.
65
+ * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
66
+ */
67
+// import 'intl';  // Run `npm install --save intl`.

+ 178
- 0
src/styles.scss Ver arquivo

@@ -0,0 +1,178 @@
1
+html, body {
2
+  margin: 0;
3
+  padding: 0;
4
+  box-sizing: border-box;
5
+  .sidenav-container{
6
+    margin: 0;
7
+    padding:0;
8
+    top: 0;
9
+    bottom: 0;
10
+    left: 0;
11
+    right: 0;
12
+    display: block;
13
+    position: absolute;
14
+    overflow: hidden;
15
+    
16
+    &.left{
17
+      &.fixed{
18
+        .sidenav-drawer-container {
19
+          transition: left 0.3s;
20
+          left: 0;
21
+        }
22
+        .sidenav-content {
23
+          margin-left: 240px;
24
+        }
25
+      } 
26
+
27
+      &.hover {
28
+        .sidenav-drawer-container{
29
+          transition: left 0.3s;
30
+          left: -180px;
31
+          &:hover {
32
+            left: 0;
33
+          }
34
+        }
35
+        .sidenav-content {
36
+          margin-left: 60px;
37
+        }
38
+      }
39
+      .sidenav-drawer>ul li>a>i {
40
+        float: right;
41
+        right: 10px;
42
+      }
43
+
44
+    }
45
+
46
+    &.right{
47
+      &.fixed {
48
+        .sidenav-drawer-container{
49
+          transition: right 0.3s;
50
+          right: 0;        
51
+        }
52
+        .sidenav-content {
53
+          margin-right: 240px;
54
+        }
55
+      }
56
+      
57
+      
58
+      &.hover{
59
+        .sidenav-drawer-container{
60
+          transition: right 0.3s;
61
+          right: -180px;
62
+          &:hover {
63
+            right: 0;
64
+          }
65
+        }
66
+        .sidenav-content {
67
+          margin-right: 60px;
68
+        }
69
+
70
+      } 
71
+
72
+      .sidenav-drawer>ul li>a{
73
+        >i {
74
+          float: left;
75
+          left: 10px;
76
+        }
77
+        >span {
78
+          margin-left:40px;
79
+        }
80
+      }
81
+    }
82
+
83
+    .sidenav-drawer-container{
84
+      z-index: 99999;
85
+      display: block;
86
+      position: absolute;
87
+      top: 0;
88
+      bottom: 0;
89
+      width:240px;
90
+      box-sizing: border-box;
91
+      box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3);
92
+      background-color: rgba(255, 0, 0, 1);
93
+      
94
+			.sidenav-drawer{
95
+				.sidenav-background{
96
+					position: absolute;
97
+					z-index: 1;
98
+					height: 100%;
99
+					width: 100%;
100
+					display: block;
101
+					top: 0;
102
+					left: 0;
103
+					background-size: cover;
104
+					background-position: center center;
105
+	
106
+					&:after {
107
+						position: absolute;
108
+						z-index: 3;
109
+						width: 100%;
110
+						height: 100%;
111
+						content: "";
112
+						display: block;
113
+						background: #fff;
114
+						opacity: .93;
115
+						background-color: rgba(255, 0, 0, 1);
116
+						opacity: .6;
117
+					}
118
+				}
119
+				>ul{
120
+					position: relative;
121
+					z-index: 4;
122
+					padding: 0;
123
+					padding-bottom: 120px;
124
+					list-style-type: none;
125
+					margin: 10px 0 0 0;
126
+					width: 258px;
127
+					box-sizing: border-box;
128
+
129
+					sidenav-drawer-item>li {
130
+						padding: 4px 30px 4px 10px;
131
+						width: 100%;
132
+						box-sizing: border-box;
133
+						> a {
134
+							border-radius: 6px;
135
+							color: #ffffff;
136
+							display: block;
137
+							padding: 10px 10px 10px 10px;
138
+							position: relative;
139
+							box-sizing: border-box;
140
+							transition: all 0.3s;
141
+							text-decoration: none;
142
+							overflow: hidden;
143
+							z-index: 0;
144
+							&:hover {
145
+								background-color: rgba(255, 255, 255, 0.3);
146
+							}
147
+							i {
148
+								width: 20px;
149
+								height: 20px;
150
+								font-size: 20px;
151
+								position: absolute;
152
+								top: 50%;
153
+								margin-top: -10px;
154
+							}
155
+							span {
156
+								display: inline-block;
157
+								max-width: 145px;
158
+							}
159
+						}
160
+						&.active-item > a {
161
+							// background-color: rgba(255, 255, 255, 0.5);
162
+							background-color: #f90;
163
+							color: #ffffff;
164
+						}
165
+					}
166
+				} 
167
+			}
168
+    }
169
+
170
+    .sidenav-content{    
171
+      position: relative;
172
+      z-index: 1;
173
+      display: block;
174
+      height: 100%;
175
+      overflow: auto;
176
+		}
177
+  }
178
+}

+ 11
- 0
src/tsconfig.app.json Ver arquivo

@@ -0,0 +1,11 @@
1
+{
2
+  "extends": "../tsconfig.json",
3
+  "compilerOptions": {
4
+    "outDir": "../out-tsc/app",
5
+    "types": []
6
+  },
7
+  "exclude": [
8
+    "test.ts",
9
+    "**/*.spec.ts"
10
+  ]
11
+}

+ 18
- 0
src/tsconfig.spec.json Ver arquivo

@@ -0,0 +1,18 @@
1
+{
2
+  "extends": "../tsconfig.json",
3
+  "compilerOptions": {
4
+    "outDir": "../out-tsc/spec",
5
+    "types": [
6
+      "jasmine",
7
+      "node"
8
+    ]
9
+  },
10
+  "files": [
11
+    "test.ts",
12
+    "polyfills.ts"
13
+  ],
14
+  "include": [
15
+    "**/*.spec.ts",
16
+    "**/*.d.ts"
17
+  ]
18
+}

+ 21
- 0
tsconfig.json Ver arquivo

@@ -0,0 +1,21 @@
1
+{
2
+  "compileOnSave": false,
3
+  "compilerOptions": {
4
+    "baseUrl": "./",
5
+    "outDir": "./dist/out-tsc",
6
+    "sourceMap": true,
7
+    "declaration": false,
8
+    "module": "es2015",
9
+    "moduleResolution": "node",
10
+    "emitDecoratorMetadata": true,
11
+    "experimentalDecorators": true,
12
+    "target": "es5",
13
+    "typeRoots": [
14
+      "node_modules/@types"
15
+    ],
16
+    "lib": [
17
+      "es2018",
18
+      "dom"
19
+    ]
20
+  }
21
+  }