Refs #364 ajustar estilos css dashboard
parent
39d5b98aae
commit
27e55816bd
|
@ -1,11 +1,9 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { AuthLayoutComponent } from './components/layout/auth-layout/auth-layout.component';
|
||||
import { MainLayoutComponent } from './components/layout/main-layout/main-layout.component';
|
||||
import { FooterComponent } from './components/layout/footer/footer.component';
|
||||
import { HeaderComponent } from './components/layout/header/header.component';
|
||||
import { SidebarComponent } from './components/layout/sidebar/sidebar.component';
|
||||
import { LoginComponent } from './components/login/login.component';
|
||||
|
@ -18,7 +16,6 @@ import { CustomInterceptor } from './services/custom.interceptor';
|
|||
AppComponent,
|
||||
AuthLayoutComponent,
|
||||
MainLayoutComponent,
|
||||
FooterComponent,
|
||||
HeaderComponent,
|
||||
SidebarComponent,
|
||||
LoginComponent,
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
:host{
|
||||
display: block;
|
||||
background-color: blueviolet;
|
||||
grid-area: footer;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
<p>footer works!</p>
|
|
@ -1,23 +0,0 @@
|
|||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { FooterComponent } from './footer.component';
|
||||
|
||||
describe('FooterComponent', () => {
|
||||
let component: FooterComponent;
|
||||
let fixture: ComponentFixture<FooterComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [FooterComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(FooterComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -1,10 +0,0 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-footer',
|
||||
templateUrl: './footer.component.html',
|
||||
styleUrl: './footer.component.css'
|
||||
})
|
||||
export class FooterComponent {
|
||||
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
:host{
|
||||
display: block;
|
||||
background-color: red;
|
||||
background-color: rgb(126, 126, 126);
|
||||
grid-area: header;
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
templateUrl: './header.component.html',
|
||||
styleUrl: './header.component.css'
|
||||
styleUrl: './header.component.css',
|
||||
})
|
||||
export class HeaderComponent {
|
||||
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
"sidebar content"
|
||||
"sidebar footer";
|
||||
grid-template-columns: 120px 1fr;
|
||||
height: 100%;
|
||||
}
|
||||
.content-wrapper{
|
||||
display: block;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<app-sidebar></app-sidebar>
|
||||
<app-header></app-header>
|
||||
<app-footer></app-footer>
|
||||
<app-header>
|
||||
</app-header>
|
||||
<div class="content-wrapper">
|
||||
<div class="content">
|
||||
<router-outlet />
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
:host{
|
||||
display: block;
|
||||
background-color: rgb(0, 128, 255);
|
||||
background-color: rgb(85, 85, 85);
|
||||
grid-area: sidebar;
|
||||
}
|
|
@ -6,5 +6,6 @@ import { Component } from '@angular/core';
|
|||
styleUrl: './sidebar.component.css'
|
||||
})
|
||||
export class SidebarComponent {
|
||||
|
||||
hovered = false;
|
||||
}
|
||||
//https://medium.com/@yevhen.chmykhun.01/angular-blueprint-application-layout-b1680ca888e0
|
|
@ -1,6 +1,5 @@
|
|||
import { HttpClient } from '@angular/common/http';
|
||||
import { Component } from '@angular/core';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
import { TestBed } from '@angular/core/testing';
|
||||
import { HttpInterceptorFn } from '@angular/common/http';
|
||||
|
||||
import { customInterceptor } from './custom.interceptor';
|
||||
|
||||
describe('customInterceptor', () => {
|
||||
const interceptor: HttpInterceptorFn = (req, next) =>
|
||||
TestBed.runInInjectionContext(() => customInterceptor(req, next));
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(interceptor).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,19 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { HttpInterceptorFn, HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Token } from '@angular/compiler';
|
||||
|
||||
export class CustomInterceptor implements HttpInterceptor{
|
||||
constructor(){}
|
||||
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
|
||||
|
||||
const token = localStorage.getItem('loginToken');
|
||||
const newCloneRequest = req.clone({
|
||||
setHeaders:{
|
||||
Authorization: `${token}`
|
||||
}
|
||||
})
|
||||
|
||||
return next.handle(newCloneRequest);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue