feat: add header
This commit is contained in:
parent
35217726b0
commit
ef0de7f709
@ -5,12 +5,14 @@ import localeRu from '@angular/common/locales/ru';
|
|||||||
import {registerLocaleData} from '@angular/common';
|
import {registerLocaleData} from '@angular/common';
|
||||||
import {FocusNextDirective} from "@/directives/focus-next.directive";
|
import {FocusNextDirective} from "@/directives/focus-next.directive";
|
||||||
import {TokenRefreshService} from "@service/token-refresh.service";
|
import {TokenRefreshService} from "@service/token-refresh.service";
|
||||||
|
import {HeaderComponent} from "@component/common/header/header.component";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [RouterOutlet, FooterComponent, FocusNextDirective],
|
imports: [RouterOutlet, FooterComponent, FocusNextDirective, HeaderComponent],
|
||||||
template: `
|
template: `
|
||||||
|
<app-header/>
|
||||||
<router-outlet/>
|
<router-outlet/>
|
||||||
<app-footer/>`
|
<app-footer/>`
|
||||||
})
|
})
|
||||||
|
9
src/components/common/header/header.component.css
Normal file
9
src/components/common/header/header.component.css
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
mat-toolbar a {
|
||||||
|
color: inherit;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
mat-toolbar a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
3
src/components/common/header/header.component.html
Normal file
3
src/components/common/header/header.component.html
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<mat-toolbar style="justify-content: space-between;">
|
||||||
|
<a href="/" style="color: inherit;">Winsomnia</a>
|
||||||
|
</mat-toolbar>
|
18
src/components/common/header/header.component.ts
Normal file
18
src/components/common/header/header.component.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
import {MatToolbar} from "@angular/material/toolbar";
|
||||||
|
import {MatAnchor, MatButton} from "@angular/material/button";
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-header',
|
||||||
|
standalone: true,
|
||||||
|
imports: [
|
||||||
|
MatToolbar,
|
||||||
|
MatButton,
|
||||||
|
MatAnchor
|
||||||
|
],
|
||||||
|
templateUrl: './header.component.html',
|
||||||
|
styleUrl: './header.component.css'
|
||||||
|
})
|
||||||
|
export class HeaderComponent {
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user