Fix footer at page bottom.
This commit is contained in:
@@ -2,3 +2,4 @@
|
||||
<main>
|
||||
<router-outlet></router-outlet>
|
||||
</main>
|
||||
<app-footer></app-footer>
|
||||
@@ -1,9 +1,14 @@
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
|
||||
app-header {
|
||||
width: 100%;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
main {
|
||||
flex: 1;
|
||||
padding: 1em 0;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { CommonModule } from '@angular/common';
|
||||
import { Component } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { HeaderComponent } from './components/header/header.component';
|
||||
import { FooterComponent } from './components/footer/footer.component';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
@@ -9,7 +10,8 @@ import { HeaderComponent } from './components/header/header.component';
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterOutlet,
|
||||
HeaderComponent
|
||||
HeaderComponent,
|
||||
FooterComponent
|
||||
],
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.scss'
|
||||
|
||||
15
frontend/src/app/components/footer/footer.component.html
Normal file
15
frontend/src/app/components/footer/footer.component.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div>
|
||||
<span class="copy-left">
|
||||
©
|
||||
</span>
|
||||
2027 - 2024 Tous droits réservés
|
||||
<version>
|
||||
<a [routerLink]="['healthCheck']">
|
||||
<mat-icon>favorite</mat-icon>
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<mat-icon>menu_book</mat-icon>
|
||||
-
|
||||
Développements réalisés par Florian THIERRY
|
||||
</div>
|
||||
28
frontend/src/app/components/footer/footer.component.scss
Normal file
28
frontend/src/app/components/footer/footer.component.scss
Normal file
@@ -0,0 +1,28 @@
|
||||
:host {
|
||||
background-color: #3f51b5;
|
||||
color: rgba(255,255,255,.6);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
padding: .5em;
|
||||
font-size: 1.1em;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: rgba(255,255,255,.6);
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
font-size: 1em;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
23
frontend/src/app/components/footer/footer.component.spec.ts
Normal file
23
frontend/src/app/components/footer/footer.component.spec.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
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();
|
||||
});
|
||||
});
|
||||
14
frontend/src/app/components/footer/footer.component.ts
Normal file
14
frontend/src/app/components/footer/footer.component.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { RouterModule } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-footer',
|
||||
standalone: true,
|
||||
imports: [MatIconModule, RouterModule],
|
||||
templateUrl: './footer.component.html',
|
||||
styleUrl: './footer.component.scss'
|
||||
})
|
||||
export class FooterComponent {
|
||||
|
||||
}
|
||||
@@ -5,4 +5,6 @@ body {
|
||||
margin: 0;
|
||||
font-family: Roboto, "Helvetica Neue", sans-serif;
|
||||
background-color: #fafafa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user