Page de connexion presque prête. Il manque la redirection de page en fonction du role

This commit is contained in:
MiharyR 2021-10-26 09:11:17 +02:00
parent 0c4142035b
commit fd24009f87
16 changed files with 249 additions and 48 deletions

View file

@ -0,0 +1,23 @@
<div *ngIf="complete">
<ul>
<li>
<a routerLink="/connexion" style="color: white ; background-color: black">
StreamNotFound
</a>
</li>
<li style="float:right; margin-right: 20px;">
<mat-slide-toggle></mat-slide-toggle>
</li>
</ul>
</div>
<div *ngIf="!complete">
<ul>
<li><a href="#home">Home</a></li>
<li><a href="#news">News</a></li>
<li><a href="#contact">Contact</a></li>
<li style="float:right"><a class="active" href="#about">About</a></li>
</ul>
</div>

View file

@ -0,0 +1,34 @@
mat-slide-toggle {
margin-top: 20px;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: black;
height: 70px;
}
li {
float: left;
font-size: x-large;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}
li a:hover:not(.active) {
background-color: #5caaff;
}
.active {
background-color: #ff0000;
}

View file

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { NavBarComponent } from './nav-bar.component';
describe('NavBarComponent', () => {
let component: NavBarComponent;
let fixture: ComponentFixture<NavBarComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ NavBarComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(NavBarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View file

@ -0,0 +1,17 @@
import {Component, Input, OnInit} from '@angular/core';
@Component({
selector: 'app-nav-bar',
templateUrl: './nav-bar.component.html',
styleUrls: ['./nav-bar.component.scss']
})
export class NavBarComponent implements OnInit
{
@Input() complete = false;
constructor() { }
ngOnInit(): void {
}
}