Skip to content

Commit 4cfda40

Browse files
author
Emmanuelle BONOLI
committed
create header
1 parent 9f2f47d commit 4cfda40

14 files changed

+123
-20
lines changed

public/LogoALAsso.png

19.3 KB
Loading

src/app/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<!-- <p-button label="Check" (click)="changeMode()" />-->
88
<!-- </div>-->
99
<!-- </div>-->
10-
<div>
10+
<div class="page">
1111
<router-outlet></router-outlet>
1212
</div>
1313
<!--</div>-->

src/app/app.component.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import { Component } from '@angular/core';
22
import { ButtonModule } from 'primeng/button';
33
import { RouterOutlet } from '@angular/router';
4+
import { HeaderComponent } from './features/header/header.component';
45

56
@Component({
67
selector: 'app-root',
78
standalone: true,
8-
imports: [ButtonModule, RouterOutlet],
9+
imports: [ButtonModule, RouterOutlet, HeaderComponent],
910
templateUrl: './app.component.html',
1011
styleUrl: './app.component.scss',
1112
})
1213
export class AppComponent {
1314
// TODO: à supprimer quand le dark mode sera fonctionnel
14-
darkMode: boolean = false;
15-
16-
changeMode(): void {
17-
this.darkMode = !this.darkMode;
18-
}
15+
// darkMode: boolean = false;
16+
//
17+
// changeMode(): void {
18+
// this.darkMode = !this.darkMode;
19+
// }
1920
}

src/app/app.routes.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import { Routes } from '@angular/router';
2-
import { AppComponent } from './app.component';
32
import { ActivitiesHomeComponent } from './features/activity/pages/activities-home/activities-home.component';
3+
import { MainLayoutComponent } from './layouts/main-layout/main-layout.component';
44

55
export const routes: Routes = [
66
{
77
path: '',
8-
component: AppComponent,
9-
},
10-
{
11-
path: 'activities',
12-
component: ActivitiesHomeComponent,
8+
component: MainLayoutComponent,
9+
children: [
10+
{
11+
path: 'activities',
12+
component: ActivitiesHomeComponent,
13+
},
14+
],
1315
},
1416
];

src/app/features/activity/pages/activities-home/activities-home.component.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.activities-home {
2-
width: 100vw;
3-
height: 100vh;
42
display: flex;
53
flex-wrap: wrap;
64
justify-content: space-around;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<header>
2+
<div class="logo">
3+
<img src="/LogoALAsso.png" alt="logo A l'asso!" />
4+
<h1>a l'asso !</h1>
5+
</div>
6+
<!--TODO: ajouter la connexion ici-->
7+
</header>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
header {
2+
display: flex;
3+
justify-content: space-between;
4+
align-items: center;
5+
padding: 0 1% 0 1%;
6+
margin-bottom: 4%;
7+
color: var(--primary-dark-color);
8+
box-shadow: var(--box-shadow);
9+
10+
.logo {
11+
display: flex;
12+
width: 40%;
13+
gap: 5%;
14+
}
15+
16+
h1 {
17+
font-weight: 400;
18+
}
19+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { ComponentFixture, TestBed } from '@angular/core/testing';
2+
3+
import { HeaderComponent } from './header.component';
4+
5+
describe('HeaderComponent', () => {
6+
let component: HeaderComponent;
7+
let fixture: ComponentFixture<HeaderComponent>;
8+
9+
beforeEach(async () => {
10+
await TestBed.configureTestingModule({
11+
imports: [HeaderComponent]
12+
})
13+
.compileComponents();
14+
15+
fixture = TestBed.createComponent(HeaderComponent);
16+
component = fixture.componentInstance;
17+
fixture.detectChanges();
18+
});
19+
20+
it('should create', () => {
21+
expect(component).toBeTruthy();
22+
});
23+
});
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-header',
5+
imports: [],
6+
templateUrl: './header.component.html',
7+
styleUrl: './header.component.scss',
8+
})
9+
export class HeaderComponent {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<div class="main-layout">
2+
<app-header></app-header>
3+
<router-outlet></router-outlet>
4+
<!--TODO: ajouter le footer ici-->
5+
</div>

0 commit comments

Comments
 (0)